-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.sql
27 lines (20 loc) · 787 Bytes
/
db.sql
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
-- public.accounts definition
-- Drop table
-- DROP TABLE public.accounts;
CREATE TABLE public.accounts (
account_id int8 GENERATED ALWAYS AS IDENTITY( INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1 NO CYCLE) NOT NULL,
name varchar NOT NULL,
CONSTRAINT account_pk PRIMARY KEY (account_id)
);
-- public.auths definition
-- Drop table
-- DROP TABLE public.auths;
CREATE TABLE public.auths (
auth_id int8 GENERATED ALWAYS AS IDENTITY( INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1 NO CYCLE) NOT NULL,
account_id int8 NOT NULL,
username varchar NOT NULL,
"password" varchar NOT NULL,
CONSTRAINT auths_pk PRIMARY KEY (auth_id),
CONSTRAINT auths_unique UNIQUE (account_id),
CONSTRAINT auths_unique_username UNIQUE (username)
);