diff --git a/coral/migration/versions/20220414_1158_ddd776aa28c3_.py b/coral/migration/versions/20220414_1158_ddd776aa28c3_.py index 786920b..6e31ab5 100644 --- a/coral/migration/versions/20220414_1158_ddd776aa28c3_.py +++ b/coral/migration/versions/20220414_1158_ddd776aa28c3_.py @@ -19,7 +19,7 @@ def upgrade(): for cmd in [ """ CREATE SCHEMA IF NOT EXISTS cohort; -CREATE SEQUENCE cohort.cohort_id_seq +CREATE SEQUENCE IF NOT EXISTS cohort.cohort_id_seq INCREMENT 1 START 1 MINVALUE 1 @@ -27,7 +27,7 @@ def upgrade(): CACHE 1; """, """ -CREATE TABLE cohort.cohort +CREATE TABLE IF NOT EXISTS cohort.cohort ( id integer NOT NULL DEFAULT nextval('cohort.cohort_id_seq'::regclass), name character varying COLLATE pg_catalog."default" NOT NULL,