diff options
author | Eneas U de Queiroz <cote2004-github@yahoo.com> | 2018-06-22 14:32:18 -0300 |
---|---|---|
committer | Eneas U de Queiroz <cote2004-github@yahoo.com> | 2018-06-22 14:32:18 -0300 |
commit | 05f890950ed5c9729e4b979bf24e9f46aa59b83f (patch) | |
tree | 76e64b8a25c719585ee15177d553e2e0e2d48016 /net/seafile-server | |
parent | 302454f5271a801ab9b546663f0e587829d598e4 (diff) |
seafile-server: Fix SystemInfo table in sqlite db.
Added a patch applied upstream.
- Fix that table SystemInfo can't be created in sqlite db.
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
Diffstat (limited to 'net/seafile-server')
-rw-r--r-- | net/seafile-server/patches/090-Fix-that-table-SystemInfo-cant-be-created-in-sqlite-db.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/net/seafile-server/patches/090-Fix-that-table-SystemInfo-cant-be-created-in-sqlite-db.patch b/net/seafile-server/patches/090-Fix-that-table-SystemInfo-cant-be-created-in-sqlite-db.patch new file mode 100644 index 000000000..86a448202 --- /dev/null +++ b/net/seafile-server/patches/090-Fix-that-table-SystemInfo-cant-be-created-in-sqlite-db.patch @@ -0,0 +1,32 @@ +From 25dcf165f77c94f758383d35632293d69666d0ad Mon Sep 17 00:00:00 2001 +From: cuihaikuo <haikuo.cui@seafile.com> +Date: Thu, 7 Jun 2018 11:56:44 +0800 +Subject: [PATCH] Fix that table SystemInfo can't be created in sqlite db. + +--- + server/seafile-session.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/server/seafile-session.c b/server/seafile-session.c +index 76d9c12..2a1fc0c 100644 +--- a/server/seafile-session.c ++++ b/server/seafile-session.c +@@ -424,9 +424,17 @@ create_system_default_repo (void *data) + void + schedule_create_system_default_repo (SeafileSession *session) + { +- char *sql = "CREATE TABLE IF NOT EXISTS SystemInfo " ++ int db_type = seaf_db_type (session->db); ++ char *sql; ++ ++ if (db_type == SEAF_DB_TYPE_MYSQL) ++ sql = "CREATE TABLE IF NOT EXISTS SystemInfo " + "(id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, " + "info_key VARCHAR(256), info_value VARCHAR(1024))"; ++ else ++ sql = "CREATE TABLE IF NOT EXISTS SystemInfo( " ++ "info_key VARCHAR(256), info_value VARCHAR(1024))"; ++ + if (seaf_db_query (session->db, sql) < 0) + return; + |