I’m finally want to update my old Seafile setup. So far it’s been running on 6.2.5 with Debian Bullseye. I’ve now checked out 6.3.4 from the sources and rebuild+installed it. I then wanted to run the upgrade scripts but already the first one, upgrade_6.2_6.3.sh, fails as follows:
seafile@seafile:~/build/seafile-server/src/seafile-server$ ./scripts/upgrade/upgrade_6.2_6.3.sh
-------------------------------------------------------------
This script would upgrade your seafile server from 6.2 to 6.3
Press [ENTER] to contiune
-------------------------------------------------------------
Updating seafile/seahub database ...
[INFO] You are using SQLite3
[INFO] updating seafile database...
[INFO] updating seahub database...
Traceback (most recent call last):
File "/home/seafile/build/seafile-server/src/seafile-server/scripts/upgrade/db_update_helper.py", line 384, in <module>
main()
File "/home/seafile/build/seafile-server/src/seafile-server/scripts/upgrade/db_update_helper.py", line 379, in main
db_updater.update_db()
File "/home/seafile/build/seafile-server/src/seafile-server/scripts/upgrade/db_update_helper.py", line 275, in update_db
super(SQLiteDBUpdater, self).update_db()
File "/home/seafile/build/seafile-server/src/seafile-server/scripts/upgrade/db_update_helper.py", line 129, in update_db
self.update_seahub_sql(seahub_sql)
File "/home/seafile/build/seafile-server/src/seafile-server/scripts/upgrade/db_update_helper.py", line 299, in update_seahub_sql
self.apply_sqls(self.seahub_db, sql_path)
File "/home/seafile/build/seafile-server/src/seafile-server/scripts/upgrade/db_update_helper.py", line 289, in apply_sqls
conn.execute(line)
sqlite3.OperationalError: no such table: main.notifications_notification
Failed to upgrade your database
Okay, found my issue (as I’ve also mentioned on Github for haiwen/seafile, #2082):
My slightly different INSTALL_PATH in the upgrade script unfortunately is not automatically propagated to scripts/upgrade/db_update_helper.py. So I had to modify that, too, like this:
seafile@seafile:~/build/seafile-server/src/seafile-server$ ./scripts/upgrade/upgrade_6.2_6.3.sh
-------------------------------------------------------------
This script would upgrade your seafile server from 6.2 to 6.3
Press [ENTER] to contiune
-------------------------------------------------------------
Updating seafile/seahub database ...
[INFO] You are using SQLite3
[INFO] updating seafile database...
[INFO] updating seahub database...
Done
migrating avatars ...
Done
updating /home/seafile/build/seafile-server-latest symbolic link to /home/seafile/build/seafile-server/ ...
-----------------------------------------------------------------
Upgraded your seafile server successfully.
-----------------------------------------------------------------