Skip to content

Commit

Permalink
Fix upgrade sql: create RepoSyncError table if not exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
killing committed May 23, 2019
1 parent d20e485 commit 182fdb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/upgrade/sql/7.0.0/mysql/seafile.sql
Original file line number Diff line number Diff line change
@@ -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);
1 change: 1 addition & 0 deletions scripts/upgrade/sql/7.0.0/sqlite3/seafile.sql
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 182fdb2

Please sign in to comment.