diff --git a/ensure_db.py b/ensure_db.py index fcd9d6a..94eed26 100644 --- a/ensure_db.py +++ b/ensure_db.py @@ -83,7 +83,8 @@ def ensure_database_structure(): tg_poll_results TEXT DEFAULT '', is_event BOOLEAN DEFAULT 0, shortname VARCHAR(100), - action_number BIGINT NULL + action_number BIGINT NULL, + auto_unit VARCHAR(255) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ''', 'marks': ''' @@ -178,6 +179,9 @@ def ensure_database_structure(): # Проверка и добавление новых полей в существующие таблицы table_alterations = { + 'posts': [ + {'column': 'auto_unit', 'type': 'VARCHAR(255)'} + ], 'marks': [ {'column': 'autolink', 'type': 'BOOLEAN DEFAULT 0'}, {'column': 'reminded_at', 'type': 'DATETIME NULL'}