28 lines
671 B
Python
28 lines
671 B
Python
TELEGRAM_USER_MATRIX_CHATS_SQL = """
|
|
CREATE TABLE IF NOT EXISTS telegram_user_matrix_chats (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
telegram_user_id INTEGER NOT NULL,
|
|
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),
|
|
avatar_hash BLOB,
|
|
);
|
|
"""
|
|
|
|
MATRIX_ROOMS_SQL = """
|
|
CREATE TABLE IF NOT EXISTS telegram_users
|
|
(
|
|
id TEXT PRIMARY KEY NOT NULL
|
|
);
|
|
"""
|