Change book schema
This commit is contained in:
1 parent
bb7ab38b92
commit
d5fb7da13f
5 files changed
+22
-34
No files matched your search
@@ -17,7 +17,9 @@ CREATE TABLE public.books (
|
||||
"contentType" text NOT NULL,
|
||||
title text NULL,
|
||||
description text NULL,
|
||||
CONSTRAINT books_pkey PRIMARY KEY (identifier)
|
||||
owner bigserial NOT NULL,
|
||||
CONSTRAINT books_pkey PRIMARY KEY (identifier),
|
||||
CONSTRAINT fk_books_owner FOREIGN KEY (owner) REFERENCES users(identifier)
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
@@ -60,12 +62,3 @@ CREATE TABLE public.book_tags (
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
) ;
|
||||
CREATE TABLE public.user_book (
|
||||
"user" bigserial NOT NULL,
|
||||
book int8 NOT NULL,
|
||||
CONSTRAINT fk0_user FOREIGN KEY ("user") REFERENCES users(identifier),
|
||||
CONSTRAINT fk1_book FOREIGN KEY (book) REFERENCES books(identifier)
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
) ;
|
||||
Reference in new issue
Block a user