mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 22:54:11 +00:00
add seafile scripts
This commit is contained in:
47
scripts/upgrade/sql/1.6.0/mysql/seahub.sql
Normal file
47
scripts/upgrade/sql/1.6.0/mysql/seahub.sql
Normal file
@@ -0,0 +1,47 @@
|
||||
CREATE TABLE IF NOT EXISTS `wiki_groupwiki` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`group_id` int(11) NOT NULL,
|
||||
`repo_id` varchar(36) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `group_id` (`group_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `wiki_personalwiki` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`username` varchar(255) NOT NULL,
|
||||
`repo_id` varchar(36) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `username` (`username`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `group_publicgroup` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`group_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `group_publicgroup_425ae3c4` (`group_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `base_filediscuss` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`group_message_id` int(11) NOT NULL,
|
||||
`repo_id` varchar(36) NOT NULL,
|
||||
`path` longtext NOT NULL,
|
||||
`path_hash` varchar(12) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `base_filediscuss_3c1a2584` (`group_message_id`),
|
||||
KEY `base_filediscuss_6844bd5a` (`path_hash`),
|
||||
CONSTRAINT `group_message_id_refs_id_2ade200f` FOREIGN KEY (`group_message_id`) REFERENCES `group_groupmessage` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `base_filelastmodifiedinfo` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`repo_id` varchar(36) NOT NULL,
|
||||
`file_id` varchar(40) NOT NULL,
|
||||
`file_path` longtext NOT NULL,
|
||||
`file_path_hash` varchar(12) NOT NULL,
|
||||
`last_modified` bigint(20) NOT NULL,
|
||||
`email` varchar(75) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `repo_id` (`repo_id`,`file_path_hash`),
|
||||
KEY `base_filelastmodifiedinfo_359081cc` (`repo_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
39
scripts/upgrade/sql/1.6.0/sqlite3/seahub.sql
Normal file
39
scripts/upgrade/sql/1.6.0/sqlite3/seahub.sql
Normal file
@@ -0,0 +1,39 @@
|
||||
CREATE TABLE IF NOT EXISTS "wiki_groupwiki" (
|
||||
"id" integer NOT NULL PRIMARY KEY,
|
||||
"group_id" integer NOT NULL UNIQUE,
|
||||
"repo_id" varchar(36) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "wiki_personalwiki" (
|
||||
"id" integer NOT NULL PRIMARY KEY,
|
||||
"username" varchar(256) NOT NULL UNIQUE,
|
||||
"repo_id" varchar(36) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "group_publicgroup" (
|
||||
"id" integer NOT NULL PRIMARY KEY,
|
||||
"group_id" integer NOT NULL
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS "group_publicgroup_bda51c3c" ON "group_publicgroup" ("group_id");
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "base_filediscuss" (
|
||||
"id" integer NOT NULL PRIMARY KEY,
|
||||
"group_message_id" integer NOT NULL REFERENCES "group_groupmessage" ("id"),
|
||||
"repo_id" varchar(40) NOT NULL,
|
||||
"path" text NOT NULL,
|
||||
"path_hash" varchar(12) NOT NULL
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS "base_filediscuss_6844bd5a" ON "base_filediscuss" ("path_hash");
|
||||
CREATE INDEX IF NOT EXISTS "base_filediscuss_c3e5da7c" ON "base_filediscuss" ("group_message_id");
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "base_filelastmodifiedinfo" (
|
||||
"id" integer NOT NULL PRIMARY KEY,
|
||||
"repo_id" varchar(36) NOT NULL,
|
||||
"file_id" varchar(40) NOT NULL,
|
||||
"file_path" text NOT NULL,
|
||||
"file_path_hash" varchar(12) NOT NULL,
|
||||
"last_modified" bigint NOT NULL,
|
||||
"email" varchar(75) NOT NULL,
|
||||
UNIQUE ("repo_id", "file_path_hash")
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS "base_filelastmodifiedinfo_ca6f7e34" ON "base_filelastmodifiedinfo" ("repo_id");
|
Reference in New Issue
Block a user