27 lines
650 B
Python
27 lines
650 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),
|
|
);
|
|
"""
|
|
|
|
MATRIX_ROOMS_SQL = """
|
|
CREATE TABLE IF NOT EXISTS telegram_users
|
|
(
|
|
id TEXT PRIMARY KEY NOT NULL
|
|
);
|
|
"""
|