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)
);

ALTER TABLE IF EXISTS public.accounts
    OWNER to dev;