This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
l9_stud_bot/database/tg.sql

19 lines
721 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- Сведения о пользователях бота Telegram
CREATE TABLE IF NOT EXISTS `tg_users` (
`l9Id` bigint NOT NULL,
-- Идентификатор пользователя системы
`tgId` bigint NOT NULL,
-- ID пользователя в Telegram
`name` TEXT,
-- (optional) Имя пользователя в Telegram
`posTag` varchar(30) DEFAULT 'not_started',
-- Позиция пользователя в диалоге с ботом:
-- (default) not_started - только что в диалог
-- add - добавляет группу
PRIMARY KEY (`l9Id`),
CONSTRAINT `l9_tg` FOREIGN KEY (`l9Id`) REFERENCES `users` (`l9Id`) ON DELETE CASCADE ON UPDATE CASCADE
);