DROP TABLE public.access_token;

CREATE TABLE public.access_token (
	id bigserial NOT NULL,
	uid int8 NULL,
	"name" varchar(255) NULL,
	token_hash varchar(255) NULL,
	token_salt varchar(255) NULL,
	token_last_eight varchar(255) NULL,
	created_unix int8 NULL,
	updated_unix int8 NULL,
	CONSTRAINT access_token_pkey PRIMARY KEY (id)
);
CREATE INDEX "IDX_access_token_created_unix" ON public.access_token USING btree (created_unix);
CREATE INDEX "IDX_access_token_uid" ON public.access_token USING btree (uid);
CREATE INDEX "IDX_access_token_updated_unix" ON public.access_token USING btree (updated_unix);
CREATE UNIQUE INDEX "UQE_access_token_token_hash" ON public.access_token USING btree (token_hash);