dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Postgresql error on update from v5 to v6

Open HumanG33k opened this issue 6 years ago • 4 comments
trafficstars

I try to upgrade from v5 to v6 after i upgrade nextcloud to 15 from 14.

I have an error :

An exception occurred while executing 'DROP INDEX unique_setting': SQLSTATE[42704]: Undefined object: 7 error: the index « unique_setting » not exist.

HumanG33k avatar Feb 20 '19 14:02 HumanG33k

Hi there! I also got this error so I created a dummy index for post-deletion by the install script of the dashboard plugin. This is how I did:

  1. Get the DB settings (host, id, password):
cat /var/www/nextcloud/config/config.php
  1. Connect to the DB (Postgres in my case - using NC appliance):
psql -h localhost -d nextcloud_db -U ncadmin -W
Password for user ncadmin:
nextcloud_db=> 
  1. Create an index:
nextcloud_db=> CREATE INDEX unique_setting on oc_activity(timestamp);
CREATE INDEX
nextcloud_db=> 
  1. In the apps menu in NC web interface, try to download and install the dashboard plugin again.

This is just fooling the install script... I hope they fix it soon.

rodrigocastrillon avatar Mar 23 '19 23:03 rodrigocastrillon

I got the same problem, just tried @rodrigocastrillon 's workaround, but it didn't work (maybe for another issue)

  1. grep db config.php could get relevant DB setitngs with less clutter

  2. and 3) executed identically

Now I got :

An error occurred during the request. Impossible to continue. An exception occurred while executing 'ALTER TABLE oc_dashboard_settings ADD "widget_id" VARCHAR(31) NOT NULL': SQLSTATE[23502]: Not null violation: 7 ERROR: column "widget_id" contains null values

rodrigoesborges avatar Mar 28 '19 20:03 rodrigoesborges

I did:

nextcloud=# drop table oc_dashboard_announcements;
DROP TABLE
nextcloud=# drop table oc_dashboard_files;
DROP TABLE
nextcloud=# drop table oc_dashboard_settings;

morph027 avatar Apr 11 '19 13:04 morph027

As @morph027 said i uninstall and then drop tables. Now it is working ... less or more :-D Tnk to all

buoncri avatar Apr 17 '19 10:04 buoncri