1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
def 8556316cd8 fix: delete CHECK from telegram_users 2023-01-09 01:15:22 +03:00
def b5e57e80e9 add telegram_users table 2023-01-09 01:13:27 +03:00
1 changed files with 12 additions and 1 deletions

View File

@ -13,9 +13,20 @@ CREATE TABLE IF NOT EXISTS telegram_user_matrix_chats (
matrix_chat_id INTEGER NOT NULL,
FOREIGN KEY(telegram_user_id) REFERENCES telegram_users(id),
FOREIGN KEY(matrix_chat_id) REFERENCES matrix_chats(id)
)
);
'''
TELEGRAM_USERS_SQL = '''
CREATE TABLE IF NOT EXISTS telegram_users
(
id INTEGER PRIMARY KEY NOT NULL (15),
first_name TEXT NOT NULL (50),
last_name TEXT (50),
username TEXT (50),
);
'''
def main():
config = Config(
db_path=os.environ['DB_PATH'],