nextcloud / dashboard

ARCHIVED, new Dashboard is in the server
https://nextcloud.com/dashboard
GNU Affero General Public License v3.0
58 stars 29 forks source link

Postgresql error on update from v5 to v6 #49

Open HumanG33k opened 5 years ago

HumanG33k commented 5 years ago

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.
rodrigocastrillon commented 5 years ago

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
  2. 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=> 
  3. Create an index:

    nextcloud_db=> CREATE INDEX unique_setting on oc_activity(timestamp);
    CREATE INDEX
    nextcloud_db=> 
  4. 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.

rodrigoesborges commented 5 years ago

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

morph027 commented 5 years ago

I did:

nextcloud=# drop table oc_dashboard_announcements;
DROP TABLE
nextcloud=# drop table oc_dashboard_files;
DROP TABLE
nextcloud=# drop table oc_dashboard_settings;
buoncri commented 5 years ago

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