diff --git a/src/main/resources/db/migration/V1_0__user_and_list_and_todo_tables.sql b/src/main/resources/db/migration/V1_0__user_and_list_and_todo_tables.sql new file mode 100644 index 0000000000000000000000000000000000000000..f8392af77c3a7b75ed43af93ca32037f4d7fcbc8 --- /dev/null +++ b/src/main/resources/db/migration/V1_0__user_and_list_and_todo_tables.sql @@ -0,0 +1,21 @@ +CREATE TABLE public.userb +( + id BIGSERIAL PRIMARY KEY, + name VARCHAR NOT NULL +); + +CREATE TABLE public.todo_list +( + id BIGSERIAL PRIMARY KEY, + name VARCHAR NOT NULL, + user_id BIGINT NOT NULL REFERENCES userb (id) +); + +CREATE TABLE public.todo +( + id BIGSERIAL PRIMARY KEY, + name VARCHAR NOT NULL, + description VARCHAR, + checked BOOLEAN NOT NULL DEFAULT FALSE, + seller_id BIGINT NOT NULL REFERENCES todo_list (id) +);