diff --git a/src/Backend/UserTable.sql b/src/Backend/UserTable.sql index 7bd8fa9..9bbb6a8 100644 --- a/src/Backend/UserTable.sql +++ b/src/Backend/UserTable.sql @@ -1,6 +1,17 @@ -create table Users( - Id serial primary key, - username character varying(32), - ChatId bigint not null, - constraint chat_id_unique unique(ChatId) -); \ No newline at end of file +-- Table: public.users + +-- DROP TABLE IF EXISTS public.users; + +CREATE TABLE IF NOT EXISTS public.users +( + id integer NOT NULL DEFAULT nextval('users_id_seq'::regclass), + chat_id bigint NOT NULL, + images_amount bigint, + CONSTRAINT users_pkey PRIMARY KEY (id), + CONSTRAINT chat_id_unique UNIQUE (chat_id) +) + +TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.users + OWNER to postgres_user; \ No newline at end of file