11 lines
No EOL
446 B
SQL
11 lines
No EOL
446 B
SQL
CREATE TABLE IF NOT EXISTS public.accounts
|
|
(
|
|
id integer NOT NULL GENERATED ALWAYS AS IDENTITY,
|
|
username text NOT NULL,
|
|
password text NOT NULL,
|
|
role_id smallint NOT NULL DEFAULT '1'::smallint,
|
|
created_at timestamp without time zone NOT NULL DEFAULT now(),
|
|
updated_at timestamp without time zone NOT NULL DEFAULT now(),
|
|
CONSTRAINT accounts_pkey PRIMARY KEY (id),
|
|
CONSTRAINT accounts_username_key UNIQUE (username)
|
|
); |