Telegram drin

This commit is contained in:
2026-04-04 20:07:41 +02:00
parent 7a41d3ebc9
commit 976e80c992
6 changed files with 446 additions and 0 deletions
+6
View File
@@ -26,6 +26,11 @@ CREATE TABLE IF NOT EXISTS `app_users` (
`email` varchar(190) NOT NULL,
`password_hash` varchar(255) NOT NULL,
`display_name` varchar(100) DEFAULT NULL,
`telegram_username` varchar(32) DEFAULT NULL,
`telegram_chat_id` varchar(20) DEFAULT NULL,
`telegram_link_token` varchar(64) DEFAULT NULL,
`telegram_link_token_expires_at` datetime DEFAULT NULL,
`telegram_connected_at` datetime DEFAULT NULL,
`role` varchar(32) NOT NULL DEFAULT 'user',
`is_active` tinyint(1) NOT NULL DEFAULT 0,
`last_login_at` datetime DEFAULT NULL,
@@ -34,6 +39,7 @@ CREATE TABLE IF NOT EXISTS `app_users` (
PRIMARY KEY (`id`),
UNIQUE KEY `uq_app_users_username` (`username`),
UNIQUE KEY `uq_app_users_email` (`email`),
UNIQUE KEY `uq_app_users_telegram_link_token` (`telegram_link_token`),
KEY `idx_app_users_role` (`role`),
KEY `idx_app_users_is_active` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;