Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Postgresql error on update from v5 to v6 #49

Open
HumanG33k opened this issue Feb 20, 2019 · 4 comments
Open

Postgresql error on update from v5 to v6 #49

HumanG33k opened this issue Feb 20, 2019 · 4 comments

Comments

@HumanG33k
Copy link

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
Copy link

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.

@rodrigoesborges
Copy link

rodrigoesborges commented Mar 28, 2019

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
Copy link

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
Copy link

buoncri commented Apr 17, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants