-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
30 lines (27 loc) · 786 Bytes
/
init.sql
File metadata and controls
30 lines (27 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CREATE TABLE public."USERS"
(
"USERNAME" character varying(50) COLLATE pg_catalog."default" NOT NULL,
"PASSWORD" character varying(50) COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT "USERS_pkey" PRIMARY KEY ("USERNAME")
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public."USERS"
OWNER to postgres;
CREATE TABLE public."USER_LINKS"
(
"USER" character varying COLLATE pg_catalog."default" NOT NULL,
"LINK" character varying COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT "USER_FOREIGN_KEY" FOREIGN KEY ("USER")
REFERENCES public."USERS" ("USERNAME") MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public."USER_LINKS"
OWNER to postgres;