Skip to content
Snippets Groups Projects
Commit 9c76fc92 authored by zhengxie's avatar zhengxie
Browse files

[scripts] Add missing "if not exists" to sqls

parent 2eedccd9
Branches
Tags v3.1.0-server-testing
No related merge requests found
......@@ -7,7 +7,7 @@ alter table share_uploadlinkshare add column password varchar(128);
alter table share_uploadlinkshare add column expire_date datetime;
alter table profile_profile add column lang_code varchar(50) DEFAULT NULL;
CREATE TABLE `share_orgfileshare` (
CREATE TABLE IF NOT EXISTS `share_orgfileshare` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`org_id` int(11) NOT NULL,
`file_share_id` int(11) NOT NULL,
......
......@@ -6,9 +6,10 @@ alter table "share_uploadlinkshare" add column "password" varchar(128);
alter table "share_uploadlinkshare" add column "expire_date" datetime;
alter table "profile_profile" add column "lang_code" varchar(50);
CREATE TABLE "share_orgfileshare" (
CREATE TABLE IF NOT EXISTS "share_orgfileshare" (
"id" integer NOT NULL PRIMARY KEY,
"org_id" integer NOT NULL,
"file_share_id" integer NOT NULL UNIQUE REFERENCES "share_fileshare" ("id")
);
CREATE INDEX "share_orgfileshare_944dadb6" ON "share_orgfileshare" ("org_id");
CREATE INDEX IF NOT EXISTS "share_orgfileshare_944dadb6" ON "share_orgfileshare" ("org_id");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment