Compare commits

...

3 Commits

Author SHA1 Message Date
root 7928d0598b add sql 2019-06-25 17:02:39 +08:00
root 3bdfd83583 add new sql 2019-06-25 17:01:51 +08:00
root f0a256f088 fix 2019-05-22 22:48:35 +08:00
2 changed files with 19 additions and 6 deletions
+15
View File
@@ -0,0 +1,15 @@
-- create line bot table
CREATE TABLE public.line_bot (
id uuid NOT NULL DEFAULT uuid_generate_v4(),
"name" varchar(32) NOT NULL,
access_token varchar(256) NOT NULL,
secret varchar(256) NOT NULL,
ctime timestamptz NOT NULL DEFAULT current_timestamp,
mtime timestamptz NOT NULL DEFAULT current_timestamp,
CONSTRAINT line_bot_pk PRIMARY KEY (id)
);
-- add bot fk to line_group table
ALTER TABLE public.line_group ADD bot_id uuid NULL;
-- add fk
ALTER TABLE public.line_group ADD CONSTRAINT line_group_fk FOREIGN KEY (bot_id) REFERENCES public.line_bot(id) ON DELETE SET NULL;
+3 -5
View File
@@ -22,11 +22,9 @@
{"file": "20180928-1.sql", "version": 20},
{"file": "20181001-1.sql", "version": 21},
{"file": "20181010-1.sql", "version": 22},
<<<<<<< Updated upstream
{"file": "20190305-1.sql", "version": 23}
=======
{"file": "20190522-1.sql", "version": 23}
>>>>>>> Stashed changes
{"file": "20190305-1.sql", "version": 23},
{"file": "20190522-1.sql", "version": 24},
{"file": "20190625-1.sql", "version": 25}
],
"test": []
}