diff --git a/src/main/resources/db/migration/V8__tutorial_remake.sql b/src/main/resources/db/migration/V8__tutorial_remake.sql new file mode 100644 index 0000000..3c476c6 --- /dev/null +++ b/src/main/resources/db/migration/V8__tutorial_remake.sql @@ -0,0 +1,18 @@ +DROP TABLE tutorials; + +CREATE TABLE tutorials +( + id bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ), + published boolean, + title character varying(255) COLLATE pg_catalog."default", + userid bigint, + created timestamp with time zone, + modified timestamp with time zone, + description character varying(255) COLLATE pg_catalog."default", + CONSTRAINT tutorials_title_key UNIQUE (title), + CONSTRAINT "tutorial_user_FK" FOREIGN KEY (userid) + REFERENCES public.users (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +) +