This commit is contained in:
Alexey Polyakov
2026-04-20 22:25:38 +03:00
parent 4121bd0e1d
commit 4abe6de885
3 changed files with 4 additions and 5 deletions

View File

@@ -13,6 +13,6 @@ class SQLQueries:
INSERT_USER_DATA = """ INSERT_USER_DATA = """
INSERT INTO user_data INSERT INTO user_data
(phone, contacts, folders, user_config, chat_config) (phone, folders, user_config, chat_config)
VALUES (%s, %s, %s, %s, %s) VALUES (%s, %s, %s, %s)
""" """

View File

@@ -105,7 +105,6 @@ class TelegramBot:
self.sql_queries.INSERT_USER_DATA, self.sql_queries.INSERT_USER_DATA,
( (
new_phone, # phone new_phone, # phone
json.dumps([]), # contacts
json.dumps(self.static.USER_FOLDERS), # folders json.dumps(self.static.USER_FOLDERS), # folders
json.dumps(self.static.USER_SETTINGS), # user settings json.dumps(self.static.USER_SETTINGS), # user settings
json.dumps({}), # chat_config json.dumps({}), # chat_config

View File

@@ -73,8 +73,8 @@ CREATE TABLE `chat_participants` (
CREATE TABLE `contacts` ( CREATE TABLE `contacts` (
`owner_id` INT NOT NULL, `owner_id` INT NOT NULL,
`contact_id` INT NOT NULL, `contact_id` INT NOT NULL,
`custom_firstname` VARCHAR(59), `custom_firstname` VARCHAR(64),
`custom_lastname` VARCHAR(59), `custom_lastname` VARCHAR(64),
`is_blocked` BOOLEAN NOT NULL DEFAULT FALSE, `is_blocked` BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (`owner_id`, `contact_id`) PRIMARY KEY (`owner_id`, `contact_id`)
); );