7.0.5-7.1.0问题

7.0.5升级到7.1.0beta问题:
./upgrade_7.0_7.1.sh


This script would upgrade your seafile server from 7.0 to 7.1
Press [ENTER] to contiune

Updating seafile/seahub database …

[INFO] You are using SQLite3
[INFO] updating seahub database…
Traceback (most recent call last):
File “/home/haiwen/seafile-server-7.1.0/upgrade/db_update_helper.py”, line 384, in
main()
File “/home/haiwen/seafile-server-7.1.0/upgrade/db_update_helper.py”, line 379, in main
db_updater.update_db()
File “/home/haiwen/seafile-server-7.1.0/upgrade/db_update_helper.py”, line 275, in update_db
super(SQLiteDBUpdater, self).update_db()
File “/home/haiwen/seafile-server-7.1.0/upgrade/db_update_helper.py”, line 129, in update_db
self.update_seahub_sql(seahub_sql)
File “/home/haiwen/seafile-server-7.1.0/upgrade/db_update_helper.py”, line 299, in update_seahub_sql
self.apply_sqls(self.seahub_db, sql_path)
File “/home/haiwen/seafile-server-7.1.0/upgrade/db_update_helper.py”, line 289, in apply_sqls
conn.execute(line)
sqlite3.IntegrityError: column constance_key is not unique

Failed to upgrade your database

这个版本upgrade/sql/7.1.0/sqlite3里面的sql有很多错误,还是先别升了。

你这个启动不了老版本,就改下seafile主目录下的seahub.db
把constance_config表删除(应该是空的)
再把constance_config_old重命名为constance_config

sqlite3 seahub.db
drop table constance_config;
alter table constance_config_old rename to constance_config;
.quit