-- Base de datos: mi_red
-- Servidor: 10.10.4.17:3390

CREATE DATABASE IF NOT EXISTS mi_red;
USE mi_red;

CREATE TABLE IF NOT EXISTS guild_languages (
    guild_id BIGINT NOT NULL,
    lang_code VARCHAR(10) NOT NULL,
    PRIMARY KEY (guild_id, lang_code)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS bot_config (
    `key` VARCHAR(255) NOT NULL,
    value TEXT,
    PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS available_languages (
    code VARCHAR(10) NOT NULL,
    name VARCHAR(100) NOT NULL,
    flag VARCHAR(20),
    PRIMARY KEY (code)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS bot_languages (
    bot_type VARCHAR(50) NOT NULL,
    lang_code VARCHAR(10) NOT NULL,
    PRIMARY KEY (bot_type, lang_code)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
