Hi,
I use the “Notes” app and up to version 3.4.0 all functions are ok.
But when I update to version 3.5.1, the app stops with the following message
Auf den Notizordner kann nicht zugegriffen werden: An exception occurred while executing ‘INSERT INTO oc_notes_meta (user_id, file_id, last_update, file_etag, content_etag, etag) VALUES(?, ?, ?, ?, ?, ?)’ with params [XXXXXXXXXXXXX"]: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘file_etag’ in ‘field list’
Bitte wähle einen geeigneten Verzeichnispfad in den Einstellungen (unten links).
i deinstall and reinstall the App but no change
Does one of you have an idea?
THX
It looks like the database migration was not executed correctly, i.e. your database table is in an old state. Can you please execute the command php occ migrations:status notes on your server (in the Nextcloud server directory) and post the output?
Maybe executing the command php occ migrations:migrate notes will already fix the issue.
The idea was good, but unfortunately it was unsuccessful.
The bug is still there.
Yes it is true I upgraded an old Nextcloud (12) to 18.
i need my "old" ~ migrate Datagbase, thats all include my data of the last Years.
Exists an Alternative?
i see the directory "......./apps/notes/lib/Migration" are not exist.
Is this correctly?
Here the output BEFORE and AFTER the command
sudo -u "..." php occ migrations:status notes
BEVOR
```
App: notes
Version Table Name: oc_migrations
Migrations Namespace: OCA\Notes\Migration
Migrations Directory: /.../.../.../.../.../.../.../apps/notes/lib/Migration
Previous Version: Already at first migration step
Current Version: 3005Date20200528204431
Next Version: Already at latest migration step
Latest Version:
Executed Migrations: 2
Executed Unavailable Migrations: 2
Available Migrations: 0
New Migrations: 0
Pending Migrations: None
sudo -u "..." php occ migrations:migrate notes
AFTER
```
App: notes
Version Table Name: oc_migrations
Migrations Namespace: OCA\Notes\Migration
Migrations Directory: /.../.../.../.../.../.../.../apps/notes/lib/Migration
Previous Version: Already at first migration step
Current Version: 3005Date20200528204431
Next Version: Already at latest migration step
Latest Version:
Executed Migrations: 2
Executed Unavailable Migrations: 2
Available Migrations: 0
New Migrations: 0
Pending Migrations: None
```
The directory apps/notes/lib/Migration/ should definitely exist. It is included in the app release v3.5.1. If this directory does not exist, please deinstall the notes app and then re-install it again from the store.
Maybe upgrading the very old Nextcloud server has messed the migration process up. Please try to re-execute the migration manually, by executing the following commands:
php occ config:system:set debug --type=boolean --value true
php occ migrations:execute notes 3005Date20200528204430
php occ migrations:execute notes 3005Date20200528204431
php occ config:system:delete debug
Thats it.
You are my Hero.
Many many THX!!!!
What exactly did these snippets trigger / change?
Actually, that should happen automatically when upgrading the Nextcloud versions, right?
Thank you! Just upgraded from 18.0.5 to 19.0.0 and went from Notes 3.5.0 to 3.5.1 and had this same problem. Ran korelstar commands and it worked. So Thank you!
php occ config:system:set debug --type=boolean --value true
php occ migrations:execute notes 3005Date20200528204430
php occ migrations:execute notes 3005Date20200528204431
php occ config:system:delete debug
Yes, this should happen automatically when updating a Nextcloud app. The command php occ migrations:execute notes VERSION manually executes the database migration steps. Step 3005Date20200528204430 is deleting the full meta table (if it exists) and 3005Date20200528204431 is creating the table. Since normally it isn't needed to do this manually, we have to activate debug more first, and deactivate it afterwards.
I have no idea, why the migration wasn't executed correctly, but since we found a solution, I'm closing this issue. I hope, this never happens again.
Most helpful comment
The directory
apps/notes/lib/Migration/should definitely exist. It is included in the app release v3.5.1. If this directory does not exist, please deinstall the notes app and then re-install it again from the store.Maybe upgrading the very old Nextcloud server has messed the migration process up. Please try to re-execute the migration manually, by executing the following commands: