-- public_html/lib/sql/admins_table.sql
-- This is for the MAIN DB (fibiland_fibiyarmaindb)

CREATE TABLE IF NOT EXISTS `admins` (
    `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
    `project_name`       VARCHAR(191) NOT NULL,
    `user_chat_id`       BIGINT NOT NULL,
    `botfather_api_key`  VARCHAR(255) NOT NULL,
    `db_name`            VARCHAR(191) NOT NULL,
    `database_username`  VARCHAR(191) NOT NULL,
    `database_password`  VARCHAR(191) NOT NULL,
    `website_url`        VARCHAR(255) NOT NULL,
    `api_secret`         VARCHAR(255) NOT NULL,
    `created_at`         TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    UNIQUE KEY `uniq_user_chat_id` (`user_chat_id`),
    UNIQUE KEY `uniq_website_url` (`website_url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
