From f31af9a2e77f9d4aee8228de8245f5468dd5d81e Mon Sep 17 00:00:00 2001 From: Sanders Date: Thu, 13 Feb 2025 17:51:45 +0300 Subject: [PATCH] small fix --- create.sql | 1234 ---------------------------------------------------- 1 file changed, 1234 deletions(-) delete mode 100644 create.sql diff --git a/create.sql b/create.sql deleted file mode 100644 index 47cbaca..0000000 --- a/create.sql +++ /dev/null @@ -1,1234 +0,0 @@ -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; - - create table books ( - rating integer, - bot_user_id bigint, - id bigint generated by default as identity, - author varchar(255), - title varchar(255), - primary key (id) - ); - - create table bot_user ( - chat_id bigint, - created_date_time timestamp(6), - id bigint not null, - user_type varchar(255) check (user_type in ('USER','ADMIN')), - working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), - primary key (id) - ); - - create table messages ( - bot_user_id bigint, - created_at timestamp(6), - id bigint generated by default as identity, - content TEXT, - type varchar(255) check (type in ('TEXT','FILE','COMMAND')), - primary key (id) - ); - - alter table if exists books - add constraint FKa9x6empm1nnnicld7s6v8yipr - foreign key (bot_user_id) - references bot_user; - - alter table if exists messages - add constraint FKbaqitbc8w0203kqcxcj88wfn9 - foreign key (bot_user_id) - references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user; -create table books (rating integer, bot_user_id bigint, id bigint generated by default as identity, author varchar(255), title varchar(255), primary key (id)); -create table bot_user (chat_id bigint, created_date_time timestamp(6), id bigint not null, user_type varchar(255) check (user_type in ('USER','ADMIN')), working_mode varchar(255) check (working_mode in ('BOOK','TORRENT','AI','NO_MODE')), primary key (id)); -create table messages (bot_user_id bigint, created_at timestamp(6), id bigint generated by default as identity, content TEXT, type varchar(255) check (type in ('TEXT','FILE','COMMAND')), primary key (id)); -alter table if exists books add constraint FKa9x6empm1nnnicld7s6v8yipr foreign key (bot_user_id) references bot_user; -alter table if exists messages add constraint FKbaqitbc8w0203kqcxcj88wfn9 foreign key (bot_user_id) references bot_user;