diff --git a/scripts/upgrade/sql/7.0.0/mysql/seafile.sql b/scripts/upgrade/sql/7.0.0/mysql/seafile.sql index 9f4e8518..1cc9e887 100644 --- a/scripts/upgrade/sql/7.0.0/mysql/seafile.sql +++ b/scripts/upgrade/sql/7.0.0/mysql/seafile.sql @@ -1,2 +1,3 @@ ALTER TABLE RepoInfo ADD COLUMN status INTEGER DEFAULT 0; +CREATE TABLE IF NOT EXISTS RepoSyncError (id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, token CHAR(41), error_time BIGINT UNSIGNED, error_con VARCHAR(1024), UNIQUE INDEX(token)); ALTER TABLE RepoSyncError MODIFY COLUMN error_con VARCHAR(1024); diff --git a/scripts/upgrade/sql/7.0.0/sqlite3/seafile.sql b/scripts/upgrade/sql/7.0.0/sqlite3/seafile.sql index ae7188f3..166d2767 100644 --- a/scripts/upgrade/sql/7.0.0/sqlite3/seafile.sql +++ b/scripts/upgrade/sql/7.0.0/sqlite3/seafile.sql @@ -1,4 +1,5 @@ ALTER TABLE RepoInfo ADD COLUMN status INTEGER DEFAULT 0; +CREATE TABLE IF NOT EXISTS RepoSyncError (token CHAR(41) PRIMARY KEY, error_time BIGINT, error_con VARCHAR(1024)); ALTER TABLE RepoSyncError RENAME TO TmpRepoSyncError; CREATE TABLE RepoSyncError (token CHAR(41) PRIMARY KEY, error_time BIGINT, error_con VARCHAR(1024)); INSERT INTO RepoSyncError SELECT * FROM TmpRepoSyncError;