From 9e96fd247fb1ee2a4180ce562ddbe84eb22e0dab Mon Sep 17 00:00:00 2001 From: n0one Date: Mon, 4 Aug 2025 16:35:04 +0300 Subject: [PATCH] Update src/Backend/UserTable.sql --- src/Backend/UserTable.sql | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) 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