From bf3b474ee178ff0cd201fa0b59fa454a84ead7ed Mon Sep 17 00:00:00 2001 From: root Date: Sun, 24 May 2026 18:43:57 +0200 Subject: [PATCH] feat: complete configuration and database upgrade to native mariadb driver --- .env.example | 2 +- .env.standard | 5 +- config/database.php | 7 +- database/schema/mariadb-schema.sql | 5384 ++++++++++++++++++++++++++++ database/schema/mysql-schema.sql | 1932 +++++++++- 5 files changed, 7181 insertions(+), 149 deletions(-) create mode 100644 database/schema/mariadb-schema.sql diff --git a/.env.example b/.env.example index 211038e..a4bb7ad 100755 --- a/.env.example +++ b/.env.example @@ -14,7 +14,7 @@ APP_URL=http://localhost # ========================================== # DATABASE - Works on Linux & Windows # ========================================== -DB_CONNECTION=mysql +DB_CONNECTION=mariadb DB_HOST=127.0.0.1 # Linux: 127.0.0.1, Windows XAMPP: localhost DB_PORT=3306 DB_DATABASE=habbo diff --git a/.env.standard b/.env.standard index 15e590f..cc15a7f 100755 --- a/.env.standard +++ b/.env.standard @@ -10,7 +10,7 @@ LOG_MAX_FILES=14 LOG_LEVEL=error # --- DATABASE --- -DB_CONNECTION=mysql +DB_CONNECTION=mariadb DB_HOST=YOUR_DB_HOST DB_PORT=3306 DB_DATABASE=YOUR_DB_NAME @@ -20,6 +20,7 @@ DB_STRICT_MODE=true DB_ENGINE=InnoDB DB_CHARSET=utf8mb4 DB_COLLATION=utf8mb4_unicode_ci +DB_DUMP_BINARY_PATH=/usr/bin/ # --- REDIS TURBO --- BROADCAST_DRIVER=redis @@ -60,4 +61,4 @@ EMULATOR_PORT=3000 # --- EXTRA HARDENING --- APP_LOCALE=nl FORCE_HTTPS=true -PASSWORD_RESET_TOKEN_TIME=15 +PASSWORD_RESET_TOKEN_TIME=15 \ No newline at end of file diff --git a/config/database.php b/config/database.php index cf388b0..751c5bf 100755 --- a/config/database.php +++ b/config/database.php @@ -80,6 +80,9 @@ return [ 'options' => extension_loaded('pdo_mysql') ? array_filter([ Mysql::ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], + 'dump' => [ + 'add_extra_option' => '--skip-column-statistics', + ], ], 'pgsql' => [ @@ -154,7 +157,7 @@ return [ 'username' => env('REDIS_USERNAME'), 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_DB', '0'), + 'database' => env('DB_REDIS_DB', '0'), 'read_timeout' => env('REDIS_READ_TIMEOUT', 1.0), 'persistent' => env('REDIS_PERSISTENT', true), ], @@ -172,4 +175,4 @@ return [ ], -]; +]; \ No newline at end of file diff --git a/database/schema/mariadb-schema.sql b/database/schema/mariadb-schema.sql new file mode 100644 index 0000000..97f1d40 --- /dev/null +++ b/database/schema/mariadb-schema.sql @@ -0,0 +1,5384 @@ +/*M!999999\- enable the sandbox mode */ +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */; +DROP TABLE IF EXISTS `achievements`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `achievements` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(64) NOT NULL DEFAULT 'ACH_', + `category` enum('identity','explore','music','social','games','room_builder','pets','tools','events') NOT NULL DEFAULT 'identity', + `level` int(11) NOT NULL DEFAULT 1, + `reward_amount` int(11) NOT NULL DEFAULT 100, + `reward_type` int(11) NOT NULL DEFAULT 0, + `points` int(11) DEFAULT 10, + `progress_needed` int(11) NOT NULL DEFAULT 1, + PRIMARY KEY (`name`,`level`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `achievements_talents`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `achievements_talents` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` enum('citizenship','helper') NOT NULL DEFAULT 'citizenship', + `level` int(11) NOT NULL DEFAULT 0, + `achievement_ids` varchar(100) NOT NULL DEFAULT '', + `achievement_levels` varchar(100) NOT NULL DEFAULT '', + `reward_furni` varchar(100) NOT NULL DEFAULT '', + `reward_perks` varchar(100) NOT NULL DEFAULT '', + `reward_badges` varchar(100) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `action_events`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `action_events` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `batch_id` char(36) NOT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `actionable_type` varchar(255) NOT NULL, + `actionable_id` varchar(36) NOT NULL, + `target_type` varchar(255) NOT NULL, + `target_id` varchar(36) NOT NULL, + `model_type` varchar(255) NOT NULL, + `model_id` varchar(36) NOT NULL, + `fields` text NOT NULL, + `status` varchar(25) NOT NULL DEFAULT 'running', + `exception` text NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `original` mediumtext DEFAULT NULL, + `changes` mediumtext DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `action_events_actionable_type_actionable_id_index` (`actionable_type`,`actionable_id`) USING BTREE, + KEY `action_events_target_type_target_id_index` (`target_type`,`target_id`) USING BTREE, + KEY `action_events_batch_id_model_type_model_id_index` (`batch_id`,`model_type`,`model_id`) USING BTREE, + KEY `action_events_user_id_index` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `activity_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `activity_log` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `log_name` varchar(255) DEFAULT NULL, + `attribute_changes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`attribute_changes`)), + `description` text NOT NULL, + `subject_type` varchar(255) DEFAULT NULL, + `event` varchar(255) DEFAULT NULL, + `subject_id` varchar(255) NOT NULL, + `causer_type` varchar(255) DEFAULT NULL, + `causer_id` bigint(20) unsigned DEFAULT NULL, + `properties` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, + `batch_uuid` char(36) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `subject` (`subject_type`,`subject_id`) USING BTREE, + KEY `causer` (`causer_type`,`causer_id`) USING BTREE, + KEY `activity_log_log_name_index` (`log_name`) USING BTREE, + KEY `activity_subject_index` (`subject_id`), + KEY `activity_causer_index` (`causer_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ai_hotel_manager_actions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ai_hotel_manager_actions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `insight_id` bigint(20) unsigned DEFAULT NULL, + `type` varchar(255) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `status` varchar(255) NOT NULL DEFAULT 'pending', + `executed_at` timestamp NULL DEFAULT NULL, + `completed_at` timestamp NULL DEFAULT NULL, + `result` text DEFAULT NULL, + `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)), + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `ai_hotel_manager_actions_insight_id_foreign` (`insight_id`), + KEY `ai_hotel_manager_actions_type_index` (`type`), + KEY `ai_hotel_manager_actions_status_index` (`status`), + KEY `ai_hotel_manager_actions_executed_at_index` (`executed_at`), + CONSTRAINT `ai_hotel_manager_actions_insight_id_foreign` FOREIGN KEY (`insight_id`) REFERENCES `ai_hotel_manager_insights` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ai_hotel_manager_insights`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ai_hotel_manager_insights` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `category` varchar(255) NOT NULL, + `severity` varchar(255) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `affected_entity_type` varchar(255) DEFAULT NULL, + `affected_entity_id` varchar(255) DEFAULT NULL, + `score` double NOT NULL DEFAULT 0, + `status` varchar(255) NOT NULL DEFAULT 'open', + `detected_at` timestamp NOT NULL, + `resolved_at` timestamp NULL DEFAULT NULL, + `resolution_notes` text DEFAULT NULL, + `context` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`context`)), + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `ai_hotel_manager_insights_category_index` (`category`), + KEY `ai_hotel_manager_insights_severity_index` (`severity`), + KEY `ai_hotel_manager_insights_status_index` (`status`), + KEY `ai_hotel_manager_insights_score_index` (`score`), + KEY `ai_hotel_manager_insights_detected_at_index` (`detected_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ai_hotel_manager_metrics`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ai_hotel_manager_metrics` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `category` varchar(255) NOT NULL, + `metric_key` varchar(255) NOT NULL, + `metric_value` double NOT NULL, + `labels` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`labels`)), + `captured_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `ai_hotel_manager_metrics_category_index` (`category`), + KEY `ai_hotel_manager_metrics_metric_key_index` (`metric_key`), + KEY `ai_hotel_manager_metrics_captured_at_index` (`captured_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `alert_logs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `alert_logs` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(255) NOT NULL, + `severity` varchar(255) NOT NULL, + `message` text NOT NULL, + `context` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`context`)), + `sent_via_email` tinyint(1) NOT NULL DEFAULT 0, + `sent_via_discord` tinyint(1) NOT NULL DEFAULT 0, + `is_read` tinyint(1) NOT NULL DEFAULT 0, + `read_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `alert_logs_type_created_at_index` (`type`,`created_at`), + KEY `alert_logs_severity_created_at_index` (`severity`,`created_at`), + KEY `alert_logs_is_read_index` (`is_read`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `article_comments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `article_comments` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `article_id` bigint(20) unsigned NOT NULL, + `content` text NOT NULL, + `visible` tinyint(1) NOT NULL DEFAULT 1, + `fixed` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `article_reactions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `article_reactions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `article_id` bigint(20) unsigned NOT NULL, + `type` varchar(10) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `articles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `articles` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `content` longtext NOT NULL, + `slug` varchar(255) NOT NULL, + `image` varchar(255) NOT NULL, + `is_promotion` tinyint(1) NOT NULL DEFAULT 0, + `promotion_ends_at` timestamp NULL DEFAULT NULL, + `visible` tinyint(1) NOT NULL DEFAULT 1, + `fixed` tinyint(1) NOT NULL DEFAULT 0, + `predominant_color` varchar(10) DEFAULT NULL, + `allow_comments` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `articles_slug_index` (`slug`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `author_notifications`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `author_notifications` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `author_id` bigint(20) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `badges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `badges` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `code` varchar(255) NOT NULL, + `file` varchar(255) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `badges_code_unique` (`code`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `banned_usernames`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `banned_usernames` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `username` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `banned_usernames_username_unique` (`username`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bans`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `bans` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `ip` varchar(50) NOT NULL DEFAULT '', + `machine_id` varchar(255) NOT NULL DEFAULT '', + `user_staff_id` int(11) NOT NULL, + `timestamp` int(11) NOT NULL, + `ban_expire` int(11) NOT NULL DEFAULT 0, + `ban_reason` varchar(200) NOT NULL DEFAULT '', + `type` enum('account','ip','machine','super') NOT NULL DEFAULT 'account' COMMENT 'Account is the entry in the users table banned.\nIP is any client that connects with that IP.\nMachine is the computer that logged in.\nSuper is all of the above.', + `cfh_topic` int(11) NOT NULL DEFAULT -1, + PRIMARY KEY (`id`) USING BTREE, + KEY `user_data` (`user_id`,`ip`,`machine_id`,`ban_expire`,`timestamp`,`ban_reason`) USING BTREE, + KEY `general` (`id`,`type`) USING BTREE, + KEY `idx_bans_user_id` (`user_id`), + KEY `idx_bans_ip` (`ip`), + KEY `idx_bans_machine_id` (`machine_id`(64)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bot_serves`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `bot_serves` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `Keys` varchar(255) DEFAULT NULL, + `item` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bots`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `bots` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL DEFAULT 0, + `room_id` int(11) NOT NULL DEFAULT 0, + `name` varchar(25) NOT NULL DEFAULT '', + `motto` varchar(100) NOT NULL DEFAULT '', + `figure` varchar(500) NOT NULL DEFAULT '', + `gender` enum('M','F') NOT NULL DEFAULT 'M', + `x` int(11) NOT NULL DEFAULT 0, + `y` int(11) NOT NULL DEFAULT 0, + `z` double(11,1) NOT NULL DEFAULT 0.0, + `rot` int(11) NOT NULL DEFAULT 0, + `chat_lines` varchar(5112) NOT NULL DEFAULT '', + `chat_auto` enum('0','1') NOT NULL DEFAULT '1', + `chat_random` enum('0','1') NOT NULL DEFAULT '1', + `chat_delay` int(11) NOT NULL DEFAULT 5, + `dance` int(11) NOT NULL DEFAULT 0, + `freeroam` enum('0','1') NOT NULL DEFAULT '0', + `type` enum('generic','visitor_log','bartender','weapons_dealer') NOT NULL DEFAULT 'generic', + `effect` int(11) NOT NULL DEFAULT 0, + `bubble_id` int(11) DEFAULT 31, + PRIMARY KEY (`id`) USING BTREE, + KEY `general_data` (`id`,`user_id`,`room_id`,`name`,`motto`,`gender`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `builders_club_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `builders_club_items` ( + `item_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `room_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`item_id`), + KEY `idx_builders_club_items_user_id` (`user_id`), + KEY `idx_builders_club_items_room_id` (`room_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `cache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `cache` ( + `key` varchar(255) NOT NULL, + `value` mediumtext NOT NULL, + `expiration` int(11) NOT NULL, + PRIMARY KEY (`key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `cache_locks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `cache_locks` ( + `key` varchar(255) NOT NULL, + `owner` varchar(255) NOT NULL, + `expiration` int(11) NOT NULL, + PRIMARY KEY (`key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `calendar_campaigns`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `calendar_campaigns` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `image` varchar(255) NOT NULL DEFAULT '', + `start_timestamp` int(11) NOT NULL DEFAULT 0, + `total_days` int(11) NOT NULL DEFAULT 30, + `lock_expired` enum('1','0') NOT NULL DEFAULT '1', + `enabled` enum('1','0') NOT NULL DEFAULT '1', + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `calendar_rewards`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `calendar_rewards` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `campaign_id` int(11) NOT NULL DEFAULT 0, + `product_name` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', + `custom_image` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', + `credits` int(11) NOT NULL DEFAULT 0, + `pixels` int(11) NOT NULL DEFAULT 0, + `points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0, + `badge` varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', + `item_id` int(11) NOT NULL DEFAULT 0, + `subscription_type` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '', + `subscription_days` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_calendar_rewards_campaign_id` (`campaign_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `calendar_rewards_claimed`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `calendar_rewards_claimed` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `campaign_id` int(11) NOT NULL DEFAULT 0, + `day` int(11) NOT NULL, + `reward_id` int(11) NOT NULL, + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_cal_claimed_user_id` (`user_id`), + KEY `idx_cal_claimed_campaign_id` (`campaign_id`), + KEY `idx_cal_claimed_reward_id` (`reward_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `camera_likes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `camera_likes` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `camera_id` bigint(20) unsigned NOT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `liked` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `camera_web`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `camera_web` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `room_id` int(11) NOT NULL DEFAULT 0, + `timestamp` int(11) NOT NULL, + `url` varchar(128) NOT NULL DEFAULT '', + `approved` tinyint(1) NOT NULL DEFAULT 0, + `visible` tinyint(1) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `camera_web_reactions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `camera_web_reactions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `camera_web_id` bigint(20) unsigned NOT NULL, + `reaction` varchar(50) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `camera_web_views`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `camera_web_views` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `camera_id` bigint(20) unsigned NOT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_clothing`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_clothing` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(75) NOT NULL, + `setid` varchar(75) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_club_offers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_club_offers` ( + `id` int(11) NOT NULL, + `enabled` enum('0','1') NOT NULL DEFAULT '1', + `name` varchar(35) NOT NULL, + `days` int(11) NOT NULL, + `credits` int(11) NOT NULL DEFAULT 10, + `points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0, + `type` enum('HC','VIP','BUILDERS_CLUB','BUILDERS_CLUB_ADDON') NOT NULL DEFAULT 'HC', + `deal` enum('0','1') NOT NULL DEFAULT '0', + `giftable` enum('1','0') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_featured_pages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_featured_pages` ( + `slot_id` int(11) NOT NULL, + `image` varchar(70) NOT NULL DEFAULT '', + `caption` varchar(130) NOT NULL DEFAULT '', + `type` enum('page_name','page_id','product_name') NOT NULL DEFAULT 'page_name', + `expire_timestamp` int(11) NOT NULL DEFAULT -1, + `page_name` varchar(30) NOT NULL DEFAULT '', + `page_id` int(11) NOT NULL DEFAULT 0, + `product_name` varchar(40) NOT NULL DEFAULT '', + PRIMARY KEY (`slot_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_images`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_images` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `file` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `catalog_images_file_unique` (`file`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `item_ids` varchar(666) NOT NULL DEFAULT '0', + `page_id` int(11) NOT NULL DEFAULT 14, + `offer_id` int(11) NOT NULL DEFAULT -1, + `song_id` int(10) unsigned NOT NULL DEFAULT 0, + `order_number` int(11) NOT NULL DEFAULT 1, + `catalog_name` varchar(100) NOT NULL DEFAULT '0', + `cost_credits` int(11) NOT NULL DEFAULT 3, + `cost_points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0 COMMENT '0 for duckets; 5 for diamonds; and any seasonal/GOTW currencies you have in your emu_settings table.', + `amount` int(11) NOT NULL DEFAULT 1, + `limited_sells` int(11) NOT NULL DEFAULT 0 COMMENT 'This automatically logs from the emu; do not change it.', + `limited_stack` int(11) NOT NULL DEFAULT 0 COMMENT 'Change this number to make the item limited.', + `extradata` varchar(500) NOT NULL DEFAULT '', + `badge` varchar(500) DEFAULT NULL, + `have_offer` enum('0','1') NOT NULL DEFAULT '1', + `club_only` enum('0','1') NOT NULL DEFAULT '0', + `rate` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`,`extradata`) USING BTREE, + KEY `page_id` (`page_id`) USING BTREE, + KEY `catalog_name` (`catalog_name`) USING BTREE, + KEY `costs` (`cost_credits`,`cost_points`,`points_type`) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `item_ids` (`item_ids`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_items-oud`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_items-oud` ( + `id` int(11) NOT NULL DEFAULT 0, + `item_ids` varchar(666) NOT NULL, + `page_id` int(11) NOT NULL, + `catalog_name` varchar(100) NOT NULL, + `cost_credits` int(11) NOT NULL DEFAULT 3, + `cost_points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0 COMMENT '0 for duckets; 5 for diamonds; and any seasonal/GOTW currencies you have in your emu_settings table.', + `amount` int(11) NOT NULL DEFAULT 1, + `limited_stack` int(11) NOT NULL DEFAULT 0 COMMENT 'Change this number to make the item limited.', + `limited_sells` int(11) NOT NULL DEFAULT 0 COMMENT 'This automatically logs from the emu; do not change it.', + `order_number` int(11) NOT NULL DEFAULT 1, + `offer_id` int(11) NOT NULL DEFAULT -1, + `song_id` int(10) unsigned NOT NULL DEFAULT 0, + `extradata` varchar(500) NOT NULL DEFAULT '', + `have_offer` enum('0','1') NOT NULL DEFAULT '1', + `club_only` enum('0','1') NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_items_bc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_items_bc` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `item_ids` varchar(666) NOT NULL, + `page_id` int(11) NOT NULL, + `catalog_name` varchar(100) NOT NULL, + `order_number` int(11) NOT NULL DEFAULT 1, + `extradata` varchar(500) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_items_limited`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_items_limited` ( + `catalog_item_id` int(11) NOT NULL, + `number` int(11) NOT NULL, + `user_id` int(11) NOT NULL DEFAULT 0, + `timestamp` int(11) NOT NULL DEFAULT 0, + `item_id` int(11) NOT NULL DEFAULT 0, + UNIQUE KEY `catalog_item_id` (`catalog_item_id`,`number`) USING BTREE, + KEY `user_timestamp_index` (`user_id`,`timestamp`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_items_oud`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_items_oud` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `item_ids` varchar(666) NOT NULL, + `page_id` int(11) NOT NULL, + `catalog_name` varchar(100) NOT NULL, + `cost_credits` int(11) NOT NULL DEFAULT 3, + `cost_points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0 COMMENT '0 for duckets; 5 for diamonds; and any seasonal/GOTW currencies you have in your emu_settings table.', + `amount` int(11) NOT NULL DEFAULT 1, + `limited_stack` int(11) NOT NULL DEFAULT 0 COMMENT 'Change this number to make the item limited.', + `limited_sells` int(11) NOT NULL DEFAULT 0 COMMENT 'This automatically logs from the emu; do not change it.', + `order_number` int(11) NOT NULL DEFAULT 1, + `offer_id` int(11) NOT NULL DEFAULT -1, + `song_id` int(10) unsigned NOT NULL DEFAULT 0, + `extradata` varchar(500) NOT NULL DEFAULT '', + `have_offer` enum('0','1') NOT NULL DEFAULT '1', + `club_only` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE, + KEY `page_id` (`page_id`) USING BTREE, + KEY `catalog_name` (`catalog_name`) USING BTREE, + KEY `costs` (`cost_credits`,`cost_points`,`points_type`) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `item_ids` (`item_ids`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_pages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_pages` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `parent_id` int(11) NOT NULL DEFAULT -1, + `caption_save` varchar(128) NOT NULL DEFAULT '', + `caption` varchar(128) NOT NULL, + `page_layout` enum('default_3x3','club_buy','club_gift','frontpage','spaces','recycler','recycler_info','recycler_prizes','trophies','plasto','marketplace','marketplace_own_items','spaces_new','soundmachine','guilds','guild_furni','info_duckets','info_rentables','info_pets','roomads','single_bundle','sold_ltd_items','badge_display','bots','pets','pets2','pets3','productpage1','room_bundle','recent_purchases','default_3x3_color_grouping','guild_forum','vip_buy','info_loyalty','loyalty_vip_buy','collectibles','petcustomization','frontpage_featured') NOT NULL DEFAULT 'default_3x3', + `icon_color` int(11) NOT NULL DEFAULT 1, + `icon_image` int(11) NOT NULL DEFAULT 1, + `min_rank` int(11) NOT NULL DEFAULT 1, + `order_num` int(11) NOT NULL DEFAULT 1, + `visible` enum('0','1') NOT NULL DEFAULT '1', + `enabled` enum('0','1') NOT NULL DEFAULT '1', + `club_only` enum('0','1') NOT NULL DEFAULT '0', + `vip_only` enum('1','0') NOT NULL DEFAULT '0', + `page_headline` varchar(1024) NOT NULL DEFAULT '', + `page_teaser` varchar(64) NOT NULL DEFAULT '', + `page_special` varchar(2048) DEFAULT '' COMMENT 'Gold Bubble: catalog_special_txtbg1 // Speech Bubble: catalog_special_txtbg2 // Place normal text in page_text_teaser', + `page_text1` text DEFAULT NULL, + `page_text2` text DEFAULT NULL, + `page_text_details` text DEFAULT NULL, + `page_text_teaser` text DEFAULT NULL, + `room_id` int(11) DEFAULT 0, + `includes` varchar(128) NOT NULL DEFAULT '' COMMENT 'Example usage: 1;2;3\r\n This will include page 1, 2 and 3 in the current page.\r\n Note that permissions are only used for the current entry.', + `catalog_mode` enum('NORMAL','BUILDER','BOTH') NOT NULL DEFAULT 'NORMAL', + PRIMARY KEY (`id`) USING BTREE, + KEY `id` (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_pages_bc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_pages_bc` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `parent_id` int(11) NOT NULL DEFAULT -1, + `caption` varchar(128) NOT NULL, + `page_layout` enum('default_3x3','club_buy','club_gift','frontpage','spaces','recycler','recycler_info','recycler_prizes','trophies','plasto','marketplace','marketplace_own_items','spaces_new','soundmachine','guilds','guild_furni','info_duckets','info_rentables','info_pets','roomads','single_bundle','sold_ltd_items','badge_display','bots','pets','pets2','pets3','productpage1','room_bundle','recent_purchases','default_3x3_color_grouping','guild_forum','vip_buy','info_loyalty','loyalty_vip_buy','collectibles','petcustomization','frontpage_featured','builders_club_frontpage','builders_club_addons','builders_club_loyalty') NOT NULL DEFAULT 'default_3x3', + `icon_color` int(11) NOT NULL DEFAULT 1, + `icon_image` int(11) NOT NULL DEFAULT 1, + `order_num` int(11) NOT NULL DEFAULT 1, + `visible` enum('0','1') NOT NULL DEFAULT '1', + `enabled` enum('0','1') NOT NULL DEFAULT '1', + `page_headline` varchar(1024) NOT NULL DEFAULT '', + `page_teaser` varchar(64) NOT NULL DEFAULT '', + `page_special` varchar(2048) DEFAULT '' COMMENT 'Gold Bubble: catalog_special_txtbg1 // Speech Bubble: catalog_special_txtbg2 // Place normal text in page_text_teaser', + `page_text1` text DEFAULT NULL, + `page_text2` text DEFAULT NULL, + `page_text_details` text DEFAULT NULL, + `page_text_teaser` text DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_products`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_products` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `offer_id` int(10) unsigned NOT NULL, + `item_id` int(10) unsigned NOT NULL, + `cost_credits` int(10) unsigned NOT NULL DEFAULT 0, + `cost_points` int(10) unsigned NOT NULL DEFAULT 0, + `points_type` tinyint(3) unsigned NOT NULL DEFAULT 0, + `amount` tinyint(3) unsigned NOT NULL DEFAULT 1, + `limited_sells` tinyint(3) unsigned NOT NULL DEFAULT 0, + `limited_stack` int(10) unsigned NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_target_offers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_target_offers` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `offer_code` varchar(32) NOT NULL, + `title` varchar(128) NOT NULL DEFAULT '', + `description` varchar(2048) NOT NULL DEFAULT '', + `image` varchar(128) NOT NULL, + `icon` varchar(128) NOT NULL, + `end_timestamp` int(11) NOT NULL, + `credits` int(11) NOT NULL DEFAULT 10, + `points` int(11) NOT NULL DEFAULT 10, + `points_type` int(11) NOT NULL DEFAULT 5, + `purchase_limit` int(11) NOT NULL DEFAULT 5, + `catalog_item` int(11) NOT NULL, + `vars` varchar(1024) NOT NULL DEFAULT '' COMMENT 'List of strings seperated by a ;', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `chat_bubbles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `chat_bubbles` ( + `type` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Only 46 and higher will work', + `name` varchar(255) NOT NULL DEFAULT '', + `permission` varchar(255) NOT NULL DEFAULT '', + `overridable` tinyint(1) NOT NULL DEFAULT 1, + `triggers_talking_furniture` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`type`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `chatlogs_private`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `chatlogs_private` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_from_id` int(11) NOT NULL, + `user_to_id` int(11) NOT NULL, + `message` varchar(255) NOT NULL, + `timestamp` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `user_from_id` (`user_from_id`) USING BTREE, + KEY `user_to_id` (`user_to_id`) USING BTREE, + KEY `message` (`message`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `chatlogs_room`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `chatlogs_room` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `room_id` int(11) NOT NULL DEFAULT 0, + `user_from_id` int(11) NOT NULL, + `user_to_id` int(11) NOT NULL DEFAULT 0, + `message` varchar(255) NOT NULL, + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `user_from_id` (`user_from_id`) USING BTREE, + KEY `timestamp` (`timestamp`) USING BTREE, + KEY `user_to_id` (`user_to_id`) USING BTREE, + KEY `message` (`message`) USING BTREE, + KEY `room_id` (`room_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `claimed_referral_logs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `claimed_referral_logs` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `ip_address` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `claimed_referral_logs_user_id_index` (`user_id`) USING BTREE, + CONSTRAINT `claimed_referral_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `cms_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `cms_settings` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(50) NOT NULL, + `value` varchar(255) DEFAULT NULL, + `comment` varchar(255) DEFAULT NULL COMMENT 'Explain this setting here', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `cms_settings_key_unique` (`key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `cms_writeable_boxes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `cms_writeable_boxes` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `icon` varchar(255) DEFAULT NULL, + `name` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `page_target` enum('staff','shop','teams') NOT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `content` text DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `commandlogs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `commandlogs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `timestamp` int(11) NOT NULL, + `command` varchar(256) NOT NULL DEFAULT '', + `params` varchar(256) NOT NULL DEFAULT '', + `succes` enum('no','yes') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`id`), + KEY `user_id` (`user_id`) USING BTREE, + KEY `user_data` (`user_id`,`timestamp`) USING BTREE, + KEY `command` (`command`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `crafting_altars_recipes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `crafting_altars_recipes` ( + `altar_id` int(11) NOT NULL, + `recipe_id` int(11) NOT NULL, + UNIQUE KEY `altar_id` (`altar_id`,`recipe_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `crafting_recipes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `crafting_recipes` ( + `id` int(11) NOT NULL, + `product_name` varchar(64) NOT NULL COMMENT 'WARNING! This field must match a entry in your productdata or crafting WILL NOT WORK!', + `reward` int(11) NOT NULL, + `enabled` enum('0','1') NOT NULL DEFAULT '1', + `achievement` varchar(255) NOT NULL DEFAULT '', + `secret` enum('0','1') NOT NULL DEFAULT '0', + `limited` enum('0','1') NOT NULL DEFAULT '0', + `remaining` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + UNIQUE KEY `name` (`product_name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `crafting_recipes_ingredients`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `crafting_recipes_ingredients` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `recipe_id` int(11) NOT NULL, + `item_id` int(11) NOT NULL, + `amount` int(11) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `custom_nick_icons_catalog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `custom_nick_icons_catalog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `icon_key` varchar(50) NOT NULL, + `display_name` varchar(100) NOT NULL DEFAULT '', + `points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0, + `enabled` tinyint(1) NOT NULL DEFAULT 1, + `sort_order` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_icon_key` (`icon_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `custom_prefix_blacklist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `custom_prefix_blacklist` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `word` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_word` (`word`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `custom_prefix_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `custom_prefix_settings` ( + `key_name` varchar(100) NOT NULL, + `value` varchar(255) NOT NULL, + PRIMARY KEY (`key_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `custom_prefixes_catalog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `custom_prefixes_catalog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `display_name` varchar(100) NOT NULL DEFAULT '', + `text` varchar(50) NOT NULL, + `color` varchar(255) NOT NULL DEFAULT '#FFFFFF', + `icon` varchar(50) NOT NULL DEFAULT '', + `effect` varchar(50) NOT NULL DEFAULT '', + `font` varchar(50) NOT NULL DEFAULT '', + `points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0, + `enabled` tinyint(1) NOT NULL DEFAULT 1, + `sort_order` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `daily_challenges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `daily_challenges` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `description` varchar(255) NOT NULL, + `game` varchar(255) DEFAULT NULL, + `type` varchar(255) NOT NULL, + `target` int(11) NOT NULL, + `reward_currency` varchar(255) NOT NULL DEFAULT 'credits', + `reward_amount` int(11) NOT NULL, + `date` date NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `daily_challenges_date_game_index` (`date`,`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `email_templates`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `email_templates` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `subject` varchar(255) NOT NULL, + `body` text NOT NULL, + `variables` text DEFAULT NULL COMMENT 'JSON: {{username}}, {{email}}, {{site_url}}, etc.', + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `email_templates_name_unique` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `emulator_errors`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `emulator_errors` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `timestamp` int(11) NOT NULL DEFAULT 0, + `version` varchar(64) NOT NULL, + `build_hash` varchar(64) NOT NULL, + `type` varchar(32) NOT NULL DEFAULT 'Exception', + `stacktrace` blob NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `emulator_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `emulator_settings` ( + `key` varchar(100) NOT NULL, + `value` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `comment` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`key`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `emulator_sql_updates`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `emulator_sql_updates` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `file_name` varchar(255) NOT NULL, + `file_hash` varchar(255) NOT NULL, + `applied_at` timestamp NOT NULL, + `sql_content` text DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `emulator_sql_updates_file_hash_unique` (`file_hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `emulator_texts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `emulator_texts` ( + `key` varchar(100) NOT NULL, + `value` varchar(4096) NOT NULL, + PRIMARY KEY (`key`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `failed_jobs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `failed_jobs` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `uuid` varchar(255) NOT NULL, + `connection` text NOT NULL, + `queue` text NOT NULL, + `payload` longtext NOT NULL, + `exception` longtext NOT NULL, + `failed_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `furniture`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `furniture` ( + `id` int(10) unsigned NOT NULL, + `classname` varchar(100) NOT NULL, + `name` varchar(255) NOT NULL DEFAULT '', + `description` text DEFAULT NULL, + `revision` int(10) unsigned NOT NULL DEFAULT 0, + `category` tinyint(3) unsigned NOT NULL DEFAULT 0, + `price` int(10) unsigned NOT NULL DEFAULT 0, + `saleprice` int(10) unsigned NOT NULL DEFAULT 0, + `rentbuyprice` int(10) unsigned NOT NULL DEFAULT 0, + `adaptivef` tinyint(3) unsigned NOT NULL DEFAULT 0, + `extradata` text DEFAULT NULL, + `partcolors` text DEFAULT NULL, + `furniline` varchar(50) NOT NULL DEFAULT '', + `rare` tinyint(3) unsigned NOT NULL DEFAULT 0, + `offer_id` tinyint(3) unsigned DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `furniture_classname_unique` (`classname`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_chat_messages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_chat_messages` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `room_id` bigint(20) unsigned NOT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `message` text NOT NULL, + `type` varchar(255) NOT NULL DEFAULT 'chat', + `reactions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`reactions`)), + `created_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `game_chat_messages_room_id_created_at_index` (`room_id`,`created_at`), + KEY `idx_game_chat_messages_room_id` (`room_id`), + KEY `idx_game_chat_messages_room_id_id` (`room_id`,`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_invitations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_invitations` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `from_user_id` bigint(20) unsigned NOT NULL, + `to_user_id` bigint(20) unsigned NOT NULL, + `game` varchar(255) NOT NULL, + `status` varchar(255) NOT NULL DEFAULT 'pending', + `bet_amount` int(11) NOT NULL DEFAULT 0, + `bet_currency` varchar(255) NOT NULL DEFAULT 'credits', + `room_id` bigint(20) unsigned DEFAULT NULL, + `expires_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_invitations_to_user_id_status_index` (`to_user_id`,`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_level_rewards`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_level_rewards` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `game` varchar(255) NOT NULL, + `level` int(11) NOT NULL, + `reward_type` varchar(255) NOT NULL, + `reward_currency` varchar(255) DEFAULT NULL, + `reward_amount` int(11) NOT NULL DEFAULT 0, + `claimed` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_level_rewards_game_level_index` (`game`,`level`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_ranks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_ranks` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `slug` varchar(255) NOT NULL, + `icon` varchar(255) NOT NULL DEFAULT '⭐', + `color` varchar(255) NOT NULL DEFAULT '#ffffff', + `min_points` int(11) NOT NULL DEFAULT 0, + `max_points` int(11) DEFAULT NULL, + `tier` int(11) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `game_ranks_slug_unique` (`slug`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_replays`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_replays` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `game` varchar(255) NOT NULL, + `player1_id` bigint(20) unsigned NOT NULL, + `player2_id` bigint(20) unsigned DEFAULT NULL, + `game_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`game_data`)), + `moves` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`moves`)), + `winner` varchar(255) DEFAULT NULL, + `player1_score` int(11) NOT NULL DEFAULT 0, + `player2_score` int(11) NOT NULL DEFAULT 0, + `started_at` timestamp NOT NULL, + `ended_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_replays_game_created_at_index` (`game`,`created_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_reward_claims`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_reward_claims` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `game` varchar(50) NOT NULL, + `wins_required` int(11) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `game_reward_claims_user_id_game_wins_required_unique` (`user_id`,`game`,`wins_required`), + KEY `game_reward_claims_user_id_index` (`user_id`), + KEY `idx_game_reward_claims_user_id` (`user_id`), + KEY `idx_game_reward_claims_game` (`game`), + KEY `idx_game_reward_claims_user_game` (`user_id`,`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_rewards`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_rewards` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `game` varchar(50) NOT NULL DEFAULT 'all', + `wins_required` int(11) NOT NULL DEFAULT 10, + `currency` varchar(20) NOT NULL DEFAULT 'credits', + `amount` int(11) NOT NULL DEFAULT 100, + `type` enum('per_wins','milestone') NOT NULL DEFAULT 'milestone', + `enabled` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_rooms`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_rooms` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `game` varchar(50) NOT NULL, + `max_players` int(11) NOT NULL DEFAULT 2, + `player1_id` int(10) unsigned NOT NULL, + `player2_id` int(10) unsigned DEFAULT NULL, + `players` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`players`)), + `state` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`state`)), + `turn` int(10) unsigned NOT NULL DEFAULT 1, + `round` int(11) NOT NULL DEFAULT 1, + `winner_id` int(10) unsigned DEFAULT NULL, + `status` enum('waiting','playing','finished') NOT NULL DEFAULT 'waiting', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_rooms_game_status_index` (`game`,`status`), + KEY `game_rooms_player1_id_index` (`player1_id`), + KEY `game_rooms_player2_id_index` (`player2_id`), + KEY `idx_game_rooms_status` (`status`), + KEY `idx_game_rooms_game` (`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_scores`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_scores` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL, + `game` varchar(50) NOT NULL, + `score` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_scores_game_score_index` (`game`,`score`), + KEY `game_scores_user_id_index` (`user_id`), + KEY `idx_game_scores_user_id` (`user_id`), + KEY `idx_game_scores_game` (`game`), + KEY `idx_game_scores_game_score` (`game`,`score`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `gift_wrappers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `gift_wrappers` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `sprite_id` int(11) NOT NULL, + `item_id` int(11) NOT NULL, + `type` enum('gift','wrapper') NOT NULL DEFAULT 'wrapper', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `groups_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `groups_items` ( + `type` enum('base','symbol','color','color2','color3') NOT NULL, + `id` int(11) NOT NULL, + `firstvalue` varchar(255) NOT NULL, + `secondvalue` varchar(2000) NOT NULL, + `enabled` enum('0','1') NOT NULL DEFAULT '1', + PRIMARY KEY (`id`,`type`) USING BTREE, + KEY `type` (`type`) USING BTREE, + KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `guild_forum_views`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `guild_forum_views` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `guild_id` int(11) NOT NULL, + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_gfv_user_id` (`user_id`), + KEY `idx_gfv_guild_id` (`guild_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `guilds`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `guilds` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL DEFAULT 0, + `name` varchar(50) NOT NULL DEFAULT '', + `description` varchar(250) NOT NULL DEFAULT '', + `room_id` int(11) NOT NULL DEFAULT 0, + `state` int(11) NOT NULL DEFAULT 0, + `rights` enum('0','1') NOT NULL DEFAULT '0', + `color_one` int(11) NOT NULL DEFAULT 0, + `color_two` int(11) NOT NULL DEFAULT 0, + `badge` varchar(256) NOT NULL DEFAULT '', + `date_created` int(11) NOT NULL, + `forum` enum('0','1') NOT NULL DEFAULT '0', + `read_forum` enum('EVERYONE','MEMBERS','ADMINS') NOT NULL DEFAULT 'EVERYONE', + `post_messages` enum('EVERYONE','MEMBERS','ADMINS','OWNER') NOT NULL DEFAULT 'EVERYONE', + `post_threads` enum('EVERYONE','MEMBERS','ADMINS','OWNER') NOT NULL DEFAULT 'EVERYONE', + `mod_forum` enum('ADMINS','OWNER') NOT NULL DEFAULT 'ADMINS', + PRIMARY KEY (`id`) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `data` (`room_id`,`user_id`) USING BTREE, + KEY `name` (`name`) USING BTREE, + KEY `description` (`description`) USING BTREE, + KEY `idx_guilds_user_id` (`user_id`), + KEY `idx_guilds_room_id` (`room_id`), + CONSTRAINT `fk_guilds_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `guilds_elements`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `guilds_elements` ( + `id` int(11) NOT NULL, + `firstvalue` varchar(300) NOT NULL, + `secondvalue` varchar(300) NOT NULL, + `type` varchar(50) NOT NULL, + `enabled` enum('0','1') NOT NULL DEFAULT '1', + UNIQUE KEY `id` (`id`,`type`) USING BTREE, + UNIQUE KEY `data` (`id`,`type`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `guilds_forums_comments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `guilds_forums_comments` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `thread_id` int(10) unsigned NOT NULL DEFAULT 0, + `user_id` int(11) NOT NULL DEFAULT 0, + `message` text NOT NULL, + `created_at` int(11) NOT NULL DEFAULT 0, + `state` int(11) NOT NULL DEFAULT 0, + `admin_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `thread_data` (`thread_id`,`user_id`,`created_at`,`state`) USING BTREE, + KEY `idx_gfc_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=COMPACT; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `guilds_forums_threads`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `guilds_forums_threads` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `guild_id` int(11) DEFAULT 0, + `opener_id` int(11) DEFAULT 0, + `subject` varchar(255) DEFAULT '', + `posts_count` int(11) DEFAULT 0, + `created_at` int(11) DEFAULT 0, + `updated_at` int(11) DEFAULT 0, + `state` int(11) DEFAULT 0, + `pinned` tinyint(4) DEFAULT 0, + `locked` tinyint(4) DEFAULT 0, + `admin_id` int(11) DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_gft_guild_id` (`guild_id`), + KEY `idx_gft_opener_id` (`opener_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=COMPACT; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `guilds_members`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `guilds_members` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `guild_id` int(11) NOT NULL DEFAULT 0, + `user_id` int(11) NOT NULL DEFAULT 0, + `level_id` int(11) NOT NULL DEFAULT 0, + `member_since` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE, + KEY `guild_id` (`guild_id`) USING BTREE, + KEY `userdata` (`user_id`,`guild_id`) USING BTREE, + KEY `level_id` (`level_id`) USING BTREE, + KEY `member_since` (`member_since`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `help_question_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `help_question_categories` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `order` int(11) NOT NULL DEFAULT 0, + `name` varchar(255) NOT NULL, + `slug` varchar(255) NOT NULL, + `icon` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `help_question_categories_slug_unique` (`slug`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `help_question_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `help_question_category` ( + `help_question_id` bigint(20) unsigned NOT NULL, + `help_question_category_id` bigint(20) unsigned NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `help_questions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `help_questions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `slug` varchar(255) NOT NULL, + `content` text NOT NULL, + `visible` tinyint(1) NOT NULL, + `views` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `help_questions_slug_index` (`slug`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `hk_cleanup_logs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `hk_cleanup_logs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `event_time` timestamp NULL DEFAULT current_timestamp(), + `event_type` varchar(50) DEFAULT NULL, + `description` text DEFAULT NULL, + `performed_by` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `home_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `home_categories` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `order` int(11) NOT NULL DEFAULT 0, + `name` varchar(255) NOT NULL, + `icon` varchar(255) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `home_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `home_items` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `home_category_id` bigint(20) unsigned DEFAULT NULL, + `type` char(1) NOT NULL, + `order` int(11) NOT NULL DEFAULT 0, + `name` varchar(255) NOT NULL, + `image` varchar(255) NOT NULL, + `price` int(11) NOT NULL, + `currency_type` int(11) NOT NULL DEFAULT -1, + `enabled` tinyint(1) NOT NULL DEFAULT 1, + `limit` int(11) DEFAULT NULL, + `total_bought` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `hotelview_news`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `hotelview_news` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(100) NOT NULL, + `text` varchar(500) NOT NULL, + `button_text` varchar(50) NOT NULL, + `button_type` enum('client','web') NOT NULL DEFAULT 'web', + `button_link` varchar(200) NOT NULL, + `image` varchar(200) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `housekeeping_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `housekeeping_permissions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `permission` varchar(255) NOT NULL, + `min_rank` int(11) NOT NULL, + `description` varchar(255) DEFAULT NULL COMMENT 'Describes the permissions', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `housekeeping_permissions_permission_unique` (`permission`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `housekeeping_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `housekeeping_settings` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL, + `value` varchar(255) NOT NULL, + `comment` varchar(255) DEFAULT NULL COMMENT 'Describe what the entry does', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `housekeeping_settings_key_unique` (`key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `infostand_backgrounds`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `infostand_backgrounds` ( + `id` int(11) NOT NULL, + `category` enum('background','stand','overlay','card','border') NOT NULL, + `min_rank` int(11) NOT NULL DEFAULT 0, + `is_hc_only` tinyint(1) NOT NULL DEFAULT 0, + `is_ambassador_only` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`,`category`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ip_data_list`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ip_data_list` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `ip` varchar(255) NOT NULL, + `ip_condition` enum('whitelist','blacklist') NOT NULL, + `asn` varchar(255) DEFAULT NULL, + `asn_condition` enum('whitelist','blacklist') NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL DEFAULT 0, + `room_id` int(11) NOT NULL DEFAULT 0, + `item_id` int(11) unsigned DEFAULT 0, + `wall_pos` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', + `x` int(11) NOT NULL DEFAULT 0, + `y` int(11) NOT NULL DEFAULT 0, + `z` double(10,6) NOT NULL DEFAULT 0.000000, + `rot` int(11) NOT NULL DEFAULT 0, + `extra_data` varchar(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', + `wired_data` varchar(10000) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', + `limited_data` varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '0:0', + `guild_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `room_id` (`user_id`,`room_id`) USING BTREE, + KEY `itemsdata` (`room_id`,`item_id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE, + KEY `extra_data` (`extra_data`) USING BTREE, + KEY `wired_data` (`wired_data`(3072)) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `items_item_id_index` (`item_id`) USING BTREE, + CONSTRAINT `fk_items_item_base` FOREIGN KEY (`item_id`) REFERENCES `items_base` (`id`) ON DELETE CASCADE, + CONSTRAINT `fk_items_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items_base`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `items_base` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `sprite_id` int(11) NOT NULL DEFAULT 0, + `item_name` varchar(70) NOT NULL DEFAULT '0', + `public_name` varchar(56) NOT NULL DEFAULT '0', + `width` int(11) NOT NULL DEFAULT 1, + `length` int(11) NOT NULL DEFAULT 1, + `stack_height` double(4,2) NOT NULL DEFAULT 0.00, + `allow_stack` tinyint(1) NOT NULL DEFAULT 1, + `allow_sit` tinyint(1) NOT NULL DEFAULT 0, + `allow_lay` tinyint(1) NOT NULL DEFAULT 0, + `allow_walk` tinyint(1) NOT NULL DEFAULT 0, + `allow_gift` tinyint(1) NOT NULL DEFAULT 1, + `allow_trade` tinyint(1) NOT NULL DEFAULT 1, + `allow_recycle` tinyint(1) NOT NULL DEFAULT 0, + `allow_marketplace_sell` tinyint(1) NOT NULL DEFAULT 0, + `allow_inventory_stack` tinyint(1) NOT NULL DEFAULT 1, + `type` varchar(3) NOT NULL DEFAULT 's', + `interaction_type` varchar(500) NOT NULL DEFAULT 'default', + `interaction_modes_count` int(11) NOT NULL DEFAULT 1, + `vending_ids` varchar(255) NOT NULL DEFAULT '0', + `multiheight` varchar(50) NOT NULL DEFAULT '0', + `customparams` varchar(25600) NOT NULL DEFAULT '', + `effect_id_male` int(11) NOT NULL DEFAULT 0, + `effect_id_female` int(11) NOT NULL DEFAULT 0, + `clothing_on_walk` varchar(255) NOT NULL DEFAULT '', + `page_id` varchar(250) DEFAULT NULL, + `rare` enum('4','3','2','1','0') DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE, + KEY `sprite_id` (`sprite_id`) USING BTREE, + KEY `type` (`type`) USING BTREE, + FULLTEXT KEY `item_name` (`item_name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items_base_oud`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `items_base_oud` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `sprite_id` int(11) NOT NULL DEFAULT 0, + `public_name` varchar(56) NOT NULL DEFAULT '', + `item_name` varchar(70) NOT NULL, + `type` varchar(3) NOT NULL DEFAULT 's', + `width` int(11) NOT NULL DEFAULT 1, + `length` int(11) NOT NULL DEFAULT 1, + `stack_height` double(4,2) NOT NULL DEFAULT 0.00, + `allow_stack` tinyint(1) NOT NULL DEFAULT 1, + `allow_sit` tinyint(1) NOT NULL DEFAULT 0, + `allow_lay` tinyint(1) NOT NULL DEFAULT 0, + `allow_walk` tinyint(1) NOT NULL DEFAULT 0, + `allow_gift` tinyint(1) NOT NULL DEFAULT 1, + `allow_trade` tinyint(1) NOT NULL DEFAULT 1, + `allow_recycle` tinyint(1) NOT NULL DEFAULT 0, + `allow_marketplace_sell` tinyint(1) NOT NULL DEFAULT 0, + `allow_inventory_stack` tinyint(1) NOT NULL DEFAULT 1, + `interaction_type` varchar(500) NOT NULL DEFAULT 'default', + `interaction_modes_count` int(11) NOT NULL DEFAULT 1, + `vending_ids` varchar(255) NOT NULL DEFAULT '0', + `multiheight` varchar(50) NOT NULL DEFAULT '0', + `customparams` varchar(256) NOT NULL DEFAULT '', + `effect_id_male` int(11) NOT NULL DEFAULT 0, + `effect_id_female` int(11) NOT NULL DEFAULT 0, + `clothing_on_walk` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) USING BTREE, + KEY `item_name` (`item_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items_crackable`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `items_crackable` ( + `item_id` int(11) unsigned NOT NULL, + `item_name` varchar(255) NOT NULL COMMENT 'Item name for identification', + `count` int(11) NOT NULL, + `prizes` varchar(860) NOT NULL DEFAULT '179:1' COMMENT 'Used in the format of item_id:chance;item_id_2:chance. item_id must be id in the items_base table. Default value for chance is 100.', + `achievement_tick` varchar(64) NOT NULL, + `achievement_cracked` varchar(64) NOT NULL, + `required_effect` int(11) NOT NULL DEFAULT 0, + `subscription_duration` int(11) DEFAULT NULL, + `subscription_type` varchar(255) DEFAULT NULL COMMENT 'hc for Habbo Club, bc for Builders Club', + PRIMARY KEY (`item_id`) USING BTREE, + UNIQUE KEY `id` (`item_id`) USING BTREE, + KEY `data` (`count`,`prizes`,`achievement_tick`,`achievement_cracked`) USING BTREE, + KEY `idx_items_crackable_item_id` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items_highscore_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `items_highscore_data` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `item_id` int(11) NOT NULL, + `user_ids` varchar(500) NOT NULL, + `score` int(11) NOT NULL, + `is_win` tinyint(1) DEFAULT 0, + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `data` (`item_id`,`user_ids`) USING BTREE, + KEY `status` (`is_win`,`score`,`timestamp`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items_hoppers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `items_hoppers` ( + `item_id` int(11) NOT NULL, + `base_item` int(11) NOT NULL, + PRIMARY KEY (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items_presents`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `items_presents` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `item_id` int(11) NOT NULL, + `base_item_reward` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items_teleports`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `items_teleports` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `teleport_one_id` int(11) NOT NULL, + `teleport_two_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `teleport_one_id` (`teleport_one_id`) USING BTREE, + KEY `teleport_two_id` (`teleport_two_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `logs_hc_payday`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `logs_hc_payday` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `timestamp` int(10) unsigned DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `hc_streak` int(10) unsigned DEFAULT NULL, + `total_coins_spent` int(10) unsigned DEFAULT NULL, + `reward_coins_spent` int(10) unsigned DEFAULT NULL, + `reward_streak` int(10) unsigned DEFAULT NULL, + `total_payout` int(10) unsigned DEFAULT NULL, + `currency` varchar(255) DEFAULT NULL, + `claimed` tinyint(1) DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `timestamp` (`timestamp`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `logs_shop_purchases`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `logs_shop_purchases` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `timestamp` int(10) unsigned DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `catalog_item_id` int(10) unsigned DEFAULT NULL, + `item_ids` text DEFAULT NULL, + `catalog_name` varchar(255) DEFAULT NULL, + `cost_credits` int(11) DEFAULT NULL, + `cost_points` int(11) DEFAULT NULL, + `points_type` int(11) DEFAULT NULL, + `amount` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `timestamp` (`timestamp`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `marketplace_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `marketplace_items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `item_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `price` int(11) NOT NULL, + `timestamp` int(11) NOT NULL, + `sold_timestamp` int(11) NOT NULL DEFAULT 0, + `state` int(11) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) USING BTREE, + KEY `itemdata` (`item_id`,`user_id`) USING BTREE, + KEY `price` (`price`) USING BTREE, + KEY `time` (`timestamp`,`sold_timestamp`) USING BTREE, + KEY `status` (`state`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `messenger_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `messenger_categories` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `user_id` int(11) NOT NULL, + UNIQUE KEY `identifier` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `messenger_friendrequests`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `messenger_friendrequests` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_to_id` int(11) NOT NULL DEFAULT 0, + `user_from_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `users` (`user_to_id`,`user_from_id`) USING BTREE, + KEY `idx_fr_user_to_id` (`user_to_id`), + KEY `idx_fr_user_from_id` (`user_from_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `messenger_friendships`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `messenger_friendships` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_one_id` int(11) NOT NULL DEFAULT 0, + `user_two_id` int(11) NOT NULL DEFAULT 0, + `relation` int(11) NOT NULL DEFAULT 0, + `friends_since` int(11) NOT NULL DEFAULT 0, + `category` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `user_one_id` (`user_one_id`) USING BTREE, + KEY `user_two_id` (`user_two_id`) USING BTREE, + KEY `userdata` (`user_one_id`,`user_two_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `messenger_offline`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `messenger_offline` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL DEFAULT 0, + `user_from_id` int(11) NOT NULL DEFAULT 0, + `message` varchar(500) NOT NULL, + `sended_on` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `migrations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `migrations` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `migration` varchar(255) NOT NULL, + `batch` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `namechange_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `namechange_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `old_name` varchar(32) NOT NULL, + `new_name` varchar(32) NOT NULL, + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_namechange_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `navigations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `navigations` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `label` varchar(255) NOT NULL, + `icon` varchar(255) DEFAULT NULL, + `slug` varchar(255) DEFAULT NULL, + `order` smallint(6) NOT NULL DEFAULT 0, + `visible` tinyint(1) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `navigator_filter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `navigator_filter` ( + `key` varchar(11) NOT NULL, + `field` varchar(32) NOT NULL, + `compare` enum('equals','equals_ignore_case','contains') NOT NULL, + `database_query` varchar(1024) NOT NULL, + PRIMARY KEY (`key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `navigator_flatcats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `navigator_flatcats` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `min_rank` int(11) NOT NULL DEFAULT 0, + `caption_save` varchar(32) NOT NULL DEFAULT 'caption_save', + `caption` varchar(100) NOT NULL, + `can_trade` enum('0','1') NOT NULL DEFAULT '1', + `max_user_count` int(11) NOT NULL DEFAULT 100, + `public` enum('0','1') NOT NULL DEFAULT '0', + `list_type` int(11) NOT NULL DEFAULT 0 COMMENT 'Display mode in the navigator. 0 for list, 1 for thumbnails.', + `order_num` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `navigator_publiccats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `navigator_publiccats` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(32) NOT NULL DEFAULT 'Staff Picks', + `image` enum('0','1') NOT NULL DEFAULT '0', + `visible` enum('0','1') NOT NULL DEFAULT '1', + `order_num` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `navigator_publics`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `navigator_publics` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `public_cat_id` int(11) NOT NULL, + `room_id` int(11) NOT NULL, + `visible` enum('0','1') NOT NULL DEFAULT '1', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `nova_field_attachments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `nova_field_attachments` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `attachable_type` varchar(255) NOT NULL, + `attachable_id` bigint(20) unsigned NOT NULL, + `attachment` varchar(255) NOT NULL, + `disk` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `nova_field_attachments_attachable_type_attachable_id_index` (`attachable_type`,`attachable_id`) USING BTREE, + KEY `nova_field_attachments_url_index` (`url`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `nova_notifications`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `nova_notifications` ( + `id` uuid NOT NULL, + `type` varchar(255) NOT NULL, + `notifiable_type` varchar(255) NOT NULL, + `notifiable_id` bigint(20) unsigned NOT NULL, + `data` text NOT NULL, + `read_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `nova_notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `nova_pending_field_attachments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `nova_pending_field_attachments` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `draft_id` varchar(255) NOT NULL, + `attachment` varchar(255) NOT NULL, + `disk` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `nova_pending_field_attachments_draft_id_index` (`draft_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `nux_gifts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `nux_gifts` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` enum('item','room') NOT NULL DEFAULT 'item', + `value` varchar(32) NOT NULL COMMENT 'If type item then items.item_name. If type room then room id to copy.', + `image` varchar(256) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `old_guilds_forums`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `old_guilds_forums` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `guild_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `subject` mediumtext NOT NULL, + `message` longtext NOT NULL, + `state` enum('OPEN','CLOSED','HIDDEN_BY_ADMIN','HIDDEN_BY_STAFF') NOT NULL DEFAULT 'OPEN', + `admin_id` int(11) NOT NULL DEFAULT 0, + `pinned` enum('0','1') NOT NULL DEFAULT '0', + `locked` enum('0','1') NOT NULL DEFAULT '0', + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `old_guilds_forums_comments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `old_guilds_forums_comments` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `thread_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `timestamp` int(11) NOT NULL, + `message` longtext NOT NULL, + `state` enum('OPEN','CLOSED','HIDDEN_BY_ADMIN','HIDDEN_BY_STAFF') NOT NULL DEFAULT 'OPEN', + `admin_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `password_reset_tokens`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `password_reset_tokens` ( + `email` varchar(255) NOT NULL, + `token` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`email`) USING BTREE, + KEY `prt_token_index` (`token`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `password_resets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `password_resets` ( + `email` varchar(255) NOT NULL, + `token` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + KEY `password_resets_email_index` (`email`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `permission_definitions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `permission_definitions` ( + `permission_key` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, + `max_value` tinyint(3) unsigned NOT NULL DEFAULT 1, + `comment` text NOT NULL, + `rank_1` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_2` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_3` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_4` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_5` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_6` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_7` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_8` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_9` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_10` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_11` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_12` tinyint(3) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`permission_key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `permission_ranks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `permission_ranks` ( + `id` int(11) NOT NULL, + `rank_name` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, + `hidden_rank` tinyint(1) NOT NULL DEFAULT 0, + `badge` varchar(12) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `job_description` varchar(255) NOT NULL DEFAULT 'Here to help', + `staff_color` varchar(8) NOT NULL DEFAULT '#327fa8', + `staff_background` varchar(255) NOT NULL DEFAULT 'staff-bg.png', + `level` int(11) NOT NULL DEFAULT 1, + `room_effect` int(11) NOT NULL DEFAULT 0, + `log_commands` enum('0','1') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0', + `prefix` varchar(5) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `prefix_color` varchar(7) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `auto_credits_amount` int(11) DEFAULT 0, + `auto_pixels_amount` int(11) DEFAULT 0, + `auto_gotw_amount` int(11) DEFAULT 0, + `auto_points_amount` int(11) DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `permission_roles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `permission_roles` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `permission_id` bigint(20) unsigned NOT NULL, + `role_name` varchar(255) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `permissions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `rank_name` varchar(25) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `hidden_rank` tinyint(1) NOT NULL DEFAULT 0, + `admin_permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, + `badge` varchar(12) NOT NULL DEFAULT '', + `job_description` varchar(255) NOT NULL DEFAULT 'Here to help', + `staff_color` varchar(8) NOT NULL DEFAULT '#327fa8', + `level` int(11) NOT NULL DEFAULT 1, + `room_effect` int(11) NOT NULL DEFAULT 0, + `log_commands` enum('0','1') NOT NULL DEFAULT '0', + `prefix` varchar(20) NOT NULL, + `prefix_color` varchar(7) NOT NULL, + `cmd_about` enum('0','1') NOT NULL DEFAULT '1', + `cmd_alert` enum('0','1') NOT NULL DEFAULT '0', + `cmd_allow_trading` enum('0','1') NOT NULL DEFAULT '0', + `cmd_badge` enum('0','1') NOT NULL DEFAULT '0', + `cmd_ban` enum('0','1') NOT NULL DEFAULT '0', + `cmd_blockalert` enum('0','1') NOT NULL DEFAULT '0', + `cmd_bots` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_bundle` enum('0','1') NOT NULL DEFAULT '0', + `cmd_calendar` enum('0','1') NOT NULL DEFAULT '0', + `cmd_changename` enum('0','1') NOT NULL DEFAULT '0', + `cmd_chatcolor` enum('0','1') NOT NULL DEFAULT '0', + `cmd_commands` enum('0','1') NOT NULL DEFAULT '1', + `cmd_connect_camera` enum('0','1') NOT NULL DEFAULT '0', + `cmd_control` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_coords` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_credits` enum('0','1') NOT NULL DEFAULT '0', + `cms_dance` enum('0','1') DEFAULT '0', + `cmd_subscription` enum('0','1') DEFAULT '0', + `cmd_danceall` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_diagonal` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_disconnect` enum('0','1') NOT NULL DEFAULT '0', + `cmd_duckets` enum('0','1') NOT NULL DEFAULT '0', + `cmd_ejectall` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_empty` enum('0','1') NOT NULL DEFAULT '1', + `cmd_empty_bots` enum('0','1') NOT NULL DEFAULT '1', + `cmd_empty_pets` enum('0','1') NOT NULL DEFAULT '1', + `cmd_enable` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_event` enum('0','1') NOT NULL DEFAULT '0', + `cmd_faceless` enum('0','1') NOT NULL DEFAULT '0', + `cmd_fastwalk` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_filterword` enum('0','1') NOT NULL DEFAULT '0', + `cmd_freeze` enum('0','1') NOT NULL DEFAULT '0', + `cmd_freeze_bots` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_gift` enum('0','1') NOT NULL DEFAULT '0', + `cmd_give_rank` enum('0','1') NOT NULL DEFAULT '0', + `cmd_ha` enum('0','1') NOT NULL DEFAULT '0', + `acc_can_stalk` enum('0','1') NOT NULL DEFAULT '0', + `cmd_hal` enum('0','1') NOT NULL DEFAULT '0', + `cmd_invisible` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_ip_ban` enum('0','1') NOT NULL DEFAULT '0', + `cmd_machine_ban` enum('0','1') NOT NULL DEFAULT '0', + `cmd_hand_item` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_happyhour` enum('0','1') NOT NULL DEFAULT '0', + `cmd_hidewired` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_kickall` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_softkick` enum('0','1') NOT NULL DEFAULT '0', + `cmd_massbadge` enum('0','1') NOT NULL DEFAULT '0', + `cmd_roombadge` enum('0','1') NOT NULL DEFAULT '0', + `cmd_masscredits` enum('0','1') NOT NULL DEFAULT '0', + `cmd_massduckets` enum('0','1') NOT NULL DEFAULT '0', + `cmd_massgift` enum('0','1') NOT NULL DEFAULT '0', + `cmd_masspoints` enum('0','1') NOT NULL DEFAULT '0', + `cmd_moonwalk` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_mimic` enum('0','1') NOT NULL DEFAULT '0', + `cmd_multi` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_mute` enum('0','1') NOT NULL DEFAULT '0', + `cmd_pet_info` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_pickall` enum('0','1') NOT NULL DEFAULT '1', + `cmd_plugins` enum('0','1') NOT NULL DEFAULT '1', + `cmd_points` enum('0','1') NOT NULL DEFAULT '0', + `cmd_promote_offer` enum('0','1') NOT NULL DEFAULT '0', + `cmd_pull` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_push` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_redeem` enum('0','1') NOT NULL DEFAULT '0', + `cmd_reload_room` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_roomalert` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_roomcredits` enum('0','1') NOT NULL DEFAULT '0', + `cmd_roomeffect` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_roomgift` enum('0','1') NOT NULL DEFAULT '0', + `cmd_roomitem` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_roommute` enum('0','1') NOT NULL DEFAULT '0', + `cmd_roompixels` enum('0','1') NOT NULL DEFAULT '0', + `cmd_roompoints` enum('0','1') NOT NULL DEFAULT '0', + `cmd_say` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_say_all` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_setmax` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_set_poll` enum('0','1') NOT NULL DEFAULT '0', + `cmd_setpublic` enum('0','1') NOT NULL DEFAULT '0', + `cmd_setspeed` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_shout` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_shout_all` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_shutdown` enum('0','1') NOT NULL DEFAULT '0', + `cmd_sitdown` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_staffalert` enum('0','1') NOT NULL DEFAULT '0', + `cmd_staffonline` enum('0','1') NOT NULL DEFAULT '0', + `cmd_summon` enum('0','1') NOT NULL DEFAULT '0', + `cmd_summonrank` enum('0','1') NOT NULL DEFAULT '0', + `cmd_super_ban` enum('0','1') NOT NULL DEFAULT '0', + `cmd_stalk` enum('0','1') NOT NULL DEFAULT '0', + `cmd_superpull` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_take_badge` enum('0','1') NOT NULL DEFAULT '0', + `cmd_talk` enum('0','1') NOT NULL DEFAULT '0', + `cmd_teleport` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_trash` enum('0','1') NOT NULL DEFAULT '0', + `cmd_transform` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_unban` enum('0','1') NOT NULL DEFAULT '0', + `cmd_unload` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_unmute` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_achievements` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_all` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_bots` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_catalogue` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_config` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_guildparts` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_hotel_view` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_items` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_navigator` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_permissions` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_pet_data` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_plugins` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_polls` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_texts` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_wordfilter` enum('0','1') NOT NULL DEFAULT '0', + `cmd_userinfo` enum('0','1') NOT NULL DEFAULT '0', + `cmd_word_quiz` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_warp` enum('0','1') NOT NULL DEFAULT '0', + `acc_anychatcolor` enum('0','1') NOT NULL DEFAULT '0', + `acc_anyroomowner` enum('0','1') NOT NULL DEFAULT '0', + `acc_empty_others` enum('0','1') NOT NULL DEFAULT '0', + `acc_enable_others` enum('0','1') NOT NULL DEFAULT '0', + `acc_see_whispers` enum('0','1') NOT NULL DEFAULT '0', + `acc_see_tentchat` enum('0','1') NOT NULL DEFAULT '0', + `acc_superwired` enum('0','1') NOT NULL DEFAULT '0', + `acc_supporttool` enum('0','1') NOT NULL DEFAULT '0', + `acc_unkickable` enum('0','1') NOT NULL DEFAULT '0', + `acc_guildgate` enum('0','1') NOT NULL DEFAULT '0', + `acc_moverotate` enum('0','1') NOT NULL DEFAULT '0', + `acc_placefurni` enum('0','1') NOT NULL DEFAULT '0', + `acc_unlimited_bots` enum('0','1','2') NOT NULL DEFAULT '0' COMMENT 'Overrides the bot restriction to the inventory and room.', + `acc_unlimited_pets` enum('0','1','2') NOT NULL DEFAULT '0' COMMENT 'Overrides the pet restriction to the inventory and room.', + `acc_hide_ip` enum('0','1') NOT NULL DEFAULT '0', + `acc_hide_mail` enum('0','1') NOT NULL DEFAULT '0', + `acc_not_mimiced` enum('0','1') NOT NULL DEFAULT '0', + `acc_chat_no_flood` enum('0','1') NOT NULL DEFAULT '0', + `acc_staff_chat` enum('0','1') NOT NULL DEFAULT '0', + `acc_staff_pick` enum('0','1') NOT NULL DEFAULT '0', + `acc_enteranyroom` enum('0','1') NOT NULL DEFAULT '0', + `acc_fullrooms` enum('0','1') NOT NULL DEFAULT '0', + `acc_infinite_credits` enum('0','1') NOT NULL DEFAULT '0', + `acc_infinite_pixels` enum('0','1') NOT NULL DEFAULT '0', + `acc_infinite_points` enum('0','1') NOT NULL DEFAULT '0', + `acc_ambassador` enum('0','1') NOT NULL DEFAULT '0', + `acc_debug` enum('0','1') NOT NULL DEFAULT '0', + `acc_chat_no_limit` enum('0','1') NOT NULL DEFAULT '0' COMMENT 'People with this permission node are always heard and can see all chat in the room regarding of maximum hearing distance in the room settings (In game)', + `acc_chat_no_filter` enum('0','1') NOT NULL DEFAULT '0', + `acc_nomute` enum('0','1') NOT NULL DEFAULT '0', + `acc_guild_admin` enum('0','1') NOT NULL DEFAULT '0', + `acc_catalog_ids` enum('0','1') NOT NULL DEFAULT '0', + `acc_catalogfurni` enum('0','1') NOT NULL DEFAULT '0', + `acc_modtool_ticket_q` enum('0','1') NOT NULL DEFAULT '0', + `acc_modtool_user_logs` enum('0','1') NOT NULL DEFAULT '0', + `acc_modtool_user_alert` enum('0','1') NOT NULL DEFAULT '0', + `acc_modtool_user_kick` enum('0','1') NOT NULL DEFAULT '0', + `acc_modtool_user_ban` enum('0','1') NOT NULL DEFAULT '0', + `acc_modtool_room_info` enum('0','1') NOT NULL DEFAULT '0', + `acc_modtool_room_logs` enum('0','1') NOT NULL DEFAULT '0', + `acc_trade_anywhere` enum('0','1') NOT NULL DEFAULT '0', + `acc_update_notifications` enum('0','1') NOT NULL DEFAULT '0', + `acc_helper_use_guide_tool` enum('0','1') NOT NULL DEFAULT '0', + `acc_helper_give_guide_tours` enum('0','1') NOT NULL DEFAULT '0', + `acc_helper_judge_chat_reviews` enum('0','1') NOT NULL DEFAULT '0', + `acc_floorplan_editor` enum('0','1') NOT NULL DEFAULT '0', + `acc_camera` enum('0','1') NOT NULL DEFAULT '0', + `acc_ads_background` enum('0','1') NOT NULL DEFAULT '0', + `cmd_wordquiz` enum('0','1','2') NOT NULL DEFAULT '0', + `acc_room_staff_tags` enum('0','1') NOT NULL DEFAULT '0', + `acc_infinite_friends` enum('0','1') NOT NULL DEFAULT '0', + `acc_unignorable` enum('0','1') NOT NULL DEFAULT '0', + `acc_mimic_unredeemed` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_youtube_playlists` enum('0','1') NOT NULL DEFAULT '0', + `cmd_add_youtube_playlist` enum('0','1') NOT NULL DEFAULT '0', + `auto_credits_amount` int(11) DEFAULT 0, + `auto_pixels_amount` int(11) DEFAULT 0, + `auto_gotw_amount` int(11) DEFAULT 0, + `auto_points_amount` int(11) DEFAULT 0, + `acc_mention` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_setstate` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_buildheight` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_setrotation` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_sellroom` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_buyroom` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_pay` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_kill` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_hoverboard` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_kiss` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_hug` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_welcome` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_disable_effects` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_brb` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_nuke` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_slime` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_explain` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_closedice` enum('0','1','2') NOT NULL DEFAULT '1', + `acc_closedice_room` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_set` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_furnidata` enum('0','1') NOT NULL DEFAULT '0', + `kiss_cmd` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_afk` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_tptome` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_superpush` enum('0','1','2') NOT NULL DEFAULT '0', + `cmd_rolldice` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_blizzard_reload` enum('0','1') NOT NULL DEFAULT '0', + `cmd_give_prize` enum('0','1') NOT NULL DEFAULT '0', + `cmd_reload_colors` enum('0','1') NOT NULL DEFAULT '0', + `cmd_give_color_name` enum('0','1') NOT NULL DEFAULT '0', + `acc_blizzard_override_logger` enum('0','1') NOT NULL DEFAULT '0', + `cmd_roompublic` enum('0','1') NOT NULL DEFAULT '0', + `cmd_furnifix` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_ls_rewards` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_ls_name_colors` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_ls_prefixes` enum('0','1') NOT NULL DEFAULT '0', + `cmd_ls_toggle_level` enum('0','1') NOT NULL DEFAULT '0', + `cmd_ls_name_color` enum('0','1') NOT NULL DEFAULT '1', + `cmd_ls_prefix` enum('0','1') NOT NULL DEFAULT '1', + `cmd_sex` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_update_login_streak_rewards` enum('0','1') NOT NULL DEFAULT '0', + `cmd_catapage` enum('0','1') NOT NULL DEFAULT '0', + `cmd_closeroom` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_openroom` enum('0','1','2') NOT NULL DEFAULT '2', + `acc_calendar_force` enum('0','1') DEFAULT '0', + `cmd_update_calendar` enum('0','1') NOT NULL DEFAULT '0', + `staff_background` varchar(255) NOT NULL DEFAULT 'staff-bg.png', + `cmd_bank_deposit` enum('0','1') NOT NULL DEFAULT '1', + `cmd_bank_withdraw` enum('0','1') NOT NULL DEFAULT '1', + `cmd_bank_balance` enum('0','1') NOT NULL DEFAULT '1', + `bank_interest_percentage` int(11) NOT NULL DEFAULT 1, + `cmd_points_type1` enum('0','1') NOT NULL DEFAULT '0', + `cmd_points_type2` enum('0','1') NOT NULL DEFAULT '0', + `respect_daily` int(11) NOT NULL DEFAULT 0, + `petrespect_daily` int(11) NOT NULL DEFAULT 0, + `acc_mod_alert` enum('0','1') NOT NULL DEFAULT '0', + `cmd_enable_mod_alert` enum('0','1') NOT NULL DEFAULT '0', + `cmd_disable_mod_alert` enum('0','1') NOT NULL DEFAULT '0', + `acc_start_typing_show` enum('0','1') NOT NULL DEFAULT '1', + `cmd_autofill` enum('0','1') NOT NULL DEFAULT '0', + `cmd_game` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_bet` enum('0','1') NOT NULL DEFAULT '1', + `cmd_deposit` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_withdraw` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_depositall` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_withdrawall` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_maxfloor` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_autofloor` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_look` enum('0','1') NOT NULL DEFAULT '1', + `cmd_savelook` enum('0','1') NOT NULL DEFAULT '1', + `cmd_looks` enum('0','1') NOT NULL DEFAULT '1', + `cmd_deletelook` enum('0','1') NOT NULL DEFAULT '1', + `wardrobe_max_looks` int(11) NOT NULL DEFAULT 10, + `cmd_in` enum('0','1') NOT NULL DEFAULT '0', + `cmd_off` enum('0','1') NOT NULL DEFAULT '0', + `cmd_commandsc` enum('0','1') NOT NULL DEFAULT '1', + `cmd_update_categories` enum('0','1') NOT NULL DEFAULT '0', + `cmd_addwhisper` enum('0','1') NOT NULL DEFAULT '1', + `cmd_delwhisper` enum('0','1') NOT NULL DEFAULT '1', + `cmd_groupwhisper` enum('0','1') NOT NULL DEFAULT '1', + `cmd_commands_alpha` enum('0','1') NOT NULL DEFAULT '1', + `acc_notify_wordfilter` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_commands` enum('0','1') NOT NULL DEFAULT '0', + `cmd_transform_user` enum('0','1') NOT NULL DEFAULT '0', + `acc_mention_friends` enum('0','1') NOT NULL DEFAULT '0', + `acc_mention_everyone` enum('0','1') NOT NULL DEFAULT '0', + `is_hidden` tinyint(1) NOT NULL DEFAULT 0, + `cmd_update_chat_bubbles` enum('0','1') NOT NULL DEFAULT '0', + `cmd_rockpaperscissors` enum('0','1') NOT NULL DEFAULT '1', + `cmd_calc` enum('0','1') NOT NULL DEFAULT '1', + `cmd_catafix` enum('0','1') NOT NULL DEFAULT '0', + `cmd_roomrespect` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_shoot` enum('0','1') NOT NULL DEFAULT '1', + `cmd_pyramid` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_copyroom` enum('0','1') NOT NULL DEFAULT '0', + `cmd_takeroom` enum('0','1') NOT NULL DEFAULT '0', + `cmd_randomword` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_words` enum('0','1') NOT NULL DEFAULT '0', + `acc_bypass_cooldown` enum('0','1') NOT NULL DEFAULT '0', + `cmd_invite` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_trade` enum('0','1') NOT NULL DEFAULT '0', + `cmd_closealldice` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_rollalldice` enum('0','1','2') NOT NULL DEFAULT '1', + `cmd_bbet` enum('0','1') NOT NULL DEFAULT '1', + `cmd_selectstack` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_placestack` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_undostack` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_movestack` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_pickupstack` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_savestack` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_unsavestack` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_showstacks` enum('0','1','2') NOT NULL DEFAULT '2', + `cmd_pickup_own_furnis` enum('0','1','2') NOT NULL DEFAULT '1', + `acc_free_build` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `personal_access_tokens`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `personal_access_tokens` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `tokenable_type` varchar(255) NOT NULL, + `tokenable_id` bigint(20) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `token` varchar(64) NOT NULL, + `abilities` text DEFAULT NULL, + `last_used_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `personal_access_tokens_token_unique` (`token`) USING BTREE, + KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_actions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_actions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pet_type` int(11) NOT NULL, + `pet_name` varchar(32) NOT NULL DEFAULT '', + `offspring_type` int(11) NOT NULL DEFAULT -1, + `happy_actions` varchar(100) NOT NULL DEFAULT 'sml', + `tired_actions` varchar(100) NOT NULL DEFAULT 'trd', + `random_actions` varchar(100) NOT NULL DEFAULT 'lov', + `can_swim` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `pet_type` (`pet_type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_breeding`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_breeding` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pet_id` int(11) NOT NULL, + `offspring_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_breeding_races`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_breeding_races` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pet_type` int(11) NOT NULL, + `rarity_level` int(11) NOT NULL, + `breed` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_breeds`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_breeds` ( + `race` int(11) NOT NULL, + `color_one` int(11) NOT NULL, + `color_two` int(11) NOT NULL, + `has_color_one` enum('0','1') NOT NULL DEFAULT '0', + `has_color_two` enum('0','1') NOT NULL DEFAULT '0', + UNIQUE KEY `idx_name` (`race`,`color_one`,`color_two`,`has_color_one`,`has_color_two`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_commands`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_commands` ( + `pet_id` int(11) NOT NULL, + `command_id` int(11) NOT NULL, + PRIMARY KEY (`pet_id`,`command_id`), + KEY `pet_id` (`pet_id`), + KEY `command_id` (`command_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_commands_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_commands_data` ( + `command_id` int(11) NOT NULL, + `text` varchar(25) NOT NULL, + `required_level` int(11) NOT NULL DEFAULT 1, + `reward_xp` int(11) NOT NULL DEFAULT 5, + `cost_happiness` int(11) NOT NULL DEFAULT 0, + `cost_energy` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`command_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_drinks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_drinks` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pet_id` int(11) NOT NULL DEFAULT 0 COMMENT 'Leave 0 to have it affect all pet types.', + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_foods`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_foods` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pet_id` int(11) NOT NULL DEFAULT 0 COMMENT 'Leave 0 to have it affect all pet types.', + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pet_id` int(11) NOT NULL COMMENT 'Leave 0 to have it affect all pet types.', + `item_id` int(11) NOT NULL COMMENT 'Item id of a item having one of the following interactions: nest, pet_food, pet_drink', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `pet_vocals`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `pet_vocals` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pet_id` int(11) NOT NULL DEFAULT 0 COMMENT 'Leave 0 to have it apply to all pet types.', + `type` enum('DISOBEY','DRINKING','EATING','GENERIC_HAPPY','GENERIC_NEUTRAL','GENERIC_SAD','GREET_OWNER','HUNGRY','LEVEL_UP','MUTED','PLAYFUL','SLEEPING','THIRSTY','TIRED','UNKNOWN_COMMAND') NOT NULL DEFAULT 'GENERIC_HAPPY', + `message` varchar(100) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `polls`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `polls` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL DEFAULT 'Hey! We''d appreciate it if you could take some time to answer these questions. It will help improve our hotel.', + `thanks_message` varchar(255) NOT NULL, + `reward_badge` varchar(10) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `polls_answers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `polls_answers` ( + `poll_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `question_id` int(11) NOT NULL, + `answer` varchar(255) NOT NULL, + UNIQUE KEY `unique_index` (`poll_id`,`user_id`,`question_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `polls_questions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `polls_questions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `parent_id` int(11) NOT NULL DEFAULT 0, + `poll_id` int(11) NOT NULL, + `order` int(11) NOT NULL, + `question` varchar(255) NOT NULL, + `type` int(11) NOT NULL DEFAULT 2, + `min_selections` int(11) NOT NULL DEFAULT 1, + `options` varchar(255) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `product_data`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `product_data` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `code` varchar(255) NOT NULL, + `name` varchar(255) DEFAULT NULL, + `description` longtext NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_api_keys`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_api_keys` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `key` varchar(64) NOT NULL, + `allowed_ips` varchar(255) DEFAULT NULL, + `permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`permissions`)), + `rate_limit` int(11) NOT NULL DEFAULT 300, + `last_used_at` timestamp NULL DEFAULT NULL, + `expires_at` timestamp NULL DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `radio_api_keys_key_unique` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_applications`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_applications` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `real_name` varchar(255) NOT NULL, + `age` int(11) NOT NULL, + `availability` text NOT NULL, + `experience` text DEFAULT NULL, + `motivation` text NOT NULL, + `music_style` text DEFAULT NULL, + `discord_username` varchar(255) DEFAULT NULL, + `rank_id` bigint(20) unsigned DEFAULT NULL, + `status` enum('pending','approved','rejected') NOT NULL DEFAULT 'pending', + `approved_by` bigint(20) unsigned DEFAULT NULL, + `approved_at` timestamp NULL DEFAULT NULL, + `rejected_by` bigint(20) unsigned DEFAULT NULL, + `rejected_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_applications_user_id_index` (`user_id`), + KEY `radio_applications_rank_id_index` (`rank_id`), + KEY `radio_applications_approved_by_index` (`approved_by`), + KEY `radio_applications_rejected_by_index` (`rejected_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_auto_dj`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_auto_dj` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `playlist_id` bigint(20) unsigned DEFAULT NULL, + `day` varchar(20) NOT NULL, + `start_time` time NOT NULL, + `end_time` time NOT NULL, + `is_active` tinyint(1) DEFAULT 1, + `priority` int(11) DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_playlist_id` (`playlist_id`), + KEY `idx_day_time` (`day`,`start_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_auto_dj_playlist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_auto_dj_playlist` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `artist` varchar(255) DEFAULT NULL, + `album` varchar(255) DEFAULT NULL, + `artwork_url` varchar(255) DEFAULT NULL, + `duration` int(10) unsigned DEFAULT NULL, + `play_count` int(10) unsigned NOT NULL DEFAULT 0, + `last_played_at` timestamp NULL DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `sort_order` int(10) unsigned NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_banners`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_banners` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `image_path` varchar(255) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, + `sort_order` int(11) NOT NULL DEFAULT 0, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_banners_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_contests`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_contests` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 0, + `is_ended` tinyint(1) NOT NULL DEFAULT 0, + `starts_at` timestamp NULL DEFAULT NULL, + `ends_at` timestamp NULL DEFAULT NULL, + `winner_id` bigint(20) unsigned DEFAULT NULL, + `winners_announced` tinyint(1) NOT NULL DEFAULT 0, + `prize_description` text DEFAULT NULL, + `prize_value` decimal(10,2) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `contests_active_starts_index` (`is_active`,`starts_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_dj_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_dj_stats` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `total_hours` int(11) DEFAULT 0, + `total_sessions` int(11) DEFAULT 0, + `total_listeners` bigint(20) DEFAULT 0, + `peak_listeners` int(11) DEFAULT 0, + `total_likes` int(11) DEFAULT 0, + `total_songs_played` int(11) DEFAULT 0, + `average_listeners` float DEFAULT 0, + `last_session_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_total_hours` (`total_hours`), + KEY `idx_total_listeners` (`total_listeners`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_giveaways`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_giveaways` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 0, + `is_ended` tinyint(1) NOT NULL DEFAULT 0, + `ends_at` timestamp NULL DEFAULT NULL, + `starts_at` timestamp NULL DEFAULT NULL, + `winner_id` bigint(20) unsigned DEFAULT NULL, + `prize_value` decimal(10,2) DEFAULT NULL, + `winner_announced` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `giveaways_active_starts_index` (`is_active`,`starts_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_history` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `show_name` varchar(255) DEFAULT NULL, + `started_at` timestamp NOT NULL, + `ended_at` timestamp NULL DEFAULT NULL, + `listeners_count` int(11) NOT NULL DEFAULT 0, + `notes` text DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_history_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_listener_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_listener_history` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `count` int(11) NOT NULL, + `recorded_at` timestamp NOT NULL, + `source` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_recorded` (`recorded_at`,`count`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_listener_points`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_listener_points` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `points` decimal(10,2) DEFAULT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `reason` varchar(255) DEFAULT NULL, + `earned_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `rlp_user_earned_index` (`user_id`,`earned_at`), + KEY `rlp_earned_index` (`earned_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_playlist_songs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_playlist_songs` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `playlist_id` bigint(20) unsigned NOT NULL, + `title` varchar(200) NOT NULL, + `artist` varchar(200) DEFAULT NULL, + `duration` varchar(20) DEFAULT NULL, + `file_path` varchar(500) DEFAULT NULL, + `external_url` varchar(500) DEFAULT NULL, + `order_index` int(11) DEFAULT 0, + `play_count` int(11) DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_playlist_id` (`playlist_id`), + CONSTRAINT `radio_playlist_songs_ibfk_1` FOREIGN KEY (`playlist_id`) REFERENCES `radio_playlists` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_playlists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_playlists` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` text DEFAULT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `is_public` tinyint(1) NOT NULL DEFAULT 1, + `shuffle` int(11) NOT NULL DEFAULT 0, + `repeat` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_podcasts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_podcasts` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(200) NOT NULL, + `description` text DEFAULT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `duration` varchar(20) DEFAULT NULL, + `file_path` varchar(500) DEFAULT NULL, + `external_url` varchar(500) DEFAULT NULL, + `cover_image` varchar(500) DEFAULT NULL, + `is_published` tinyint(1) DEFAULT 0, + `views` int(11) DEFAULT 0, + `published_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_ranks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_ranks` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `badge_code` varchar(255) DEFAULT NULL, + `accepts_applications` tinyint(1) NOT NULL DEFAULT 0, + `application_rank` enum('all','proef_dj','dj','hoofd_dj') NOT NULL DEFAULT 'all', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_ranks_applications_index` (`accepts_applications`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_schedules`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_schedules` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `day` varchar(255) NOT NULL, + `start_time` time NOT NULL, + `end_time` time NOT NULL, + `show_name` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_schedules_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_shouts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_shouts` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `message` text NOT NULL, + `reported` tinyint(1) NOT NULL DEFAULT 0, + `reported_by` bigint(20) unsigned DEFAULT NULL, + `approved` tinyint(1) NOT NULL DEFAULT 1, + `approved_by` bigint(20) unsigned DEFAULT NULL, + `approved_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `shouts_user_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_song_plays`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_song_plays` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `artist` varchar(255) DEFAULT NULL, + `album` varchar(255) DEFAULT NULL, + `artwork_url` varchar(255) DEFAULT NULL, + `duration` int(10) unsigned DEFAULT NULL, + `played_at` timestamp NOT NULL, + `dj_id` bigint(20) unsigned DEFAULT NULL, + `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)), + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_song_plays_played_at_index` (`played_at`), + KEY `radio_song_plays_dj_id_index` (`dj_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_song_requests`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_song_requests` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned DEFAULT NULL, + `song_title` varchar(255) DEFAULT NULL, + `artist` varchar(255) DEFAULT NULL, + `is_approved` tinyint(1) NOT NULL DEFAULT 0, + `is_played` tinyint(1) NOT NULL DEFAULT 0, + `votes` int(11) NOT NULL DEFAULT 0, + `submitted_at` timestamp NULL DEFAULT NULL, + `played_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_song_votes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_song_votes` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `recycler_prizes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `recycler_prizes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `rarity` int(11) NOT NULL, + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `referrals`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `referrals` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `referred_user_id` bigint(20) unsigned NOT NULL, + `referred_user_ip` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `referrals_user_id_index` (`user_id`) USING BTREE, + CONSTRAINT `referrals_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_ads`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_ads` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `file` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `room_ads_file_unique` (`file`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_bans`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_bans` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `room_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `ends` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_room_bans_room_id` (`room_id`), + KEY `idx_room_bans_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_enter_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_enter_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `room_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `timestamp` int(11) NOT NULL, + `exit_timestamp` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `room_enter_log_room_id` (`room_id`) USING BTREE, + KEY `room_enter_log_user_entry` (`user_id`,`timestamp`) USING BTREE, + KEY `room_id` (`room_id`) USING BTREE, + KEY `exit_timestamp` (`exit_timestamp`) USING BTREE, + KEY `timestamps` (`timestamp`,`exit_timestamp`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_furni_wired_variables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_furni_wired_variables` ( + `room_id` int(11) NOT NULL, + `furni_id` int(11) NOT NULL, + `variable_item_id` int(11) NOT NULL, + `value` int(11) DEFAULT NULL, + `created_at` int(11) NOT NULL DEFAULT 0, + `updated_at` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`room_id`,`furni_id`,`variable_item_id`), + KEY `idx_room_furni_wired_variables_room_item` (`room_id`,`variable_item_id`), + KEY `idx_room_furni_wired_variables_furni` (`furni_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_game_scores`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_game_scores` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `room_id` int(11) NOT NULL, + `game_start_timestamp` int(11) NOT NULL, + `game_name` varchar(64) NOT NULL DEFAULT '', + `user_id` int(11) NOT NULL, + `team_id` int(11) NOT NULL, + `score` int(11) NOT NULL, + `team_score` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_models`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_models` ( + `name` varchar(100) NOT NULL, + `door_x` int(11) NOT NULL, + `door_y` int(11) NOT NULL, + `door_dir` int(11) NOT NULL DEFAULT 2, + `heightmap` text NOT NULL, + `public_items` text NOT NULL, + `club_only` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_models_custom`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_models_custom` ( + `id` int(11) NOT NULL, + `name` varchar(100) NOT NULL, + `door_x` int(11) NOT NULL, + `door_y` int(11) NOT NULL, + `door_dir` int(11) NOT NULL, + `heightmap` text NOT NULL, + UNIQUE KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_mutes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_mutes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `room_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `ends` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_room_mutes_room_id` (`room_id`), + KEY `idx_room_mutes_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_promotions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_promotions` ( + `room_id` int(11) NOT NULL, + `title` varchar(127) NOT NULL, + `description` varchar(1024) NOT NULL, + `end_timestamp` int(11) NOT NULL DEFAULT 0, + `start_timestamp` int(11) NOT NULL DEFAULT -1, + `category` int(11) NOT NULL DEFAULT 0, + UNIQUE KEY `room_id` (`room_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_rights`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_rights` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `room_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_templates`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_templates` ( + `template_id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(128) NOT NULL DEFAULT '', + `description` varchar(256) NOT NULL DEFAULT '', + `thumbnail` varchar(512) NOT NULL DEFAULT '', + `sort_order` int(11) NOT NULL DEFAULT 0, + `enabled` enum('0','1') NOT NULL DEFAULT '1', + `name` varchar(50) NOT NULL DEFAULT '', + `room_description` varchar(250) NOT NULL DEFAULT '', + `model` varchar(100) NOT NULL, + `password` varchar(50) NOT NULL DEFAULT '', + `state` enum('open','locked','password','invisible') NOT NULL DEFAULT 'open', + `users_max` int(11) NOT NULL DEFAULT 25, + `category` int(11) NOT NULL DEFAULT 0, + `paper_floor` varchar(50) NOT NULL DEFAULT '0.0', + `paper_wall` varchar(50) NOT NULL DEFAULT '0.0', + `paper_landscape` varchar(50) NOT NULL DEFAULT '0.0', + `thickness_wall` int(11) NOT NULL DEFAULT 0, + `thickness_floor` int(11) NOT NULL DEFAULT 0, + `moodlight_data` varchar(2048) NOT NULL DEFAULT '', + `override_model` enum('0','1') NOT NULL DEFAULT '0', + `trade_mode` int(2) NOT NULL DEFAULT 2, + `heightmap` mediumtext NOT NULL, + `door_x` int(11) NOT NULL DEFAULT 0, + `door_y` int(11) NOT NULL DEFAULT 0, + `door_dir` int(4) NOT NULL DEFAULT 2, + PRIMARY KEY (`template_id`), + KEY `idx_room_templates_enabled_sort` (`enabled`,`sort_order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_templates_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_templates_items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `template_id` int(11) NOT NULL, + `item_id` int(11) unsigned NOT NULL, + `wall_pos` varchar(20) NOT NULL DEFAULT '', + `x` int(11) NOT NULL DEFAULT 0, + `y` int(11) NOT NULL DEFAULT 0, + `z` double(10,6) NOT NULL DEFAULT 0.000000, + `rot` int(11) NOT NULL DEFAULT 0, + `extra_data` varchar(2096) NOT NULL DEFAULT '', + `wired_data` varchar(4096) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_room_templates_items_template_id` (`template_id`), + KEY `idx_room_templates_items_item_id` (`item_id`), + CONSTRAINT `fk_room_templates_items_item_base` FOREIGN KEY (`item_id`) REFERENCES `items_base` (`id`) ON DELETE CASCADE, + CONSTRAINT `fk_room_templates_items_template` FOREIGN KEY (`template_id`) REFERENCES `room_templates` (`template_id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_trade_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_trade_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_one_id` int(11) NOT NULL, + `user_two_id` int(11) NOT NULL, + `user_one_ip` varchar(45) NOT NULL, + `user_two_ip` varchar(45) NOT NULL, + `timestamp` int(11) NOT NULL, + `user_one_item_count` int(11) NOT NULL, + `user_two_item_count` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `user_one_id` (`user_one_id`) USING BTREE, + KEY `user_two_id` (`user_two_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_trade_log_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_trade_log_items` ( + `id` int(11) NOT NULL, + `item_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + UNIQUE KEY `id` (`id`,`item_id`,`user_id`) USING BTREE, + KEY `id_2` (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE, + KEY `id_3` (`id`,`user_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_trax`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_trax` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `room_id` int(11) NOT NULL, + `trax_item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=armscii8 COLLATE=armscii8_general_ci ROW_FORMAT=COMPACT; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_trax_playlist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_trax_playlist` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `room_id` int(11) NOT NULL, + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `room_id` (`room_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_user_wired_variables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_user_wired_variables` ( + `room_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `variable_item_id` int(11) NOT NULL, + `value` int(11) DEFAULT NULL, + `created_at` int(11) NOT NULL DEFAULT 0, + `updated_at` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`room_id`,`user_id`,`variable_item_id`), + KEY `idx_room_user_wired_variables_room_item` (`room_id`,`variable_item_id`), + KEY `idx_room_user_wired_variables_user` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_votes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_votes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `room_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_room_votes_room_id` (`room_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_wired_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_wired_settings` ( + `room_id` int(11) NOT NULL, + `inspect_mask` int(11) NOT NULL DEFAULT 0 COMMENT 'Bitmask for who can open and inspect Wired in the room. 1=everyone, 2=users with rights, 4=group members, 8=group admins.', + `modify_mask` int(11) NOT NULL DEFAULT 0 COMMENT 'Bitmask for who can modify Wired in the room. 2=users with rights, 4=group members, 8=group admins.', + PRIMARY KEY (`room_id`), + CONSTRAINT `fk_room_wired_settings_room_id` FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_wired_variables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_wired_variables` ( + `room_id` int(11) NOT NULL, + `variable_item_id` int(11) NOT NULL, + `value` int(11) NOT NULL DEFAULT 0, + `created_at` int(11) NOT NULL DEFAULT 0, + `updated_at` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`room_id`,`variable_item_id`), + KEY `idx_room_wired_variables_room_item` (`room_id`,`variable_item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_wordfilter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_wordfilter` ( + `room_id` int(11) NOT NULL, + `word` varchar(25) NOT NULL, + UNIQUE KEY `unique_index` (`room_id`,`word`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `rooms`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `rooms` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `owner_id` int(11) NOT NULL DEFAULT 0, + `owner_name` varchar(25) NOT NULL DEFAULT '', + `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `description` varchar(512) NOT NULL DEFAULT '', + `model` varchar(20) NOT NULL DEFAULT 'model_a', + `password` varchar(20) NOT NULL DEFAULT '', + `state` enum('open','locked','password','invisible') NOT NULL DEFAULT 'open', + `users` int(11) NOT NULL DEFAULT 0, + `users_max` int(11) NOT NULL DEFAULT 25, + `guild_id` int(11) NOT NULL DEFAULT 0, + `category` int(11) NOT NULL DEFAULT 1, + `score` int(11) NOT NULL DEFAULT 0, + `paper_floor` varchar(10) DEFAULT NULL, + `paper_wall` varchar(10) DEFAULT NULL, + `paper_landscape` varchar(5) NOT NULL DEFAULT '0.0', + `thickness_wall` int(11) NOT NULL DEFAULT 0, + `wall_height` int(11) NOT NULL DEFAULT -1, + `thickness_floor` int(11) NOT NULL DEFAULT 0, + `moodlight_data` varchar(254) NOT NULL DEFAULT '2,1,1,#000000,255;2,3,1,#000000,255;2,3,1,#000000,255;', + `tags` varchar(500) NOT NULL DEFAULT '', + `is_public` enum('0','1') NOT NULL DEFAULT '0', + `is_staff_picked` enum('0','1') NOT NULL DEFAULT '0', + `allow_other_pets` enum('0','1') NOT NULL DEFAULT '0', + `allow_other_pets_eat` enum('0','1') NOT NULL DEFAULT '0', + `allow_walkthrough` enum('0','1') NOT NULL DEFAULT '1', + `allow_hidewall` enum('0','1') NOT NULL DEFAULT '0', + `chat_mode` int(11) NOT NULL DEFAULT 0, + `chat_weight` int(11) NOT NULL DEFAULT 1, + `chat_speed` int(11) NOT NULL DEFAULT 1, + `chat_hearing_distance` int(11) NOT NULL DEFAULT 50, + `chat_protection` int(11) NOT NULL DEFAULT 2, + `override_model` enum('0','1') NOT NULL DEFAULT '0', + `who_can_mute` int(11) NOT NULL DEFAULT 0, + `who_can_kick` int(11) NOT NULL DEFAULT 0, + `who_can_ban` int(11) NOT NULL DEFAULT 0, + `poll_id` int(11) NOT NULL DEFAULT 0, + `roller_speed` int(11) NOT NULL DEFAULT 4, + `promoted` enum('0','1') NOT NULL DEFAULT '0', + `trade_mode` int(11) NOT NULL DEFAULT 2, + `move_diagonally` enum('0','1') NOT NULL DEFAULT '1', + `allow_underpass` enum('0','1') NOT NULL DEFAULT '0', + `jukebox_active` enum('0','1') NOT NULL DEFAULT '0', + `hidewired` enum('0','1') NOT NULL DEFAULT '0', + `is_forsale` enum('0','1','2') NOT NULL DEFAULT '0', + `builders_club_trial_locked` enum('0','1') NOT NULL DEFAULT '0', + `builders_club_original_state` varchar(16) NOT NULL DEFAULT 'open', + `youtube_enabled` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `name` (`name`) USING BTREE, + KEY `owner_name` (`owner_name`) USING BTREE, + KEY `owner_id` (`owner_id`) USING BTREE, + KEY `guild_id` (`guild_id`) USING BTREE, + KEY `category` (`category`) USING BTREE, + KEY `public_status` (`is_public`,`is_staff_picked`) USING BTREE, + KEY `togehter_data` (`name`,`owner_name`,`guild_id`) USING BTREE, + KEY `tags` (`tags`) USING BTREE, + KEY `state` (`state`) USING BTREE, + KEY `description` (`description`) USING BTREE, + KEY `users` (`users`) USING BTREE, + CONSTRAINT `fk_rooms_owner` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `sanction_levels`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `sanction_levels` ( + `level` int(11) NOT NULL, + `type` enum('ALERT','BAN','MUTE') NOT NULL, + `hour_length` int(11) NOT NULL, + `probation_days` int(11) NOT NULL, + PRIMARY KEY (`level`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `sanctions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `sanctions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `habbo_id` int(11) NOT NULL DEFAULT 0, + `sanction_level` int(11) NOT NULL DEFAULT 0, + `probation_timestamp` int(11) NOT NULL DEFAULT 0, + `reason` varchar(255) NOT NULL DEFAULT '', + `trade_locked_until` int(11) NOT NULL DEFAULT 0, + `is_muted` tinyint(1) NOT NULL DEFAULT 0, + `mute_duration` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_sanctions_habbo_id` (`habbo_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `sessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `sessions` ( + `id` varchar(255) NOT NULL, + `user_id` bigint(20) unsigned DEFAULT NULL, + `ip_address` varchar(45) DEFAULT NULL, + `user_agent` text DEFAULT NULL, + `payload` longtext NOT NULL, + `last_activity` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `sessions_user_id_index` (`user_id`) USING BTREE, + KEY `sessions_last_activity_index` (`last_activity`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shop_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `shop_categories` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `icon` varchar(255) NOT NULL, + `order` int(11) NOT NULL DEFAULT 0, + `is_visible` tinyint(1) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shop_product_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `shop_product_items` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `product_id` bigint(20) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `type` enum('badge','furniture','room','currency','rank') NOT NULL, + `data` varchar(255) DEFAULT NULL, + `quantity` int(11) NOT NULL DEFAULT 0, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shop_products`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `shop_products` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `category_id` bigint(20) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `content` text DEFAULT NULL, + `image` varchar(255) DEFAULT NULL, + `price` int(11) NOT NULL DEFAULT 0, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `is_featured` tinyint(1) NOT NULL DEFAULT 0, + `limit_per_user` int(11) DEFAULT NULL, + `sales_count` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `social_accounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `social_accounts` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `provider` varchar(255) NOT NULL, + `provider_id` varchar(255) NOT NULL, + `avatar` varchar(255) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `social_accounts_provider_provider_id_unique` (`provider`,`provider_id`), + KEY `social_accounts_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `soundtracks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `soundtracks` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(32) NOT NULL, + `name` varchar(100) NOT NULL, + `author` varchar(50) NOT NULL, + `track` text NOT NULL, + `length` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `special_enables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `special_enables` ( + `effect_id` int(11) NOT NULL, + `min_rank` int(11) NOT NULL, + UNIQUE KEY `effect_id` (`effect_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `staff_activities`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `staff_activities` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `action` varchar(50) NOT NULL, + `target_type` varchar(100) DEFAULT NULL, + `target_id` bigint(20) unsigned DEFAULT NULL, + `description` text NOT NULL, + `ip_address` varchar(45) DEFAULT NULL, + `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)), + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `staff_activities_user_id_index` (`user_id`), + KEY `staff_activities_action_index` (`action`), + KEY `staff_activities_created_at_index` (`created_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `sub_navigations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `sub_navigations` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `navigation_id` bigint(20) unsigned NOT NULL, + `label` varchar(255) NOT NULL, + `slug` varchar(255) DEFAULT NULL, + `new_tab` tinyint(1) NOT NULL DEFAULT 0, + `order` smallint(6) NOT NULL DEFAULT 0, + `visible` tinyint(1) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) USING BTREE, + KEY `sub_navigations_navigation_id_foreign` (`navigation_id`) USING BTREE, + CONSTRAINT `sub_navigations_navigation_id_foreign` FOREIGN KEY (`navigation_id`) REFERENCES `navigations` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `support_cfh_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `support_cfh_categories` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name_internal` varchar(255) DEFAULT NULL, + `name_external` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `support_cfh_topics`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `support_cfh_topics` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `category_id` int(11) DEFAULT NULL, + `name_internal` varchar(255) DEFAULT NULL, + `name_external` varchar(255) DEFAULT NULL, + `action` enum('mods','auto_ignore','auto_reply') DEFAULT 'mods', + `ignore_target` enum('0','1') NOT NULL DEFAULT '0', + `auto_reply` text DEFAULT NULL, + `default_sanction` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_cfh_topics_category_id` (`category_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `support_issue_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `support_issue_categories` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT 'PII', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `support_issue_presets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `support_issue_presets` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `category` int(11) NOT NULL DEFAULT 1, + `name` varchar(100) NOT NULL DEFAULT '', + `message` varchar(300) NOT NULL DEFAULT '', + `reminder` varchar(100) NOT NULL, + `ban_for` int(11) NOT NULL DEFAULT 0 COMMENT '100000 = perm ban', + `mute_for` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `support_presets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `support_presets` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` enum('user','room') NOT NULL DEFAULT 'user', + `preset` varchar(200) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `support_tickets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `support_tickets` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `state` int(11) NOT NULL DEFAULT 0, + `type` int(11) NOT NULL DEFAULT 1, + `timestamp` int(11) NOT NULL DEFAULT 0, + `score` int(11) NOT NULL DEFAULT 0, + `sender_id` int(11) NOT NULL DEFAULT 0, + `reported_id` int(11) NOT NULL DEFAULT 0, + `room_id` int(11) NOT NULL DEFAULT 0, + `mod_id` int(11) NOT NULL DEFAULT 0, + `issue` varchar(500) NOT NULL DEFAULT '', + `category` int(11) NOT NULL DEFAULT 0, + `group_id` int(11) NOT NULL, + `thread_id` int(11) NOT NULL, + `comment_id` int(11) NOT NULL, + `photo_item_id` int(11) NOT NULL DEFAULT -1, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + KEY `state` (`state`) USING BTREE, + KEY `type` (`type`) USING BTREE, + KEY `timestamp` (`timestamp`) USING BTREE, + KEY `user_data` (`sender_id`,`reported_id`) USING BTREE, + KEY `room_id` (`room_id`) USING BTREE, + KEY `issue` (`issue`) USING BTREE, + KEY `idx_tickets_sender_id` (`sender_id`), + KEY `idx_tickets_reported_id` (`reported_id`), + KEY `idx_tickets_mod_id` (`mod_id`), + KEY `idx_tickets_room_id` (`room_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `taggables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `taggables` ( + `tag_id` bigint(20) unsigned NOT NULL, + `taggable_type` varchar(255) NOT NULL, + `taggable_id` bigint(20) unsigned NOT NULL, + KEY `taggables_taggable_type_taggable_id_index` (`taggable_type`,`taggable_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `tags`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `tags` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `background_color` varchar(10) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `teams`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `teams` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `order` int(11) NOT NULL DEFAULT 0, + `badge` varchar(255) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `is_hidden` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `trax_playlist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `trax_playlist` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `trax_item_id` int(11) NOT NULL, + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=armscii8 COLLATE=armscii8_general_ci ROW_FORMAT=COMPACT; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ui_news`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ui_news` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(150) NOT NULL, + `body` text NOT NULL, + `image` mediumtext DEFAULT NULL, + `link_text` varchar(80) NOT NULL DEFAULT '', + `link_url` varchar(255) NOT NULL DEFAULT '', + `enabled` tinyint(1) NOT NULL DEFAULT 1, + `sort_order` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`), + KEY `idx_ui_news_enabled_sort` (`enabled`,`sort_order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ui_texts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ui_texts` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL, + `value` text NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `ui_texts_key_unique` (`key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `update_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `update_history` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(255) NOT NULL, + `action` varchar(255) NOT NULL, + `item` varchar(255) DEFAULT NULL, + `status` varchar(255) NOT NULL, + `message` text DEFAULT NULL, + `user` varchar(255) DEFAULT NULL, + `ip` varchar(255) DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`), + KEY `update_history_type_created_at_index` (`type`,`created_at`), + KEY `update_history_status_index` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_challenge_progress`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_challenge_progress` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `challenge_id` bigint(20) unsigned NOT NULL, + `progress` int(11) NOT NULL DEFAULT 0, + `completed` tinyint(1) NOT NULL DEFAULT 0, + `claimed` tinyint(1) NOT NULL DEFAULT 0, + `completed_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_challenge_progress_user_id_challenge_id_unique` (`user_id`,`challenge_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_custom_badge`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_custom_badge` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `badge_id` varchar(64) NOT NULL, + `badge_name` varchar(64) NOT NULL DEFAULT '', + `badge_description` varchar(255) NOT NULL DEFAULT '', + `date_created` int(11) NOT NULL DEFAULT 0, + `date_edit` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `badge_id` (`badge_id`), + KEY `user_id` (`user_id`), + CONSTRAINT `fk_user_custom_badge_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_game_ranks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_game_ranks` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `game` varchar(255) NOT NULL, + `rank_id` bigint(20) unsigned NOT NULL, + `points` int(11) NOT NULL DEFAULT 0, + `wins` int(11) NOT NULL DEFAULT 0, + `games_played` int(11) NOT NULL DEFAULT 0, + `win_streak` int(11) NOT NULL DEFAULT 0, + `best_streak` int(11) NOT NULL DEFAULT 0, + `last_played_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_game_ranks_user_id_game_unique` (`user_id`,`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_game_xp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_game_xp` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `game` varchar(255) NOT NULL, + `xp` int(11) NOT NULL DEFAULT 0, + `level` int(11) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_game_xp_user_id_game_unique` (`user_id`,`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_home_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_home_items` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `home_item_id` bigint(20) unsigned NOT NULL, + `x` int(11) NOT NULL DEFAULT 0, + `y` int(11) NOT NULL DEFAULT 0, + `z` int(11) NOT NULL DEFAULT 0, + `placed` tinyint(1) NOT NULL DEFAULT 0, + `is_reversed` tinyint(1) NOT NULL DEFAULT 0, + `extra_data` text DEFAULT NULL, + `theme` varchar(15) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_home_messages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_home_messages` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `recipient_user_id` bigint(20) unsigned NOT NULL, + `content` text NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_home_ratings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_home_ratings` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `rated_user_id` bigint(20) unsigned NOT NULL, + `rating` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_nick_icons`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_nick_icons` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `icon_key` varchar(50) NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_user_icon` (`user_id`,`icon_key`), + KEY `idx_user_id` (`user_id`), + KEY `idx_user_active` (`user_id`,`active`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_notifications`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_notifications` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `sender_id` bigint(20) unsigned DEFAULT NULL, + `recipient_id` bigint(20) unsigned NOT NULL, + `type` tinyint(4) NOT NULL, + `message` text NOT NULL, + `url` varchar(255) DEFAULT NULL, + `state` enum('unread','read','seen') NOT NULL DEFAULT 'unread', + `read_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_orders`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_orders` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `product_id` bigint(20) unsigned NOT NULL, + `order_id` varchar(255) NOT NULL, + `status` enum('pending','completed','cancelled') NOT NULL DEFAULT 'pending', + `price` int(11) NOT NULL, + `currency` varchar(255) DEFAULT NULL, + `paypal_fee` varchar(255) DEFAULT NULL, + `details` text DEFAULT NULL, + `is_delivered` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_prefixes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_prefixes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `text` varchar(50) NOT NULL, + `color` varchar(255) NOT NULL DEFAULT '#FFFFFF', + `icon` varchar(50) NOT NULL DEFAULT '', + `effect` varchar(50) NOT NULL DEFAULT '', + `font` varchar(50) NOT NULL DEFAULT '', + `catalog_prefix_id` int(11) NOT NULL DEFAULT 0, + `display_name` varchar(100) NOT NULL DEFAULT '', + `points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0, + `is_custom` tinyint(1) NOT NULL DEFAULT 1, + `active` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_user_active` (`user_id`,`active`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_referrals`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_referrals` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `referrals_total` bigint(20) unsigned NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `user_referrals_user_id_foreign` (`user_id`) USING BTREE, + CONSTRAINT `user_referrals_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_visual_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_visual_settings` ( + `user_id` int(11) NOT NULL, + `display_order` varchar(50) NOT NULL DEFAULT 'icon-prefix-name', + PRIMARY KEY (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_website_home_item`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_website_home_item` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `website_home_item_id` bigint(20) unsigned NOT NULL, + `left` decimal(8,2) DEFAULT NULL, + `top` decimal(8,2) DEFAULT NULL, + `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `z` int(11) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_window_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_window_settings` ( + `user_id` int(11) NOT NULL, + `x` int(11) NOT NULL DEFAULT 100, + `y` int(11) NOT NULL DEFAULT 100, + `width` int(11) NOT NULL DEFAULT 435, + `height` int(11) NOT NULL DEFAULT 535, + `open_searches` enum('0','1') NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(25) NOT NULL, + `real_name` varchar(25) NOT NULL DEFAULT 'KREWS DEV', + `password` varchar(255) NOT NULL, + `two_factor_secret` text DEFAULT NULL, + `two_factor_recovery_codes` text DEFAULT NULL, + `two_factor_confirmed` tinyint(1) NOT NULL DEFAULT 0, + `two_factor_confirmed_at` timestamp NULL DEFAULT NULL, + `mail` varchar(500) DEFAULT NULL, + `mail_verified` enum('0','1') NOT NULL DEFAULT '0', + `account_created` int(11) NOT NULL, + `account_day_of_birth` int(11) NOT NULL DEFAULT 0, + `last_login` int(11) NOT NULL DEFAULT 0, + `last_online` int(11) NOT NULL DEFAULT 0, + `motto` varchar(127) NOT NULL DEFAULT '', + `look` varchar(256) NOT NULL DEFAULT 'hr-115-42.hd-195-19.ch-3030-82.lg-275-1408.fa-1201.ca-1804-64', + `gender` enum('M','F') NOT NULL DEFAULT 'M', + `rank` int(11) NOT NULL DEFAULT 1, + `hidden_staff` tinyint(1) NOT NULL DEFAULT 0, + `credits` int(11) NOT NULL DEFAULT 2500, + `radio_points` int(11) NOT NULL DEFAULT 0, + `preferences` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`preferences`)), + `radio_last_active` timestamp NULL DEFAULT NULL, + `pixels` int(11) NOT NULL DEFAULT 500, + `points` int(11) NOT NULL DEFAULT 10, + `online` enum('0','1','2') NOT NULL DEFAULT '0', + `auth_ticket` varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', + `auth_ticket_expires_at` timestamp NULL DEFAULT NULL, + `remember_token_hash` varchar(64) NOT NULL DEFAULT '', + `remember_token_expires_at` int(11) unsigned NOT NULL DEFAULT 0, + `ip_register` varchar(255) NOT NULL, + `ip_current` varchar(255) NOT NULL COMMENT 'Have your CMS update this IP. If you do not do this IP banning won''t work!', + `machine_id` varchar(64) NOT NULL DEFAULT '', + `background_id` int(11) NOT NULL DEFAULT 0, + `background_border_id` int(11) NOT NULL DEFAULT 0, + `background_stand_id` int(11) NOT NULL DEFAULT 0, + `background_overlay_id` int(11) NOT NULL DEFAULT 0, + `home_room` int(11) NOT NULL DEFAULT 0, + `referral_code` varchar(255) DEFAULT NULL, + `website_balance` int(10) unsigned NOT NULL DEFAULT 0, + `secret_key` varchar(40) DEFAULT NULL, + `pincode` varchar(11) DEFAULT NULL, + `extra_rank` int(11) DEFAULT NULL, + `team_id` bigint(20) unsigned DEFAULT NULL, + `remember_token` varchar(100) DEFAULT NULL, + `avatar_background` varchar(255) DEFAULT NULL, + `provider_id` varchar(255) DEFAULT NULL, + `is_hidden` tinyint(1) NOT NULL DEFAULT 0, + `home_background` varchar(255) DEFAULT NULL, + `background_card_id` int(11) NOT NULL DEFAULT 0, + `last_username_change` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `username` (`username`) USING BTREE, + UNIQUE KEY `id` (`id`) USING BTREE, + UNIQUE KEY `referral_code` (`referral_code`), + KEY `account_created` (`account_created`) USING BTREE, + KEY `last_login` (`last_login`) USING BTREE, + KEY `last_online` (`last_online`) USING BTREE, + KEY `figure` (`motto`,`look`,`gender`) USING BTREE, + KEY `auth_ticket` (`auth_ticket`) USING BTREE, + KEY `users_team_id_foreign` (`team_id`) USING BTREE, + KEY `users_online_index` (`online`), + KEY `users_rank_index` (`rank`), + KEY `users_radio_points_index` (`radio_points`), + KEY `users_username_index` (`username`), + KEY `idx_users_remember_token_hash` (`remember_token_hash`), + CONSTRAINT `users_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `website_teams` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_achievements`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_achievements` ( + `user_id` int(11) NOT NULL, + `achievement_name` varchar(255) NOT NULL, + `progress` int(11) NOT NULL DEFAULT 1, + KEY `user_id` (`user_id`) USING BTREE, + KEY `achievement_name` (`achievement_name`) USING BTREE, + KEY `progress` (`progress`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_achievements_queue`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_achievements_queue` ( + `user_id` int(11) NOT NULL, + `achievement_id` int(11) NOT NULL, + `amount` int(11) NOT NULL, + UNIQUE KEY `unique_index` (`user_id`,`achievement_id`) USING BTREE, + UNIQUE KEY `data` (`user_id`,`achievement_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_badges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_badges` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL DEFAULT 0, + `slot_id` int(11) NOT NULL DEFAULT 0, + `badge_code` varchar(32) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_users_badges_user_code` (`user_id`,`badge_code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_clothing`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_clothing` ( + `user_id` int(11) NOT NULL, + `clothing_id` int(11) NOT NULL, + UNIQUE KEY `user_id` (`user_id`,`clothing_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_currency`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_currency` ( + `user_id` int(11) NOT NULL, + `type` int(11) NOT NULL, + `amount` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`user_id`,`type`) USING BTREE, + UNIQUE KEY `userdata` (`user_id`,`type`) USING BTREE, + KEY `amount` (`amount`) USING BTREE, + KEY `idx_users_currency_user_type` (`user_id`,`type`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_custom_badge_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_custom_badge_settings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `badge_path` varchar(255) NOT NULL DEFAULT '/var/www/gamedata/c_images/album1584', + `badge_url` varchar(255) NOT NULL DEFAULT '/gamedata/c_images/album1584', + `price_badge` int(11) NOT NULL DEFAULT 0, + `currency_type` int(11) NOT NULL DEFAULT -1, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_effects`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_effects` ( + `user_id` int(11) NOT NULL, + `effect` int(11) NOT NULL, + `duration` int(11) NOT NULL DEFAULT 86400, + `activation_timestamp` int(11) NOT NULL DEFAULT -1, + `total` int(11) NOT NULL DEFAULT 1, + UNIQUE KEY `user_id` (`user_id`,`effect`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_favorite_rooms`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_favorite_rooms` ( + `user_id` int(11) NOT NULL, + `room_id` int(11) NOT NULL, + UNIQUE KEY `user_id` (`user_id`,`room_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_ignored`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_ignored` ( + `user_id` int(11) NOT NULL, + `target_id` int(11) NOT NULL, + KEY `user_id` (`user_id`,`target_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_navigator_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_navigator_settings` ( + `user_id` int(11) NOT NULL, + `caption` varchar(128) NOT NULL, + `list_type` enum('list','thumbnails') NOT NULL DEFAULT 'list', + `display` enum('visible','collapsed') NOT NULL DEFAULT 'visible', + UNIQUE KEY `userid` (`user_id`) USING BTREE, + KEY `list_type` (`list_type`) USING BTREE, + KEY `display` (`display`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_pets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_pets` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `room_id` int(11) NOT NULL, + `name` varchar(15) NOT NULL DEFAULT 'User Pet', + `race` int(11) NOT NULL, + `type` int(11) NOT NULL, + `color` varchar(6) NOT NULL, + `happiness` int(11) NOT NULL DEFAULT 100, + `experience` int(11) NOT NULL DEFAULT 0, + `energy` int(11) NOT NULL DEFAULT 100, + `hunger` int(11) NOT NULL DEFAULT 0, + `thirst` int(11) NOT NULL DEFAULT 0, + `respect` int(11) NOT NULL DEFAULT 0, + `created` int(11) NOT NULL, + `x` int(11) NOT NULL DEFAULT 0, + `y` int(11) NOT NULL DEFAULT 0, + `z` double NOT NULL DEFAULT 0, + `rot` int(11) NOT NULL DEFAULT 0, + `hair_style` int(11) NOT NULL DEFAULT -1, + `hair_color` int(11) NOT NULL DEFAULT 0, + `saddle` enum('0','1') NOT NULL DEFAULT '0', + `ride` enum('0','1') NOT NULL DEFAULT '0', + `mp_type` int(11) NOT NULL DEFAULT 0, + `mp_color` int(11) NOT NULL DEFAULT 0, + `mp_nose` int(11) NOT NULL DEFAULT 0, + `mp_nose_color` tinyint(4) NOT NULL DEFAULT 0, + `mp_eyes` int(11) NOT NULL DEFAULT 0, + `mp_eyes_color` tinyint(4) NOT NULL DEFAULT 0, + `mp_mouth` int(11) NOT NULL DEFAULT 0, + `mp_mouth_color` tinyint(4) NOT NULL DEFAULT 0, + `mp_death_timestamp` int(11) NOT NULL DEFAULT 0, + `mp_breedable` enum('0','1') NOT NULL DEFAULT '0', + `mp_allow_breed` enum('0','1') NOT NULL DEFAULT '0', + `gnome_data` varchar(80) NOT NULL DEFAULT '', + `mp_is_dead` tinyint(1) NOT NULL DEFAULT 0, + `saddle_item_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_recipes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_recipes` ( + `user_id` int(11) NOT NULL, + `recipe` int(11) NOT NULL, + UNIQUE KEY `user_id` (`user_id`,`recipe`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_remember_families`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_remember_families` ( + `family_id` char(36) NOT NULL, + `user_id` int(11) NOT NULL, + `current_version` int(11) NOT NULL DEFAULT 1, + `created_at` int(11) NOT NULL, + `expires_at` int(11) NOT NULL, + `revoked` tinyint(1) NOT NULL DEFAULT 0, + `last_ip` varchar(45) NOT NULL DEFAULT '', + PRIMARY KEY (`family_id`), + KEY `idx_users_remember_families_user_id` (`user_id`), + KEY `idx_users_remember_families_expires_at` (`expires_at`), + CONSTRAINT `fk_users_remember_families_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_saved_searches`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_saved_searches` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `search_code` varchar(255) NOT NULL, + `filter` varchar(255) DEFAULT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_settings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL DEFAULT 0 COMMENT 'WARNING: DONT HAVE YOUR CMS INSERT ANYTHING IN HERE. THE EMULATOR DOES THIS FOR YOU!', + `credits` int(11) NOT NULL DEFAULT 0, + `achievement_score` int(11) NOT NULL DEFAULT 0, + `daily_respect_points` int(11) NOT NULL DEFAULT 3, + `daily_pet_respect_points` int(11) NOT NULL DEFAULT 3, + `respects_given` int(11) NOT NULL DEFAULT 0, + `respects_received` int(11) NOT NULL DEFAULT 0, + `guild_id` int(11) NOT NULL DEFAULT 0, + `can_change_name` enum('0','1') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0', + `can_trade` enum('0','1') NOT NULL DEFAULT '1', + `is_citizen` enum('0','1') NOT NULL DEFAULT '0', + `citizen_level` int(11) NOT NULL DEFAULT 0, + `helper_level` int(11) NOT NULL DEFAULT 0, + `tradelock_amount` int(11) NOT NULL DEFAULT 0, + `cfh_send` int(11) NOT NULL DEFAULT 0 COMMENT 'Amount of CFHs been send. Not include abusive.', + `cfh_abusive` int(11) NOT NULL DEFAULT 0 COMMENT 'Amount of abusive CFHs have been send.', + `cfh_warnings` int(11) NOT NULL DEFAULT 0 COMMENT 'Amount of warnings a user has received.', + `cfh_bans` int(11) NOT NULL DEFAULT 0 COMMENT 'Amount of bans a user has received.', + `block_following` enum('0','1') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0', + `block_friendrequests` enum('0','1') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0', + `block_roominvites` enum('0','1') NOT NULL DEFAULT '0', + `volume_system` int(11) NOT NULL DEFAULT 100, + `volume_furni` int(11) NOT NULL DEFAULT 100, + `volume_trax` int(11) NOT NULL DEFAULT 100, + `old_chat` enum('0','1') NOT NULL DEFAULT '0', + `block_camera_follow` enum('0','1') NOT NULL DEFAULT '0', + `chat_color` int(11) NOT NULL DEFAULT 0, + `home_room` int(11) NOT NULL DEFAULT 0, + `online_time` int(11) NOT NULL DEFAULT 0 COMMENT 'Total online time in seconds.', + `tags` varchar(255) NOT NULL DEFAULT 'Arcturus Emulator;', + `club_expire_timestamp` int(11) NOT NULL DEFAULT 0, + `login_streak` int(11) NOT NULL DEFAULT 0, + `rent_space_id` int(11) NOT NULL DEFAULT 0, + `rent_space_endtime` int(11) NOT NULL DEFAULT 0, + `hof_points` int(11) NOT NULL DEFAULT 0, + `block_alerts` enum('0','1') NOT NULL DEFAULT '0', + `talent_track_citizenship_level` int(11) NOT NULL DEFAULT -1, + `talent_track_helpers_level` int(11) NOT NULL DEFAULT -1, + `ignore_bots` enum('0','1') NOT NULL DEFAULT '0', + `ignore_pets` enum('0','1') NOT NULL DEFAULT '0', + `nux` enum('0','1') NOT NULL DEFAULT '0', + `mute_end_timestamp` int(11) NOT NULL DEFAULT 0, + `allow_name_change` enum('0','1') NOT NULL DEFAULT '0', + `perk_trade` enum('0','1') NOT NULL DEFAULT '0' COMMENT 'Defines if a player has obtained the perk TRADE. When hotel.trading.requires.perk is set to 1, this perk is required in order to trade. Perk is obtained from the talen track.', + `forums_post_count` int(11) DEFAULT 0, + `ui_flags` int(11) NOT NULL DEFAULT 1, + `has_gotten_default_saved_searches` tinyint(1) NOT NULL DEFAULT 0, + `hc_gifts_claimed` int(11) DEFAULT 0, + `last_hc_payday` int(11) DEFAULT 0, + `max_rooms` int(11) DEFAULT 50, + `max_friends` int(11) DEFAULT 300, + `streak_last` date NOT NULL DEFAULT '2025-04-18', + `streak_days` int(11) NOT NULL DEFAULT 0, + `builders_club_bonus_furni` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `user_id` (`user_id`) USING BTREE, + KEY `achievement_score` (`achievement_score`) USING BTREE, + KEY `guild_id` (`guild_id`) USING BTREE, + KEY `can_trade` (`can_trade`) USING BTREE, + KEY `online_time` (`online_time`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_subscriptions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_subscriptions` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `subscription_type` varchar(255) DEFAULT NULL, + `timestamp_start` int(10) unsigned DEFAULT NULL, + `duration` int(10) unsigned DEFAULT NULL, + `active` tinyint(1) DEFAULT 1, + PRIMARY KEY (`id`) USING BTREE, + KEY `user_id` (`user_id`) USING BTREE, + KEY `subscription_type` (`subscription_type`) USING BTREE, + KEY `timestamp_start` (`timestamp_start`) USING BTREE, + KEY `active` (`active`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_target_offer_purchases`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_target_offer_purchases` ( + `user_id` int(11) NOT NULL, + `offer_id` int(11) NOT NULL, + `state` int(11) NOT NULL DEFAULT 0, + `amount` int(11) NOT NULL DEFAULT 0, + `last_purchase` int(11) NOT NULL DEFAULT 0, + UNIQUE KEY `use_id` (`user_id`,`offer_id`) USING BTREE, + KEY `idx_utop_offer_id` (`offer_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_wardrobe`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_wardrobe` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL DEFAULT 0, + `slot_id` int(11) NOT NULL DEFAULT 0, + `look` varchar(256) NOT NULL, + `gender` enum('M','F') NOT NULL DEFAULT 'F', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `views`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `views` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `viewable_type` varchar(255) NOT NULL, + `viewable_id` bigint(20) unsigned NOT NULL, + `visitor` text DEFAULT NULL, + `collection` varchar(255) DEFAULT NULL, + `viewed_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`) USING BTREE, + KEY `views_viewable_type_viewable_id_index` (`viewable_type`,`viewable_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `voucher_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `voucher_history` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `voucher_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_vh_voucher_id` (`voucher_id`), + KEY `idx_vh_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `vouchers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `vouchers` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `code` varchar(10) NOT NULL, + `credits` int(11) NOT NULL DEFAULT 0, + `points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0, + `catalog_item_id` int(11) NOT NULL DEFAULT 0, + `amount` int(11) NOT NULL DEFAULT 1, + `limit` int(11) NOT NULL DEFAULT -1, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_ads`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_ads` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `image` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_api_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_api_settings` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL, + `value` varchar(255) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `website_api_settings_key_unique` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_article_comments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_article_comments` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `article_id` bigint(20) unsigned NOT NULL, + `user_id` int(11) NOT NULL, + `comment` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_article_comments_article_id_foreign` (`article_id`) USING BTREE, + KEY `website_article_comments_user_id_foreign` (`user_id`) USING BTREE, + KEY `comments_article_id_index` (`article_id`), + CONSTRAINT `website_article_comments_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `website_articles` (`id`) ON DELETE CASCADE, + CONSTRAINT `website_article_comments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_article_reactions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_article_reactions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL, + `article_id` bigint(20) unsigned NOT NULL, + `reaction` varchar(50) NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_article_reactions_article_id_foreign` (`article_id`) USING BTREE, + CONSTRAINT `website_article_reactions_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `website_articles` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_articles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_articles` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `slug` varchar(255) NOT NULL, + `title` varchar(255) NOT NULL, + `short_story` varchar(255) NOT NULL, + `full_story` longtext NOT NULL, + `is_published` tinyint(1) NOT NULL DEFAULT 0, + `image` varchar(255) NOT NULL, + `can_comment` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `deleted_at` timestamp NULL DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_articles_slug_unique` (`slug`) USING BTREE, + KEY `website_articles_user_id_foreign` (`user_id`) USING BTREE, + KEY `articles_user_created_index` (`user_id`,`created_at`), + KEY `articles_user_id_index` (`user_id`), + CONSTRAINT `website_articles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_badgedata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_badgedata` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `badge_key` varchar(255) NOT NULL, + `badge_name` varchar(255) NOT NULL, + `badge_description` text NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_badgedata_badge_key_unique` (`badge_key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_badges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_badges` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `badge_key` varchar(255) NOT NULL, + `badge_name` varchar(255) NOT NULL, + `badge_description` text NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_badges_badge_key_unique` (`badge_key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_beta_codes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_beta_codes` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `code` varchar(255) NOT NULL, + `user_id` int(11) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_beta_codes_code_unique` (`code`) USING BTREE, + KEY `beta_codes_code_index` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_blocked_countries`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_blocked_countries` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `country_code` varchar(2) NOT NULL, + `country_name` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_collectibles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_collectibles` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `image` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_drawbadges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_drawbadges` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `badge_path` varchar(255) NOT NULL, + `badge_url` varchar(255) NOT NULL, + `badge_name` varchar(255) NOT NULL, + `badge_desc` varchar(255) NOT NULL, + `published` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_drawbadges_user_id_foreign` (`user_id`) USING BTREE, + CONSTRAINT `website_drawbadges_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_help_center_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_help_center_categories` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `content` text NOT NULL, + `position` int(10) unsigned NOT NULL DEFAULT 1, + `image_url` varchar(255) DEFAULT NULL, + `button_text` varchar(255) DEFAULT NULL, + `button_url` varchar(255) DEFAULT NULL, + `button_color` varchar(16) NOT NULL DEFAULT '#eeb425', + `button_border_color` varchar(16) NOT NULL DEFAULT '#facc15', + `small_box` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_help_center_categories_name_unique` (`name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_help_center_ticket_replies`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_help_center_ticket_replies` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `ticket_id` bigint(20) unsigned NOT NULL, + `user_id` int(11) NOT NULL, + `content` text NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_help_center_ticket_replies_ticket_id_foreign` (`ticket_id`) USING BTREE, + KEY `website_help_center_ticket_replies_user_id_foreign` (`user_id`) USING BTREE, + CONSTRAINT `website_help_center_ticket_replies_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `website_help_center_tickets` (`id`) ON DELETE CASCADE, + CONSTRAINT `website_help_center_ticket_replies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_help_center_tickets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_help_center_tickets` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `category_id` bigint(20) unsigned DEFAULT NULL, + `title` varchar(255) NOT NULL, + `content` text NOT NULL, + `open` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_help_center_tickets_user_id_foreign` (`user_id`) USING BTREE, + KEY `website_help_center_tickets_category_id_foreign` (`category_id`) USING BTREE, + KEY `tickets_user_open_index` (`user_id`,`open`), + KEY `tickets_open_created_index` (`open`,`created_at`), + KEY `tickets_open_user_index` (`open`,`user_id`), + CONSTRAINT `website_help_center_tickets_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `website_help_center_categories` (`id`) ON DELETE CASCADE, + CONSTRAINT `website_help_center_tickets_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_home_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_home_categories` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `website_home_category_id` bigint(20) unsigned DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `permission_id` bigint(20) unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_home_categories_name_unique` (`name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_home_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_home_items` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `website_home_category_id` bigint(20) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `image_url` varchar(255) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `type` enum('sticker','background','widget','note') NOT NULL, + `count` int(11) NOT NULL DEFAULT 1, + `price` int(11) NOT NULL DEFAULT 0, + `currency_type` int(11) DEFAULT NULL, + `currency_price` int(11) NOT NULL DEFAULT 0, + `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `permission_id` bigint(20) unsigned NOT NULL DEFAULT 1, + `maximum_purchases` int(11) NOT NULL DEFAULT -1, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_housekeeping_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_housekeeping_permissions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `permission` varchar(255) NOT NULL, + `min_rank` int(11) NOT NULL, + `description` varchar(255) DEFAULT NULL COMMENT 'Describes the permissions', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_housekeeping_permissions_permission_unique` (`permission`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_installation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_installation` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `step` int(10) unsigned DEFAULT 0, + `completed` tinyint(1) NOT NULL DEFAULT 0, + `installation_key` varchar(255) NOT NULL, + `user_ip` varchar(255) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_ip_blacklist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_ip_blacklist` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `ip_address` varchar(255) NOT NULL, + `asn` varchar(255) DEFAULT NULL, + `country_code` varchar(255) DEFAULT NULL, + `country_name` varchar(255) DEFAULT NULL, + `blacklist_country` tinyint(1) NOT NULL DEFAULT 0, + `blacklist_asn` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_ip_whitelist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_ip_whitelist` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `ip_address` varchar(255) NOT NULL, + `asn` varchar(255) DEFAULT NULL, + `country_code` varchar(255) DEFAULT NULL, + `country_name` varchar(255) DEFAULT NULL, + `whitelist_country` tinyint(1) NOT NULL DEFAULT 0, + `whitelist_asn` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_languages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_languages` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `country_code` varchar(8) NOT NULL, + `language` varchar(255) NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_languages_country_code_unique` (`country_code`) USING BTREE, + UNIQUE KEY `website_languages_language_unique` (`language`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_maintenance_tasks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_maintenance_tasks` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) DEFAULT NULL, + `task` varchar(255) NOT NULL, + `completed` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_maintenance_tasks_user_id_foreign` (`user_id`) USING BTREE, + CONSTRAINT `website_maintenance_tasks_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_navigations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_navigations` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `icon` varchar(255) DEFAULT NULL, + `order` int(10) unsigned NOT NULL DEFAULT 0, + `parent_id` bigint(20) unsigned DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `website_navigations_parent_id_foreign` (`parent_id`), + CONSTRAINT `website_navigations_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `website_navigations` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_open_positions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_open_positions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `position_kind` varchar(255) NOT NULL DEFAULT 'rank', + `permission_id` int(11) DEFAULT NULL, + `team_id` bigint(20) unsigned DEFAULT NULL, + `description` text NOT NULL, + `apply_from` timestamp NULL DEFAULT NULL, + `apply_to` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `open_positions_unique_permission_id` (`permission_id`) USING BTREE, + UNIQUE KEY `open_positions_unique_team_id` (`team_id`) USING BTREE, + CONSTRAINT `website_open_positions_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `website_teams` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_paypal_transactions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_paypal_transactions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `transaction_id` varchar(255) NOT NULL, + `status` varchar(255) DEFAULT NULL, + `description` varchar(512) DEFAULT NULL, + `amount` double(8,2) NOT NULL, + `expected_amount` decimal(10,2) DEFAULT NULL, + `currency` varchar(255) NOT NULL DEFAULT 'USD', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_paypal_transactions_user_id_foreign` (`user_id`) USING BTREE, + CONSTRAINT `website_paypal_transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_permissions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `permission` varchar(255) NOT NULL, + `min_rank` varchar(255) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL COMMENT 'Explanation on what the permission is used for', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_permissions_key_unique` (`permission`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_rare_value_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_rare_value_categories` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `badge` varchar(255) NOT NULL, + `priority` int(10) unsigned NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_rare_value_categories_name_unique` (`name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_rare_values`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_rare_values` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `category_id` bigint(20) unsigned NOT NULL, + `item_id` int(11) DEFAULT NULL, + `name` varchar(255) NOT NULL, + `credit_value` varchar(255) DEFAULT NULL, + `currency_value` varchar(255) DEFAULT NULL, + `currency_type` varchar(255) NOT NULL DEFAULT 'diamonds', + `furniture_icon` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_rare_values_category_id_foreign` (`category_id`) USING BTREE, + KEY `website_rare_values_item_id_index` (`item_id`) USING BTREE, + KEY `website_rare_values_name_index` (`name`) USING BTREE, + CONSTRAINT `website_rare_values_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `website_rare_value_categories` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_rule_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_rule_categories` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `description` varchar(255) NOT NULL, + `badge` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_rule_categories_name_unique` (`name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_rules`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_rules` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `category_id` bigint(20) unsigned DEFAULT NULL, + `paragraph` varchar(8) NOT NULL, + `rule` text NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_rules_category_id_foreign` (`category_id`) USING BTREE, + CONSTRAINT `website_rules_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `website_rule_categories` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_settings` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL, + `value` text NOT NULL, + `comment` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_settings_key_unique` (`key`) USING BTREE, + KEY `website_settings_key_index` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_shop_article_features`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_shop_article_features` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `article_id` bigint(20) unsigned NOT NULL, + `content` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_shop_article_features_article_id_foreign` (`article_id`) USING BTREE, + CONSTRAINT `website_shop_article_features_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `website_shop_articles` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_shop_articles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_shop_articles` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `website_shop_category_id` bigint(20) unsigned DEFAULT NULL, + `name` varchar(255) NOT NULL, + `info` varchar(255) NOT NULL, + `icon_url` varchar(255) NOT NULL, + `color` varchar(255) NOT NULL, + `costs` int(10) unsigned NOT NULL, + `give_rank` int(11) DEFAULT NULL, + `credits` int(10) unsigned DEFAULT NULL, + `duckets` int(10) unsigned DEFAULT NULL, + `diamonds` int(10) unsigned DEFAULT NULL, + `badges` varchar(255) DEFAULT NULL, + `furniture` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, + `position` int(10) unsigned NOT NULL DEFAULT 0, + `is_giftable` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_shop_articles_name_unique` (`name`) USING BTREE, + KEY `website_shop_articles_give_rank_foreign` (`give_rank`) USING BTREE, + CONSTRAINT `website_shop_articles_give_rank_foreign` FOREIGN KEY (`give_rank`) REFERENCES `permissions` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_shop_categories`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_shop_categories` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `slug` varchar(255) NOT NULL, + `icon` varchar(255) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_shop_categories_slug_unique` (`slug`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_shop_vouchers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_shop_vouchers` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `code` varchar(255) NOT NULL, + `max_uses` int(10) unsigned NOT NULL DEFAULT 1, + `use_count` int(10) unsigned NOT NULL DEFAULT 0, + `amount` int(10) unsigned NOT NULL, + `expires_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_shop_vouchers_code_unique` (`code`) USING BTREE, + KEY `shop_vouchers_code_index` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_staff_application_statuses`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_staff_application_statuses` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `application_id` bigint(20) unsigned NOT NULL, + `user_id` int(11) NOT NULL, + `staff_id` int(11) NOT NULL, + `accepted` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_staff_application_statuses_application_id_foreign` (`application_id`) USING BTREE, + KEY `website_staff_application_statuses_user_id_foreign` (`user_id`) USING BTREE, + KEY `website_staff_application_statuses_staff_id_foreign` (`staff_id`) USING BTREE, + CONSTRAINT `website_staff_application_statuses_application_id_foreign` FOREIGN KEY (`application_id`) REFERENCES `website_staff_applications` (`id`) ON DELETE CASCADE, + CONSTRAINT `website_staff_application_statuses_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, + CONSTRAINT `website_staff_application_statuses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_staff_applications`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_staff_applications` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `rank_id` int(11) DEFAULT NULL, + `team_id` bigint(20) unsigned DEFAULT NULL, + `old_rank_id` int(11) DEFAULT NULL, + `content` text NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'pending', + `approved_by` int(10) unsigned DEFAULT NULL, + `approved_at` timestamp NULL DEFAULT NULL, + `rejected_by` int(10) unsigned DEFAULT NULL, + `rejected_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_staff_applications_user_team_unique` (`user_id`,`team_id`) USING BTREE, + UNIQUE KEY `wsa_user_team_unique` (`user_id`,`team_id`) USING BTREE, + KEY `website_staff_applications_user_id_foreign` (`user_id`) USING BTREE, + KEY `website_staff_applications_rank_id_foreign` (`rank_id`) USING BTREE, + KEY `website_staff_applications_old_rank_id_foreign` (`old_rank_id`) USING BTREE, + KEY `wsa_team_id_fk` (`team_id`) USING BTREE, + CONSTRAINT `website_staff_applications_old_rank_id_foreign` FOREIGN KEY (`old_rank_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, + CONSTRAINT `website_staff_applications_rank_id_foreign` FOREIGN KEY (`rank_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, + CONSTRAINT `website_staff_applications_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `website_teams` (`id`) ON DELETE SET NULL, + CONSTRAINT `website_staff_applications_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, + CONSTRAINT `wsa_team_id_fk` FOREIGN KEY (`team_id`) REFERENCES `website_teams` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_teams`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_teams` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `rank_name` varchar(255) NOT NULL, + `hidden_rank` tinyint(1) NOT NULL DEFAULT 0, + `badge` varchar(255) DEFAULT NULL, + `job_description` varchar(255) DEFAULT NULL, + `staff_color` varchar(255) NOT NULL DEFAULT '#327fa8', + `staff_background` varchar(255) NOT NULL DEFAULT 'staff-bg.png', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_teams_rank_name_unique` (`rank_name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_used_shop_vouchers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_used_shop_vouchers` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `voucher_id` bigint(20) unsigned NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_used_shop_vouchers_user_id_foreign` (`user_id`) USING BTREE, + KEY `website_used_shop_vouchers_voucher_id_foreign` (`voucher_id`) USING BTREE, + KEY `vouchers_user_voucher_index` (`user_id`,`voucher_id`), + CONSTRAINT `website_used_shop_vouchers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, + CONSTRAINT `website_used_shop_vouchers_voucher_id_foreign` FOREIGN KEY (`voucher_id`) REFERENCES `website_shop_vouchers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_user_guestbooks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_user_guestbooks` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `profile_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `message` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + KEY `website_user_guestbooks_profile_id_foreign` (`profile_id`) USING BTREE, + KEY `website_user_guestbooks_user_id_foreign` (`user_id`) USING BTREE, + CONSTRAINT `website_user_guestbooks_profile_id_foreign` FOREIGN KEY (`profile_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, + CONSTRAINT `website_user_guestbooks_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_wordfilter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_wordfilter` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `word` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE KEY `website_wordfilter_word_unique` (`word`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_writeable_boxes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_writeable_boxes` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `content` text NOT NULL, + `order` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wired_emulator_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `wired_emulator_settings` ( + `key` varchar(191) NOT NULL, + `value` text NOT NULL, + `comment` text NOT NULL, + PRIMARY KEY (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wired_rewards_given`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `wired_rewards_given` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `wired_item` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `reward_id` int(11) NOT NULL, + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wordfilter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `wordfilter` ( + `key` varchar(256) NOT NULL COMMENT 'The word to filter.', + `replacement` varchar(16) NOT NULL COMMENT 'What the word should be replaced with.', + `hide` tinyint(1) NOT NULL DEFAULT 0, + `report` tinyint(1) NOT NULL DEFAULT 0, + `mute` tinyint(1) NOT NULL DEFAULT 0, + `user_id` bigint(20) unsigned DEFAULT NULL, + UNIQUE KEY `key` (`key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `youtube_playlists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `youtube_playlists` ( + `item_id` int(11) NOT NULL, + `playlist_id` varchar(255) NOT NULL COMMENT 'YouTube playlist ID', + `order` int(11) NOT NULL, + UNIQUE KEY `item_id` (`item_id`,`playlist_id`,`order`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 DROP PROCEDURE IF EXISTS `refresh_permission_definition_rank_columns` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_uca1400_ai_ci */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`%` PROCEDURE `refresh_permission_definition_rank_columns`() +BEGIN + DECLARE done INT DEFAULT 0; + DECLARE current_rank_id INT; + DECLARE current_column_name VARCHAR(32); + DECLARE column_exists INT DEFAULT 0; + DECLARE rank_cursor CURSOR FOR SELECT `id` FROM `permission_ranks` ORDER BY `id` ASC; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; + + OPEN rank_cursor; + + rank_loop: LOOP + FETCH rank_cursor INTO current_rank_id; + + IF done = 1 THEN + LEAVE rank_loop; + END IF; + + SET current_column_name = CONCAT('rank_', current_rank_id); + + SELECT COUNT(*) + INTO column_exists + FROM `information_schema`.`columns` + WHERE `table_schema` = DATABASE() + AND `table_name` = 'permission_definitions' + AND `column_name` = current_column_name; + + IF column_exists = 0 THEN + SET @alter_permissions_column_sql = CONCAT( + 'ALTER TABLE `permission_definitions` ADD COLUMN `', + current_column_name, + '` tinyint(3) unsigned NOT NULL DEFAULT 0' + ); + + PREPARE alter_permissions_column_stmt FROM @alter_permissions_column_sql; + EXECUTE alter_permissions_column_stmt; + DEALLOCATE PREPARE alter_permissions_column_stmt; + END IF; + END LOOP; + + CLOSE rank_cursor; +END +;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 DROP PROCEDURE IF EXISTS `refresh_permission_definition_values` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_uca1400_ai_ci */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`%` PROCEDURE `refresh_permission_definition_values`() +BEGIN + DECLARE done INT DEFAULT 0; + DECLARE current_rank_id INT; + DECLARE current_column_name VARCHAR(32); + DECLARE rank_cursor CURSOR FOR SELECT `id` FROM `permission_ranks` ORDER BY `id` ASC; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; + + OPEN rank_cursor; + + rank_loop: LOOP + FETCH rank_cursor INTO current_rank_id; + + IF done = 1 THEN + LEAVE rank_loop; + END IF; + + SET current_column_name = CONCAT('rank_', current_rank_id); + + SELECT GROUP_CONCAT( + CONCAT( + 'SELECT ''', + REPLACE(`column_name`, '''', ''''''), + ''' AS permission_key, CAST(COALESCE(`', + REPLACE(`column_name`, '`', '``'), + '`, ''0'') AS UNSIGNED) AS permission_value FROM `permissions` WHERE `id` = ', + current_rank_id + ) + ORDER BY `ordinal_position` + SEPARATOR ' UNION ALL ' + ) INTO @permission_rank_source_sql + FROM `information_schema`.`columns` + WHERE `table_schema` = DATABASE() + AND `table_name` = 'permissions' + AND `column_name` NOT IN ( + 'id', + 'rank_name', + 'hidden_rank', + 'badge', + 'job_description', + 'staff_color', + 'staff_background', + 'level', + 'room_effect', + 'log_commands', + 'prefix', + 'prefix_color', + 'auto_credits_amount', + 'auto_pixels_amount', + 'auto_gotw_amount', + 'auto_points_amount' + ); + + SET @permission_rank_update_sql = CONCAT( + 'UPDATE `permission_definitions` pd ', + 'INNER JOIN (', + @permission_rank_source_sql, + ') src ON src.permission_key = pd.permission_key ', + 'SET pd.`', + current_column_name, + '` = src.permission_value' + ); + + PREPARE permission_rank_update_stmt FROM @permission_rank_update_sql; + EXECUTE permission_rank_update_stmt; + DEALLOCATE PREPARE permission_rank_update_stmt; + END LOOP; + + CLOSE rank_cursor; +END +;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*M!100616 SET NOTE_VERBOSITY=@OLD_NOTE_VERBOSITY */; + +/*M!999999\- enable the sandbox mode */ +SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0; +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'2014_10_12_100000_create_password_resets_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (2,'2014_10_12_200000_add_two_factor_columns_to_users_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (3,'2019_08_19_000000_create_failed_jobs_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (5,'2022_08_01_181153_create_activity_log_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (6,'2022_08_01_181154_add_event_column_to_activity_log_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (7,'2022_08_01_181155_add_batch_uuid_column_to_activity_log_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (8,'2022_08_01_204744_create_table_website_settings',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (9,'2022_08_01_225834_create_website_articles_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (10,'2022_08_04_171615_create_website_languages_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (11,'2022_08_06_022347_add_referral_code_to_users_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (12,'2022_08_06_022514_create_user_referrals_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (13,'2022_08_06_022636_create_referrals_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (14,'2022_08_06_022745_create_claimed_referral_logs_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (15,'2022_08_14_210602_add_hidden_staff_to_users_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (16,'2022_08_14_210623_add_hidden_rank_to_permissions_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (17,'2022_08_25_225959_change_user_id_on_website_articles_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (18,'2022_08_26_224418_create_website_ip_whitelist_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (19,'2022_08_26_224659_create_website_ip_blacklist_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (20,'2022_08_26_225952_create_website_permissions_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (21,'2022_09_17_225245_add_staff_color_and_description_to_permissions_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2022_09_25_153707_add_staff_background_to_permissions_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2022_09_26_123543_add_website_article_reactions_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2022_10_11_135920_create_sessions_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (27,'2022_10_28_144239_add_two_factor_confirmed_to_users_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (28,'2022_11_12_231917_create_website_wordfilter_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (29,'2022_11_15_190549_create_website_beta_codes_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (30,'2022_11_29_141603_rename_website_permissions_columns',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (31,'2022_11_29_145238_create_website_teams_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (32,'2022_11_29_145239_add_teams_id_to_users_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (33,'2022_12_03_140445_create_website_staff_applications_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (34,'2022_12_06_233823_create_website_open_positions_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (35,'2023_01_08_134509_create_website_article_comments_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (36,'2023_01_11_211401_create_website_rare_value_categories_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (37,'2023_01_11_211508_create_website_rare_values_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (38,'2023_01_15_144949_create_website_rule_categories_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (39,'2023_01_15_145015_create_website_rules_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (40,'2023_01_15_215807_add_deleted_at_to_website_articles_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (41,'2023_01_16_171014_add_can_comment_to_website_articles_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (42,'2023_02_18_000000_rename_password_resets_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (43,'2023_04_04_212429_create_website_installation_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (44,'2023_04_07_231919_remove_can_apply_from_permissions_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (45,'2023_06_09_191622_create_website_help_center_categories_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (46,'2023_06_09_192043_create_website_help_center_tickets_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (47,'2023_06_10_193615_create_website_paypal_transactions',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (48,'2023_06_10_193635_create_website_shop_articles',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (49,'2023_06_11_022341_add_website_balance_to_users_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (50,'2023_06_11_024437_create_website_shop_vouchers_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (51,'2023_06_11_025034_create_website_used_shop_vouchers_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (52,'2023_06_11_193806_create_website_shop_article_features_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (53,'2023_07_27_160817_create_website_help_center_ticket_replies_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (54,'2023_08_01_202051_update_features_column_on_website_shop_article_features_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (55,'2023_09_08_153004_change_icon_to_icon_url_oi_website_shop_articles_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (56,'2023_09_09_030403_add_item_id_index_to_items_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (57,'2022_08_10_232731_create_activity_log_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (58,'2022_08_10_232732_add_event_column_to_activity_log_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (59,'2022_08_10_232733_add_batch_uuid_column_to_activity_log_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (60,'2022_08_11_014221_create_housekeeping_settings_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (61,'2022_08_11_033052_create_housekeeping_permissions_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (62,'2022_12_10_143518_create_website_staff_application_statuses_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (63,'2022_12_10_162910_add_old_rank_id_to_website_staff_applications_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (64,'2022_12_29_013412_create_website_articles_table',2); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (65,'2023_09_13_130322_update_password_reset_tokens_created_at',3); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (66,'2024_02_10_155321_create_website_user_guestbooks_table',4); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (67,'2014_10_12_100000_create_password_reset_tokens_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (68,'2023_04_24_180602_add_missing_columns_to_users_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (69,'2023_04_24_180815_create_navigations_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (70,'2023_04_24_180916_create_sub_navigations_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (71,'2023_05_04_192146_create_cms_settings_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (72,'2023_05_05_212903_create_articles_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (73,'2023_05_05_213447_create_tags_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (74,'2023_05_05_213846_create_taggables_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (75,'2023_05_12_120640_create_article_comments_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (76,'2023_05_24_133644_add_missing_columns_to_permissions_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (77,'2023_06_07_015430_create_camera_likes_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (78,'2023_06_14_133400_create_help_questions_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (79,'2023_06_14_133819_create_help_question_categories_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (80,'2023_06_14_133825_create_help_question_category_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (81,'2023_06_16_012100_create_views_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (82,'2023_06_21_162802_create_article_reactions_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (83,'2023_06_28_170047_create_home_categories_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (84,'2023_06_28_170909_create_home_items_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (85,'2023_06_28_171322_create_user_home_items_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (86,'2023_07_19_130421_create_user_home_ratings_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (87,'2023_07_19_175925_create_user_home_messages_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (88,'2023_12_08_110459_add_avatar_background_to_users_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (89,'2024_01_06_122528_create_teams_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (90,'2024_01_08_120301_create_shop_categories_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (91,'2024_01_16_140205_create_shop_products_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (92,'2024_01_16_141553_create_shop_product_items_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (93,'2024_01_27_203340_create_user_orders_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (94,'2024_01_29_201113_create_camera_web_views_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (95,'2024_02_02_190127_create_cms_writeable_boxes_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (96,'2024_02_07_165251_add_provider_id_to_users_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (97,'2024_02_09_201913_create_permission_roles_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (98,'2024_02_15_122237_create_ip_data_list_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (99,'2024_02_18_023924_change_content_column_to_articles_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (100,'2024_02_26_130942_change_type_column_to_shop_product_items_table',5); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (101,'2024_01_06_123103_add_team_id_column_to_users_table',6); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (102,'2024_02_18_153104_create_user_notifications_table',7); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (103,'2024_03_28_105549_create_author_notifications_table',7); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (104,'2024_04_18_000436_add_is_hidden_column_to_users_table',7); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (105,'2024_06_15_093257_create_website_shop_categories_table',8); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (106,'2024_06_15_093658_add_category_id_to_website_shop_articles_table',8); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (107,'2024_06_16_122838_add_is_giftable_to_website_shop_articles_table',8); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (108,'2024_06_16_184306_create_website_maintenance_tasks_table',8); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (109,'2024_06_16_184358_change_value_column_type_on_website_settings_table',8); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (110,'2018_01_01_000000_create_action_events_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (111,'2019_05_10_000000_add_fields_to_action_events_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (112,'2021_08_25_193039_create_nova_notifications_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (113,'2022_04_26_000000_add_fields_to_nova_notifications_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (114,'2022_12_19_000000_create_field_attachments_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (115,'2024_07_26_123024_create_website_home_categories_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (116,'2024_07_26_123435_create_website_home_items_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (117,'2024_07_26_131357_alter_users_add_home_background',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (118,'2024_07_26_184713_create_user_website_home_item_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (119,'2024_07_26_184714_alter_user_website_home_item_add_z_index',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (120,'2024_08_02_215448_alter_website_home_categories_add_permission_id',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (121,'2024_08_02_215448_alter_website_home_items_add_permission_id',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (122,'2024_08_04_194957_create_badges_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (123,'2024_08_04_205538_create_room_ads_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (124,'2024_08_04_212436_create_furniture_data_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (125,'2024_08_04_212459_create_product_data_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (126,'2024_08_04_212504_create_ui_texts_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (127,'2024_08_06_220725_alter_permissions_add_admin_permissions',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (128,'2024_08_08_143713_alter_camera_web_add_approved',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (129,'2024_08_08_153706_create_website_collectibles_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (130,'2024_08_17_205538_create_catalog_images_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (131,'2024_08_17_223525_alter_website_articles',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (132,'2024_08_17_243525_alter_website_home_items',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (133,'2024_08_18_011250_create_banned_usernames_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (134,'2024_08_19_023450_create_camera_web_reactions_table',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (135,'2024_08_19_121149_alter_action_events',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (136,'2024_08_27_023450_alter_product_data_change_descript_to_longtext',9); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (137,'2024_08_28_134115_truncate_website_shop_articles',10); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (138,'2024_09_09_214143_change_table_ui_texts_modify_value_to_text',11); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (139,'2022_08_11_033052_create_website_housekeeping_permissions_table',12); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (140,'2024_12_18_201247_create_tags_table',13); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (141,'2024_12_19_103846_create_taggables_table',14); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (142,'2024_12_24_100950_add_visible_to_camera_web_table',14); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (143,'2024_12_31_113038_update_subject_id_column_in_activity_log_table',15); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (144,'2025_01_06_132851_create_website_badgedata_table',16); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (145,'2025_01_06_132851_create_website_badges_table',16); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (146,'2025_01_09_102116_create_website_ads_table',16); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (147,'2025_03_09_152802_create_cache_table',17); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (150,'2025_07_21_102112_create_website_drawbadge_table',18); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (151,'2025_07_21_108114_create_website_drawbadge_table',19); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (152,'2014_01_01_000000_core_sql_file',20); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (153,'2026_01_08_173538_add_added_by_to_wordfilter_table',21); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (154,'2025_10_07_000000_add_catalog_icons_path_to_website_settings',22); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (155,'2025_10_13_105139_add_team_and_kind_to_website_open_positions_table',22); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (156,'2025_10_13_110257_change_description_to_text_on_website_open_positions_table',22); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (157,'2025_10_13_114314_add_team_to_website_staff_applications_table',22); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (158,'2025_10_13_114411_add_team_support_to_website_open_positions_table',22); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (159,'2025_10_13_130215_make_permission_id_nullable_on_website_open_positions',22); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (160,'2025_10_14_073736_add_status_to_website_staff_applications_table',22); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (162,'2026_02_04_174420_create_radio_ranks_table',23); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (163,'2026_02_04_174422_create_radio_shouts_table',24); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (164,'2026_02_04_204305_add_radio_auto_play_setting',25); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (165,'2026_02_05_171923_create_radio_applications_table',26); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (166,'2026_02_05_173928_create_radio_schedules_table',27); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (167,'2026_02_05_173934_create_radio_banners_table',27); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (168,'2026_02_05_173934_create_radio_history_table',27); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (169,'2026_02_11_174258_create_radio_contests_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (170,'2026_02_11_174258_create_radio_giveaways_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (171,'2026_02_11_174259_create_radio_listener_points_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (172,'2026_02_11_174259_create_radio_song_requests_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (173,'2026_02_11_174259_create_radio_song_votes_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (174,'2026_02_11_175238_add_radio_points_to_users',29); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (177,'2026_02_11_181015_rename_date_columns_in_radio_contests_table',31); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (178,'2026_02_11_181053_add_missing_columns_to_radio_giveaways_table',31); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (179,'2026_02_11_181057_add_missing_columns_to_radio_contests_table',31); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (180,'2026_02_11_181904_add_default_value_to_comment_in_website_settings',32); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (181,'2026_02_11_182424_add_points_column_to_radio_listener_points_table',33); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (182,'2026_02_13_161236_add_last_fingerprint_to_users',34); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (183,'2026_02_13_162722_drop_last_fingerprint_from_users',35); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (184,'2026_02_16_210035_add_application_settings_to_radio_ranks',36); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (187,'2026_02_20_154415_add_reported_to_radio_shouts_table',39); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (188,'2026_02_02_120000_create_website_writeable_boxes_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (189,'2026_02_20_215514_add_register_figure_settings',40); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (190,'2026_02_23_000000_add_performance_indexes',41); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (191,'2026_02_23_000001_add_critical_indexes',42); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (192,'2026_02_24_000001_add_more_performance_indexes',43); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (193,'2026_02_24_000002_add_radio_indexes',44); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (194,'2026_02_24_000000_add_referral_code_fix',45); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (196,'2026_02_27_000000_add_performance_indexes_v2',46); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (197,'2026_02_27_000001_add_performance_indexes_v3',46); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (198,'2026_03_18_132511_add_preferences_to_users_table',47); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (200,'2024_01_01_000000_create_alert_logs_table',48); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (201,'2026_02_05_173935_create_radio_history_table',49); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (202,'2026_02_11_174260_create_radio_giveaways_table',50); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (203,'2026_02_11_174261_create_radio_listener_points_table',50); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (204,'2026_02_11_174262_create_radio_song_requests_table',50); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (205,'2026_02_11_174263_create_radio_song_votes_table',50); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (206,'2026_03_22_104619_create_game_scores_table',51); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (207,'2026_03_22_105936_create_game_rooms_table',52); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (208,'2026_03_22_110838_add_game_type_to_game_rooms',53); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (209,'2026_03_22_121054_create_game_rewards_table',54); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (210,'2026_03_22_121242_create_game_reward_claims_table',55); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (211,'2026_03_22_150000_create_game_chat_messages_table',56); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (212,'2026_03_22_160000_create_game_replays_table',57); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (213,'2026_03_22_170000_create_game_ranks_table',58); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (214,'2026_03_22_171000_create_game_invitations_table',58); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (215,'2026_03_22_180000_create_game_xp_table',59); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (216,'2026_03_22_181000_create_daily_challenges_table',59); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (217,'2026_03_26_135135_create_furniture_table',60); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (218,'2026_03_01_000000_create_permissions_table',61); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (219,'2026_05_02_000001_create_staff_activities_table',62); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (220,'2026_05_09_000001_create_ai_hotel_manager_tables',63); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (221,'2026_05_03_000001_add_updated_at_to_staff_activities_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (222,'2026_03_20_093038_create_home_categories_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (223,'2026_03_20_093038_create_home_items_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (224,'2026_03_20_093039_create_user_home_items_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (225,'2026_03_20_093039_create_user_home_ratings_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (226,'2026_03_20_093040_create_user_home_messages_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (227,'2026_03_20_104545_seed_default_home_items_for_existing_users',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (228,'2026_04_02_190625_create_personal_access_tokens_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (229,'2026_05_08_000001_create_radio_playlists_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (230,'2026_05_08_000002_create_radio_playlist_songs_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (231,'2026_05_08_000003_create_radio_podcasts_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (232,'2026_05_08_000004_create_radio_dj_stats_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (233,'2026_05_08_000005_create_radio_auto_dj_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (234,'2026_05_08_000006_create_radio_listener_history_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (235,'2026_05_08_000007_add_radio_advanced_settings',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (236,'2026_04_04_000000_add_missing_indexes_for_performance',65); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (237,'2026_05_03_000001_create_email_templates_table',65); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (238,'2026_05_04_000001_create_social_accounts_table',65); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (239,'2026_05_19_173520_add_expected_amount_to_paypal_transactions',66); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (240,'2026_05_20_210737_increase_password_column_length_for_argon2id',66); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (241,'2026_05_23_175328_add_attribute_changes_to_activity_log_table',67); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (242,'2026_05_24_120000_create_radio_api_keys_table',68); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (243,'2026_05_24_130000_create_radio_song_plays_table',69); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (244,'2026_05_24_140000_add_moderation_to_radio_shouts_table',69); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (245,'2026_05_24_150000_create_radio_auto_dj_playlist_table',69); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (246,'2026_05_24_160000_add_columns_to_radio_song_requests_table',70); +COMMIT; +SET AUTOCOMMIT=@OLD_AUTOCOMMIT; diff --git a/database/schema/mysql-schema.sql b/database/schema/mysql-schema.sql index f480534..97f1d40 100755 --- a/database/schema/mysql-schema.sql +++ b/database/schema/mysql-schema.sql @@ -19,7 +19,7 @@ CREATE TABLE `achievements` ( `progress_needed` int(11) NOT NULL DEFAULT 1, PRIMARY KEY (`name`,`level`) USING BTREE, UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `achievements_talents`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -70,6 +70,7 @@ DROP TABLE IF EXISTS `activity_log`; CREATE TABLE `activity_log` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `log_name` varchar(255) DEFAULT NULL, + `attribute_changes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`attribute_changes`)), `description` text NOT NULL, `subject_type` varchar(255) DEFAULT NULL, `event` varchar(255) DEFAULT NULL, @@ -83,9 +84,99 @@ CREATE TABLE `activity_log` ( PRIMARY KEY (`id`) USING BTREE, KEY `subject` (`subject_type`,`subject_id`) USING BTREE, KEY `causer` (`causer_type`,`causer_id`) USING BTREE, - KEY `activity_log_log_name_index` (`log_name`) USING BTREE + KEY `activity_log_log_name_index` (`log_name`) USING BTREE, + KEY `activity_subject_index` (`subject_id`), + KEY `activity_causer_index` (`causer_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ai_hotel_manager_actions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ai_hotel_manager_actions` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `insight_id` bigint(20) unsigned DEFAULT NULL, + `type` varchar(255) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `status` varchar(255) NOT NULL DEFAULT 'pending', + `executed_at` timestamp NULL DEFAULT NULL, + `completed_at` timestamp NULL DEFAULT NULL, + `result` text DEFAULT NULL, + `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)), + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `ai_hotel_manager_actions_insight_id_foreign` (`insight_id`), + KEY `ai_hotel_manager_actions_type_index` (`type`), + KEY `ai_hotel_manager_actions_status_index` (`status`), + KEY `ai_hotel_manager_actions_executed_at_index` (`executed_at`), + CONSTRAINT `ai_hotel_manager_actions_insight_id_foreign` FOREIGN KEY (`insight_id`) REFERENCES `ai_hotel_manager_insights` (`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ai_hotel_manager_insights`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ai_hotel_manager_insights` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `category` varchar(255) NOT NULL, + `severity` varchar(255) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `affected_entity_type` varchar(255) DEFAULT NULL, + `affected_entity_id` varchar(255) DEFAULT NULL, + `score` double NOT NULL DEFAULT 0, + `status` varchar(255) NOT NULL DEFAULT 'open', + `detected_at` timestamp NOT NULL, + `resolved_at` timestamp NULL DEFAULT NULL, + `resolution_notes` text DEFAULT NULL, + `context` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`context`)), + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `ai_hotel_manager_insights_category_index` (`category`), + KEY `ai_hotel_manager_insights_severity_index` (`severity`), + KEY `ai_hotel_manager_insights_status_index` (`status`), + KEY `ai_hotel_manager_insights_score_index` (`score`), + KEY `ai_hotel_manager_insights_detected_at_index` (`detected_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ai_hotel_manager_metrics`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ai_hotel_manager_metrics` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `category` varchar(255) NOT NULL, + `metric_key` varchar(255) NOT NULL, + `metric_value` double NOT NULL, + `labels` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`labels`)), + `captured_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `ai_hotel_manager_metrics_category_index` (`category`), + KEY `ai_hotel_manager_metrics_metric_key_index` (`metric_key`), + KEY `ai_hotel_manager_metrics_captured_at_index` (`captured_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `alert_logs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `alert_logs` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(255) NOT NULL, + `severity` varchar(255) NOT NULL, + `message` text NOT NULL, + `context` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`context`)), + `sent_via_email` tinyint(1) NOT NULL DEFAULT 0, + `sent_via_discord` tinyint(1) NOT NULL DEFAULT 0, + `is_read` tinyint(1) NOT NULL DEFAULT 0, + `read_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `alert_logs_type_created_at_index` (`type`,`created_at`), + KEY `alert_logs_severity_created_at_index` (`severity`,`created_at`), + KEY `alert_logs_is_read_index` (`is_read`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `article_comments`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -193,15 +284,20 @@ CREATE TABLE `bans` ( `cfh_topic` int(11) NOT NULL DEFAULT -1, PRIMARY KEY (`id`) USING BTREE, KEY `user_data` (`user_id`,`ip`,`machine_id`,`ban_expire`,`timestamp`,`ban_reason`) USING BTREE, - KEY `general` (`id`,`type`) USING BTREE + KEY `general` (`id`,`type`) USING BTREE, + KEY `idx_bans_user_id` (`user_id`), + KEY `idx_bans_ip` (`ip`), + KEY `idx_bans_machine_id` (`machine_id`(64)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bot_serves`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `bot_serves` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `Keys` varchar(255) DEFAULT NULL, - `item` int(11) DEFAULT NULL + `item` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `bots`; @@ -232,6 +328,18 @@ CREATE TABLE `bots` ( KEY `general_data` (`id`,`user_id`,`room_id`,`name`,`motto`,`gender`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `builders_club_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `builders_club_items` ( + `item_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `room_id` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`item_id`), + KEY `idx_builders_club_items_user_id` (`user_id`), + KEY `idx_builders_club_items_room_id` (`room_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `cache`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -282,18 +390,24 @@ CREATE TABLE `calendar_rewards` ( `item_id` int(11) NOT NULL DEFAULT 0, `subscription_type` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '', `subscription_days` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_calendar_rewards_campaign_id` (`campaign_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `calendar_rewards_claimed`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `calendar_rewards_claimed` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `campaign_id` int(11) NOT NULL DEFAULT 0, `day` int(11) NOT NULL, `reward_id` int(11) NOT NULL, - `timestamp` int(11) NOT NULL + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_cal_claimed_user_id` (`user_id`), + KEY `idx_cal_claimed_campaign_id` (`campaign_id`), + KEY `idx_cal_claimed_reward_id` (`reward_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `camera_likes`; @@ -303,8 +417,11 @@ CREATE TABLE `camera_likes` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `camera_id` bigint(20) unsigned NOT NULL, `user_id` bigint(20) unsigned NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + `liked` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `camera_web`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -355,7 +472,7 @@ CREATE TABLE `catalog_clothing` ( `name` varchar(75) NOT NULL, `setid` varchar(75) NOT NULL, PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `catalog_club_offers`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -368,11 +485,11 @@ CREATE TABLE `catalog_club_offers` ( `credits` int(11) NOT NULL DEFAULT 10, `points` int(11) NOT NULL DEFAULT 0, `points_type` int(11) NOT NULL DEFAULT 0, - `type` enum('HC','VIP') NOT NULL DEFAULT 'HC', + `type` enum('HC','VIP','BUILDERS_CLUB','BUILDERS_CLUB_ADDON') NOT NULL DEFAULT 'HC', `deal` enum('0','1') NOT NULL DEFAULT '0', `giftable` enum('1','0') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `catalog_featured_pages`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -387,7 +504,7 @@ CREATE TABLE `catalog_featured_pages` ( `page_id` int(11) NOT NULL DEFAULT 0, `product_name` varchar(40) NOT NULL DEFAULT '', PRIMARY KEY (`slot_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `catalog_images`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -406,6 +523,36 @@ DROP TABLE IF EXISTS `catalog_items`; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `catalog_items` ( `id` int(11) NOT NULL AUTO_INCREMENT, + `item_ids` varchar(666) NOT NULL DEFAULT '0', + `page_id` int(11) NOT NULL DEFAULT 14, + `offer_id` int(11) NOT NULL DEFAULT -1, + `song_id` int(10) unsigned NOT NULL DEFAULT 0, + `order_number` int(11) NOT NULL DEFAULT 1, + `catalog_name` varchar(100) NOT NULL DEFAULT '0', + `cost_credits` int(11) NOT NULL DEFAULT 3, + `cost_points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0 COMMENT '0 for duckets; 5 for diamonds; and any seasonal/GOTW currencies you have in your emu_settings table.', + `amount` int(11) NOT NULL DEFAULT 1, + `limited_sells` int(11) NOT NULL DEFAULT 0 COMMENT 'This automatically logs from the emu; do not change it.', + `limited_stack` int(11) NOT NULL DEFAULT 0 COMMENT 'Change this number to make the item limited.', + `extradata` varchar(500) NOT NULL DEFAULT '', + `badge` varchar(500) DEFAULT NULL, + `have_offer` enum('0','1') NOT NULL DEFAULT '1', + `club_only` enum('0','1') NOT NULL DEFAULT '0', + `rate` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`,`extradata`) USING BTREE, + KEY `page_id` (`page_id`) USING BTREE, + KEY `catalog_name` (`catalog_name`) USING BTREE, + KEY `costs` (`cost_credits`,`cost_points`,`points_type`) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `item_ids` (`item_ids`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_items-oud`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_items-oud` ( + `id` int(11) NOT NULL DEFAULT 0, `item_ids` varchar(666) NOT NULL, `page_id` int(11) NOT NULL, `catalog_name` varchar(100) NOT NULL, @@ -420,13 +567,8 @@ CREATE TABLE `catalog_items` ( `song_id` int(10) unsigned NOT NULL DEFAULT 0, `extradata` varchar(500) NOT NULL DEFAULT '', `have_offer` enum('0','1') NOT NULL DEFAULT '1', - `club_only` enum('0','1') NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - KEY `page_id` (`page_id`) USING BTREE, - KEY `catalog_name` (`catalog_name`) USING BTREE, - KEY `costs` (`cost_credits`,`cost_points`,`points_type`) USING BTREE, - KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; + `club_only` enum('0','1') NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `catalog_items_bc`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -452,7 +594,35 @@ CREATE TABLE `catalog_items_limited` ( `item_id` int(11) NOT NULL DEFAULT 0, UNIQUE KEY `catalog_item_id` (`catalog_item_id`,`number`) USING BTREE, KEY `user_timestamp_index` (`user_id`,`timestamp`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_items_oud`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_items_oud` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `item_ids` varchar(666) NOT NULL, + `page_id` int(11) NOT NULL, + `catalog_name` varchar(100) NOT NULL, + `cost_credits` int(11) NOT NULL DEFAULT 3, + `cost_points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0 COMMENT '0 for duckets; 5 for diamonds; and any seasonal/GOTW currencies you have in your emu_settings table.', + `amount` int(11) NOT NULL DEFAULT 1, + `limited_stack` int(11) NOT NULL DEFAULT 0 COMMENT 'Change this number to make the item limited.', + `limited_sells` int(11) NOT NULL DEFAULT 0 COMMENT 'This automatically logs from the emu; do not change it.', + `order_number` int(11) NOT NULL DEFAULT 1, + `offer_id` int(11) NOT NULL DEFAULT -1, + `song_id` int(10) unsigned NOT NULL DEFAULT 0, + `extradata` varchar(500) NOT NULL DEFAULT '', + `have_offer` enum('0','1') NOT NULL DEFAULT '1', + `club_only` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE, + KEY `page_id` (`page_id`) USING BTREE, + KEY `catalog_name` (`catalog_name`) USING BTREE, + KEY `costs` (`cost_credits`,`cost_points`,`points_type`) USING BTREE, + KEY `id` (`id`) USING BTREE, + KEY `item_ids` (`item_ids`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `catalog_pages`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -474,15 +644,16 @@ CREATE TABLE `catalog_pages` ( `page_headline` varchar(1024) NOT NULL DEFAULT '', `page_teaser` varchar(64) NOT NULL DEFAULT '', `page_special` varchar(2048) DEFAULT '' COMMENT 'Gold Bubble: catalog_special_txtbg1 // Speech Bubble: catalog_special_txtbg2 // Place normal text in page_text_teaser', - `page_text1` mediumtext DEFAULT NULL, - `page_text2` mediumtext DEFAULT NULL, - `page_text_details` mediumtext DEFAULT NULL, - `page_text_teaser` mediumtext DEFAULT NULL, + `page_text1` text DEFAULT NULL, + `page_text2` text DEFAULT NULL, + `page_text_details` text DEFAULT NULL, + `page_text_teaser` text DEFAULT NULL, `room_id` int(11) DEFAULT 0, `includes` varchar(128) NOT NULL DEFAULT '' COMMENT 'Example usage: 1;2;3\r\n This will include page 1, 2 and 3 in the current page.\r\n Note that permissions are only used for the current entry.', + `catalog_mode` enum('NORMAL','BUILDER','BOTH') NOT NULL DEFAULT 'NORMAL', PRIMARY KEY (`id`) USING BTREE, KEY `id` (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `catalog_pages_bc`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -491,7 +662,7 @@ CREATE TABLE `catalog_pages_bc` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) NOT NULL DEFAULT -1, `caption` varchar(128) NOT NULL, - `page_layout` enum('default_3x3','club_buy','club_gift','frontpage','spaces','recycler','recycler_info','recycler_prizes','trophies','plasto','marketplace','marketplace_own_items','spaces_new','soundmachine','guilds','guild_furni','info_duckets','info_rentables','info_pets','roomads','single_bundle','sold_ltd_items','badge_display','bots','pets','pets2','pets3','productpage1','room_bundle','recent_purchases','default_3x3_color_grouping','guild_forum','vip_buy','info_loyalty','loyalty_vip_buy','collectibles','petcustomization','frontpage_featured') NOT NULL DEFAULT 'default_3x3', + `page_layout` enum('default_3x3','club_buy','club_gift','frontpage','spaces','recycler','recycler_info','recycler_prizes','trophies','plasto','marketplace','marketplace_own_items','spaces_new','soundmachine','guilds','guild_furni','info_duckets','info_rentables','info_pets','roomads','single_bundle','sold_ltd_items','badge_display','bots','pets','pets2','pets3','productpage1','room_bundle','recent_purchases','default_3x3_color_grouping','guild_forum','vip_buy','info_loyalty','loyalty_vip_buy','collectibles','petcustomization','frontpage_featured','builders_club_frontpage','builders_club_addons','builders_club_loyalty') NOT NULL DEFAULT 'default_3x3', `icon_color` int(11) NOT NULL DEFAULT 1, `icon_image` int(11) NOT NULL DEFAULT 1, `order_num` int(11) NOT NULL DEFAULT 1, @@ -507,6 +678,24 @@ CREATE TABLE `catalog_pages_bc` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `catalog_products`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `catalog_products` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `offer_id` int(10) unsigned NOT NULL, + `item_id` int(10) unsigned NOT NULL, + `cost_credits` int(10) unsigned NOT NULL DEFAULT 0, + `cost_points` int(10) unsigned NOT NULL DEFAULT 0, + `points_type` tinyint(3) unsigned NOT NULL DEFAULT 0, + `amount` tinyint(3) unsigned NOT NULL DEFAULT 1, + `limited_sells` tinyint(3) unsigned NOT NULL DEFAULT 0, + `limited_stack` int(10) unsigned NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `catalog_target_offers`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -553,23 +742,25 @@ CREATE TABLE `chatlogs_private` ( KEY `user_from_id` (`user_from_id`) USING BTREE, KEY `user_to_id` (`user_to_id`) USING BTREE, KEY `message` (`message`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `chatlogs_room`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `chatlogs_room` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `room_id` int(11) NOT NULL DEFAULT 0, `user_from_id` int(11) NOT NULL, `user_to_id` int(11) NOT NULL DEFAULT 0, `message` varchar(255) NOT NULL, `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`), KEY `user_from_id` (`user_from_id`) USING BTREE, KEY `timestamp` (`timestamp`) USING BTREE, KEY `user_to_id` (`user_to_id`) USING BTREE, KEY `message` (`message`) USING BTREE, KEY `room_id` (`room_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `claimed_referral_logs`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -615,15 +806,17 @@ DROP TABLE IF EXISTS `commandlogs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `commandlogs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `timestamp` int(11) NOT NULL, `command` varchar(256) NOT NULL DEFAULT '', `params` varchar(256) NOT NULL DEFAULT '', `succes` enum('no','yes') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`id`), KEY `user_id` (`user_id`) USING BTREE, KEY `user_data` (`user_id`,`timestamp`) USING BTREE, KEY `command` (`command`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `crafting_altars_recipes`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -632,7 +825,7 @@ CREATE TABLE `crafting_altars_recipes` ( `altar_id` int(11) NOT NULL, `recipe_id` int(11) NOT NULL, UNIQUE KEY `altar_id` (`altar_id`,`recipe_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `crafting_recipes`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -649,16 +842,105 @@ CREATE TABLE `crafting_recipes` ( PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `id` (`id`) USING BTREE, UNIQUE KEY `name` (`product_name`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `crafting_recipes_ingredients`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `crafting_recipes_ingredients` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `recipe_id` int(11) NOT NULL, `item_id` int(11) NOT NULL, - `amount` int(11) NOT NULL DEFAULT 1 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `amount` int(11) NOT NULL DEFAULT 1, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `custom_nick_icons_catalog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `custom_nick_icons_catalog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `icon_key` varchar(50) NOT NULL, + `display_name` varchar(100) NOT NULL DEFAULT '', + `points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0, + `enabled` tinyint(1) NOT NULL DEFAULT 1, + `sort_order` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_icon_key` (`icon_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `custom_prefix_blacklist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `custom_prefix_blacklist` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `word` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_word` (`word`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `custom_prefix_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `custom_prefix_settings` ( + `key_name` varchar(100) NOT NULL, + `value` varchar(255) NOT NULL, + PRIMARY KEY (`key_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `custom_prefixes_catalog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `custom_prefixes_catalog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `display_name` varchar(100) NOT NULL DEFAULT '', + `text` varchar(50) NOT NULL, + `color` varchar(255) NOT NULL DEFAULT '#FFFFFF', + `icon` varchar(50) NOT NULL DEFAULT '', + `effect` varchar(50) NOT NULL DEFAULT '', + `font` varchar(50) NOT NULL DEFAULT '', + `points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0, + `enabled` tinyint(1) NOT NULL DEFAULT 1, + `sort_order` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `daily_challenges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `daily_challenges` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `description` varchar(255) NOT NULL, + `game` varchar(255) DEFAULT NULL, + `type` varchar(255) NOT NULL, + `target` int(11) NOT NULL, + `reward_currency` varchar(255) NOT NULL DEFAULT 'credits', + `reward_amount` int(11) NOT NULL, + `date` date NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `daily_challenges_date_game_index` (`date`,`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `email_templates`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `email_templates` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `subject` varchar(255) NOT NULL, + `body` text NOT NULL, + `variables` text DEFAULT NULL COMMENT 'JSON: {{username}}, {{email}}, {{site_url}}, etc.', + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `email_templates_name_unique` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `emulator_errors`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -671,7 +953,7 @@ CREATE TABLE `emulator_errors` ( `type` varchar(32) NOT NULL DEFAULT 'Exception', `stacktrace` blob NOT NULL, PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `emulator_settings`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -679,9 +961,23 @@ DROP TABLE IF EXISTS `emulator_settings`; CREATE TABLE `emulator_settings` ( `key` varchar(100) NOT NULL, `value` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + `comment` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`key`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `emulator_sql_updates`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `emulator_sql_updates` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `file_name` varchar(255) NOT NULL, + `file_hash` varchar(255) NOT NULL, + `applied_at` timestamp NOT NULL, + `sql_content` text DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `emulator_sql_updates_file_hash_unique` (`file_hash`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `emulator_texts`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -706,6 +1002,200 @@ CREATE TABLE `failed_jobs` ( UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `furniture`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `furniture` ( + `id` int(10) unsigned NOT NULL, + `classname` varchar(100) NOT NULL, + `name` varchar(255) NOT NULL DEFAULT '', + `description` text DEFAULT NULL, + `revision` int(10) unsigned NOT NULL DEFAULT 0, + `category` tinyint(3) unsigned NOT NULL DEFAULT 0, + `price` int(10) unsigned NOT NULL DEFAULT 0, + `saleprice` int(10) unsigned NOT NULL DEFAULT 0, + `rentbuyprice` int(10) unsigned NOT NULL DEFAULT 0, + `adaptivef` tinyint(3) unsigned NOT NULL DEFAULT 0, + `extradata` text DEFAULT NULL, + `partcolors` text DEFAULT NULL, + `furniline` varchar(50) NOT NULL DEFAULT '', + `rare` tinyint(3) unsigned NOT NULL DEFAULT 0, + `offer_id` tinyint(3) unsigned DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `furniture_classname_unique` (`classname`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_chat_messages`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_chat_messages` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `room_id` bigint(20) unsigned NOT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `message` text NOT NULL, + `type` varchar(255) NOT NULL DEFAULT 'chat', + `reactions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`reactions`)), + `created_at` timestamp NOT NULL, + PRIMARY KEY (`id`), + KEY `game_chat_messages_room_id_created_at_index` (`room_id`,`created_at`), + KEY `idx_game_chat_messages_room_id` (`room_id`), + KEY `idx_game_chat_messages_room_id_id` (`room_id`,`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_invitations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_invitations` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `from_user_id` bigint(20) unsigned NOT NULL, + `to_user_id` bigint(20) unsigned NOT NULL, + `game` varchar(255) NOT NULL, + `status` varchar(255) NOT NULL DEFAULT 'pending', + `bet_amount` int(11) NOT NULL DEFAULT 0, + `bet_currency` varchar(255) NOT NULL DEFAULT 'credits', + `room_id` bigint(20) unsigned DEFAULT NULL, + `expires_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_invitations_to_user_id_status_index` (`to_user_id`,`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_level_rewards`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_level_rewards` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `game` varchar(255) NOT NULL, + `level` int(11) NOT NULL, + `reward_type` varchar(255) NOT NULL, + `reward_currency` varchar(255) DEFAULT NULL, + `reward_amount` int(11) NOT NULL DEFAULT 0, + `claimed` tinyint(1) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_level_rewards_game_level_index` (`game`,`level`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_ranks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_ranks` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `slug` varchar(255) NOT NULL, + `icon` varchar(255) NOT NULL DEFAULT '⭐', + `color` varchar(255) NOT NULL DEFAULT '#ffffff', + `min_points` int(11) NOT NULL DEFAULT 0, + `max_points` int(11) DEFAULT NULL, + `tier` int(11) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `game_ranks_slug_unique` (`slug`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_replays`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_replays` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `game` varchar(255) NOT NULL, + `player1_id` bigint(20) unsigned NOT NULL, + `player2_id` bigint(20) unsigned DEFAULT NULL, + `game_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`game_data`)), + `moves` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`moves`)), + `winner` varchar(255) DEFAULT NULL, + `player1_score` int(11) NOT NULL DEFAULT 0, + `player2_score` int(11) NOT NULL DEFAULT 0, + `started_at` timestamp NOT NULL, + `ended_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_replays_game_created_at_index` (`game`,`created_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_reward_claims`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_reward_claims` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `game` varchar(50) NOT NULL, + `wins_required` int(11) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `game_reward_claims_user_id_game_wins_required_unique` (`user_id`,`game`,`wins_required`), + KEY `game_reward_claims_user_id_index` (`user_id`), + KEY `idx_game_reward_claims_user_id` (`user_id`), + KEY `idx_game_reward_claims_game` (`game`), + KEY `idx_game_reward_claims_user_game` (`user_id`,`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_rewards`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_rewards` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `game` varchar(50) NOT NULL DEFAULT 'all', + `wins_required` int(11) NOT NULL DEFAULT 10, + `currency` varchar(20) NOT NULL DEFAULT 'credits', + `amount` int(11) NOT NULL DEFAULT 100, + `type` enum('per_wins','milestone') NOT NULL DEFAULT 'milestone', + `enabled` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_rooms`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_rooms` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `game` varchar(50) NOT NULL, + `max_players` int(11) NOT NULL DEFAULT 2, + `player1_id` int(10) unsigned NOT NULL, + `player2_id` int(10) unsigned DEFAULT NULL, + `players` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`players`)), + `state` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`state`)), + `turn` int(10) unsigned NOT NULL DEFAULT 1, + `round` int(11) NOT NULL DEFAULT 1, + `winner_id` int(10) unsigned DEFAULT NULL, + `status` enum('waiting','playing','finished') NOT NULL DEFAULT 'waiting', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_rooms_game_status_index` (`game`,`status`), + KEY `game_rooms_player1_id_index` (`player1_id`), + KEY `game_rooms_player2_id_index` (`player2_id`), + KEY `idx_game_rooms_status` (`status`), + KEY `idx_game_rooms_game` (`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `game_scores`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `game_scores` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` int(10) unsigned NOT NULL, + `game` varchar(50) NOT NULL, + `score` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `game_scores_game_score_index` (`game`,`score`), + KEY `game_scores_user_id_index` (`user_id`), + KEY `idx_game_scores_user_id` (`user_id`), + KEY `idx_game_scores_game` (`game`), + KEY `idx_game_scores_game_score` (`game`,`score`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `gift_wrappers`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -739,7 +1229,9 @@ CREATE TABLE `guild_forum_views` ( `user_id` int(11) NOT NULL, `guild_id` int(11) NOT NULL, `timestamp` int(11) NOT NULL, - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_gfv_user_id` (`user_id`), + KEY `idx_gfv_guild_id` (`guild_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `guilds`; @@ -766,7 +1258,10 @@ CREATE TABLE `guilds` ( KEY `id` (`id`) USING BTREE, KEY `data` (`room_id`,`user_id`) USING BTREE, KEY `name` (`name`) USING BTREE, - KEY `description` (`description`) USING BTREE + KEY `description` (`description`) USING BTREE, + KEY `idx_guilds_user_id` (`user_id`), + KEY `idx_guilds_room_id` (`room_id`), + CONSTRAINT `fk_guilds_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `guilds_elements`; @@ -787,7 +1282,7 @@ DROP TABLE IF EXISTS `guilds_forums_comments`; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `guilds_forums_comments` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `thread_id` int(11) NOT NULL DEFAULT 0, + `thread_id` int(10) unsigned NOT NULL DEFAULT 0, `user_id` int(11) NOT NULL DEFAULT 0, `message` text NOT NULL, `created_at` int(11) NOT NULL DEFAULT 0, @@ -795,7 +1290,8 @@ CREATE TABLE `guilds_forums_comments` ( `admin_id` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, KEY `id` (`id`) USING BTREE, - KEY `thread_data` (`thread_id`,`user_id`,`created_at`,`state`) USING BTREE + KEY `thread_data` (`thread_id`,`user_id`,`created_at`,`state`) USING BTREE, + KEY `idx_gfc_user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `guilds_forums_threads`; @@ -813,7 +1309,9 @@ CREATE TABLE `guilds_forums_threads` ( `pinned` tinyint(4) DEFAULT 0, `locked` tinyint(4) DEFAULT 0, `admin_id` int(11) DEFAULT 0, - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_gft_guild_id` (`guild_id`), + KEY `idx_gft_opener_id` (`opener_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `guilds_members`; @@ -959,6 +1457,18 @@ CREATE TABLE `housekeeping_settings` ( UNIQUE KEY `housekeeping_settings_key_unique` (`key`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `infostand_backgrounds`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `infostand_backgrounds` ( + `id` int(11) NOT NULL, + `category` enum('background','stand','overlay','card','border') NOT NULL, + `min_rank` int(11) NOT NULL DEFAULT 0, + `is_hc_only` tinyint(1) NOT NULL DEFAULT 0, + `is_ambassador_only` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`,`category`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `ip_data_list`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -980,7 +1490,7 @@ CREATE TABLE `items` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL DEFAULT 0, `room_id` int(11) NOT NULL DEFAULT 0, - `item_id` int(11) DEFAULT 0, + `item_id` int(11) unsigned DEFAULT 0, `wall_pos` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', `x` int(11) NOT NULL DEFAULT 0, `y` int(11) NOT NULL DEFAULT 0, @@ -997,13 +1507,52 @@ CREATE TABLE `items` ( KEY `extra_data` (`extra_data`) USING BTREE, KEY `wired_data` (`wired_data`(3072)) USING BTREE, KEY `id` (`id`) USING BTREE, - KEY `items_item_id_index` (`item_id`) USING BTREE + KEY `items_item_id_index` (`item_id`) USING BTREE, + CONSTRAINT `fk_items_item_base` FOREIGN KEY (`item_id`) REFERENCES `items_base` (`id`) ON DELETE CASCADE, + CONSTRAINT `fk_items_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `items_base`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `items_base` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `sprite_id` int(11) NOT NULL DEFAULT 0, + `item_name` varchar(70) NOT NULL DEFAULT '0', + `public_name` varchar(56) NOT NULL DEFAULT '0', + `width` int(11) NOT NULL DEFAULT 1, + `length` int(11) NOT NULL DEFAULT 1, + `stack_height` double(4,2) NOT NULL DEFAULT 0.00, + `allow_stack` tinyint(1) NOT NULL DEFAULT 1, + `allow_sit` tinyint(1) NOT NULL DEFAULT 0, + `allow_lay` tinyint(1) NOT NULL DEFAULT 0, + `allow_walk` tinyint(1) NOT NULL DEFAULT 0, + `allow_gift` tinyint(1) NOT NULL DEFAULT 1, + `allow_trade` tinyint(1) NOT NULL DEFAULT 1, + `allow_recycle` tinyint(1) NOT NULL DEFAULT 0, + `allow_marketplace_sell` tinyint(1) NOT NULL DEFAULT 0, + `allow_inventory_stack` tinyint(1) NOT NULL DEFAULT 1, + `type` varchar(3) NOT NULL DEFAULT 's', + `interaction_type` varchar(500) NOT NULL DEFAULT 'default', + `interaction_modes_count` int(11) NOT NULL DEFAULT 1, + `vending_ids` varchar(255) NOT NULL DEFAULT '0', + `multiheight` varchar(50) NOT NULL DEFAULT '0', + `customparams` varchar(25600) NOT NULL DEFAULT '', + `effect_id_male` int(11) NOT NULL DEFAULT 0, + `effect_id_female` int(11) NOT NULL DEFAULT 0, + `clothing_on_walk` varchar(255) NOT NULL DEFAULT '', + `page_id` varchar(250) DEFAULT NULL, + `rare` enum('4','3','2','1','0') DEFAULT '0', + PRIMARY KEY (`id`) USING BTREE, + KEY `sprite_id` (`sprite_id`) USING BTREE, + KEY `type` (`type`) USING BTREE, + FULLTEXT KEY `item_name` (`item_name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `items_base_oud`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `items_base_oud` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `sprite_id` int(11) NOT NULL DEFAULT 0, `public_name` varchar(56) NOT NULL DEFAULT '', @@ -1029,14 +1578,15 @@ CREATE TABLE `items_base` ( `effect_id_male` int(11) NOT NULL DEFAULT 0, `effect_id_female` int(11) NOT NULL DEFAULT 0, `clothing_on_walk` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + KEY `item_name` (`item_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `items_crackable`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `items_crackable` ( - `item_id` int(11) NOT NULL, + `item_id` int(11) unsigned NOT NULL, `item_name` varchar(255) NOT NULL COMMENT 'Item name for identification', `count` int(11) NOT NULL, `prizes` varchar(860) NOT NULL DEFAULT '179:1' COMMENT 'Used in the format of item_id:chance;item_id_2:chance. item_id must be id in the items_base table. Default value for chance is 100.', @@ -1047,8 +1597,9 @@ CREATE TABLE `items_crackable` ( `subscription_type` varchar(255) DEFAULT NULL COMMENT 'hc for Habbo Club, bc for Builders Club', PRIMARY KEY (`item_id`) USING BTREE, UNIQUE KEY `id` (`item_id`) USING BTREE, - KEY `data` (`count`,`prizes`,`achievement_tick`,`achievement_cracked`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; + KEY `data` (`count`,`prizes`,`achievement_tick`,`achievement_cracked`) USING BTREE, + KEY `idx_items_crackable_item_id` (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `items_highscore_data`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1071,26 +1622,31 @@ DROP TABLE IF EXISTS `items_hoppers`; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `items_hoppers` ( `item_id` int(11) NOT NULL, - `base_item` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `base_item` int(11) NOT NULL, + PRIMARY KEY (`item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `items_presents`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `items_presents` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `item_id` int(11) NOT NULL, - `base_item_reward` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `base_item_reward` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `items_teleports`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `items_teleports` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `teleport_one_id` int(11) NOT NULL, `teleport_two_id` int(11) NOT NULL, + PRIMARY KEY (`id`), KEY `teleport_one_id` (`teleport_one_id`) USING BTREE, KEY `teleport_two_id` (`teleport_two_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `logs_hc_payday`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1098,7 +1654,7 @@ DROP TABLE IF EXISTS `logs_hc_payday`; CREATE TABLE `logs_hc_payday` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `timestamp` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, `hc_streak` int(10) unsigned DEFAULT NULL, `total_coins_spent` int(10) unsigned DEFAULT NULL, `reward_coins_spent` int(10) unsigned DEFAULT NULL, @@ -1117,7 +1673,7 @@ DROP TABLE IF EXISTS `logs_shop_purchases`; CREATE TABLE `logs_shop_purchases` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `timestamp` int(10) unsigned DEFAULT NULL, - `user_id` int(10) unsigned DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, `catalog_item_id` int(10) unsigned DEFAULT NULL, `item_ids` text DEFAULT NULL, `catalog_name` varchar(255) DEFAULT NULL, @@ -1146,7 +1702,7 @@ CREATE TABLE `marketplace_items` ( KEY `price` (`price`) USING BTREE, KEY `time` (`timestamp`,`sold_timestamp`) USING BTREE, KEY `status` (`state`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `messenger_categories`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1167,7 +1723,9 @@ CREATE TABLE `messenger_friendrequests` ( `user_from_id` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `id` (`id`) USING BTREE, - KEY `users` (`user_to_id`,`user_from_id`) USING BTREE + KEY `users` (`user_to_id`,`user_from_id`) USING BTREE, + KEY `idx_fr_user_to_id` (`user_to_id`), + KEY `idx_fr_user_from_id` (`user_from_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `messenger_friendships`; @@ -1213,11 +1771,14 @@ DROP TABLE IF EXISTS `namechange_log`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `namechange_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `old_name` varchar(32) NOT NULL, `new_name` varchar(32) NOT NULL, - `timestamp` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_namechange_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `navigations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1241,7 +1802,7 @@ CREATE TABLE `navigator_filter` ( `compare` enum('equals','equals_ignore_case','contains') NOT NULL, `database_query` varchar(1024) NOT NULL, PRIMARY KEY (`key`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `navigator_flatcats`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1269,16 +1830,18 @@ CREATE TABLE `navigator_publiccats` ( `visible` enum('0','1') NOT NULL DEFAULT '1', `order_num` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `navigator_publics`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `navigator_publics` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `public_cat_id` int(11) NOT NULL, `room_id` int(11) NOT NULL, - `visible` enum('0','1') NOT NULL DEFAULT '1' -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `visible` enum('0','1') NOT NULL DEFAULT '1', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `nova_field_attachments`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1337,7 +1900,7 @@ CREATE TABLE `nux_gifts` ( `value` varchar(32) NOT NULL COMMENT 'If type item then items.item_name. If type room then room id to copy.', `image` varchar(256) NOT NULL, PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `old_guilds_forums`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1377,7 +1940,8 @@ CREATE TABLE `password_reset_tokens` ( `email` varchar(255) NOT NULL, `token` varchar(255) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, - PRIMARY KEY (`email`) USING BTREE + PRIMARY KEY (`email`) USING BTREE, + KEY `prt_token_index` (`token`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `password_resets`; @@ -1390,6 +1954,51 @@ CREATE TABLE `password_resets` ( KEY `password_resets_email_index` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `permission_definitions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `permission_definitions` ( + `permission_key` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, + `max_value` tinyint(3) unsigned NOT NULL DEFAULT 1, + `comment` text NOT NULL, + `rank_1` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_2` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_3` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_4` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_5` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_6` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_7` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_8` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_9` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_10` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_11` tinyint(3) unsigned NOT NULL DEFAULT 0, + `rank_12` tinyint(3) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`permission_key`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `permission_ranks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `permission_ranks` ( + `id` int(11) NOT NULL, + `rank_name` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, + `hidden_rank` tinyint(1) NOT NULL DEFAULT 0, + `badge` varchar(12) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `job_description` varchar(255) NOT NULL DEFAULT 'Here to help', + `staff_color` varchar(8) NOT NULL DEFAULT '#327fa8', + `staff_background` varchar(255) NOT NULL DEFAULT 'staff-bg.png', + `level` int(11) NOT NULL DEFAULT 1, + `room_effect` int(11) NOT NULL DEFAULT 0, + `log_commands` enum('0','1') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '0', + `prefix` varchar(5) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `prefix_color` varchar(7) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `auto_credits_amount` int(11) DEFAULT 0, + `auto_pixels_amount` int(11) DEFAULT 0, + `auto_gotw_amount` int(11) DEFAULT 0, + `auto_points_amount` int(11) DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `permission_roles`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -1516,6 +2125,7 @@ CREATE TABLE `permissions` ( `cmd_unload` enum('0','1','2') NOT NULL DEFAULT '0', `cmd_unmute` enum('0','1') NOT NULL DEFAULT '0', `cmd_update_achievements` enum('0','1') NOT NULL DEFAULT '0', + `cmd_update_all` enum('0','1') NOT NULL DEFAULT '0', `cmd_update_bots` enum('0','1') NOT NULL DEFAULT '0', `cmd_update_catalogue` enum('0','1') NOT NULL DEFAULT '0', `cmd_update_config` enum('0','1') NOT NULL DEFAULT '0', @@ -1564,6 +2174,7 @@ CREATE TABLE `permissions` ( `acc_nomute` enum('0','1') NOT NULL DEFAULT '0', `acc_guild_admin` enum('0','1') NOT NULL DEFAULT '0', `acc_catalog_ids` enum('0','1') NOT NULL DEFAULT '0', + `acc_catalogfurni` enum('0','1') NOT NULL DEFAULT '0', `acc_modtool_ticket_q` enum('0','1') NOT NULL DEFAULT '0', `acc_modtool_user_logs` enum('0','1') NOT NULL DEFAULT '0', `acc_modtool_user_alert` enum('0','1') NOT NULL DEFAULT '0', @@ -1703,6 +2314,7 @@ CREATE TABLE `permissions` ( `cmd_unsavestack` enum('0','1','2') NOT NULL DEFAULT '2', `cmd_showstacks` enum('0','1','2') NOT NULL DEFAULT '2', `cmd_pickup_own_furnis` enum('0','1','2') NOT NULL DEFAULT '1', + `acc_free_build` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1736,26 +2348,30 @@ CREATE TABLE `pet_actions` ( `tired_actions` varchar(100) NOT NULL DEFAULT 'trd', `random_actions` varchar(100) NOT NULL DEFAULT 'lov', `can_swim` enum('0','1') NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `pet_type` (`pet_type`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; + PRIMARY KEY (`id`), + UNIQUE KEY `pet_type` (`pet_type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pet_breeding`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `pet_breeding` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `pet_id` int(11) NOT NULL, - `offspring_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `offspring_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pet_breeding_races`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `pet_breeding_races` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `pet_type` int(11) NOT NULL, `rarity_level` int(11) NOT NULL, - `breed` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `breed` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pet_breeds`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1767,7 +2383,7 @@ CREATE TABLE `pet_breeds` ( `has_color_one` enum('0','1') NOT NULL DEFAULT '0', `has_color_two` enum('0','1') NOT NULL DEFAULT '0', UNIQUE KEY `idx_name` (`race`,`color_one`,`color_two`,`has_color_one`,`has_color_two`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pet_commands`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1775,10 +2391,10 @@ DROP TABLE IF EXISTS `pet_commands`; CREATE TABLE `pet_commands` ( `pet_id` int(11) NOT NULL, `command_id` int(11) NOT NULL, - PRIMARY KEY (`pet_id`,`command_id`) USING BTREE, - KEY `pet_id` (`pet_id`) USING BTREE, - KEY `command_id` (`command_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; + PRIMARY KEY (`pet_id`,`command_id`), + KEY `pet_id` (`pet_id`), + KEY `command_id` (`command_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pet_commands_data`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1790,40 +2406,48 @@ CREATE TABLE `pet_commands_data` ( `reward_xp` int(11) NOT NULL DEFAULT 5, `cost_happiness` int(11) NOT NULL DEFAULT 0, `cost_energy` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`command_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=DYNAMIC; + PRIMARY KEY (`command_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pet_drinks`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `pet_drinks` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `pet_id` int(11) NOT NULL DEFAULT 0 COMMENT 'Leave 0 to have it affect all pet types.', - `item_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pet_foods`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `pet_foods` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `pet_id` int(11) NOT NULL DEFAULT 0 COMMENT 'Leave 0 to have it affect all pet types.', - `item_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pet_items`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `pet_items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `pet_id` int(11) NOT NULL COMMENT 'Leave 0 to have it affect all pet types.', - `item_id` int(11) NOT NULL COMMENT 'Item id of a item having one of the following interactions: nest, pet_food, pet_drink' -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `item_id` int(11) NOT NULL COMMENT 'Item id of a item having one of the following interactions: nest, pet_food, pet_drink', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pet_vocals`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `pet_vocals` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `pet_id` int(11) NOT NULL DEFAULT 0 COMMENT 'Leave 0 to have it apply to all pet types.', `type` enum('DISOBEY','DRINKING','EATING','GENERIC_HAPPY','GENERIC_NEUTRAL','GENERIC_SAD','GREET_OWNER','HUNGRY','LEVEL_UP','MUTED','PLAYFUL','SLEEPING','THIRSTY','TIRED','UNKNOWN_COMMAND') NOT NULL DEFAULT 'GENERIC_HAPPY', - `message` varchar(100) NOT NULL + `message` varchar(100) NOT NULL, + PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `polls`; @@ -1835,7 +2459,7 @@ CREATE TABLE `polls` ( `thanks_message` varchar(255) NOT NULL, `reward_badge` varchar(10) NOT NULL DEFAULT '', PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `polls_answers`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1846,7 +2470,7 @@ CREATE TABLE `polls_answers` ( `question_id` int(11) NOT NULL, `answer` varchar(255) NOT NULL, UNIQUE KEY `unique_index` (`poll_id`,`user_id`,`question_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `polls_questions`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1861,7 +2485,7 @@ CREATE TABLE `polls_questions` ( `min_selections` int(11) NOT NULL DEFAULT 1, `options` varchar(255) NOT NULL, PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `product_data`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1876,13 +2500,382 @@ CREATE TABLE `product_data` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_api_keys`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_api_keys` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `key` varchar(64) NOT NULL, + `allowed_ips` varchar(255) DEFAULT NULL, + `permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`permissions`)), + `rate_limit` int(11) NOT NULL DEFAULT 300, + `last_used_at` timestamp NULL DEFAULT NULL, + `expires_at` timestamp NULL DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `radio_api_keys_key_unique` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_applications`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_applications` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `real_name` varchar(255) NOT NULL, + `age` int(11) NOT NULL, + `availability` text NOT NULL, + `experience` text DEFAULT NULL, + `motivation` text NOT NULL, + `music_style` text DEFAULT NULL, + `discord_username` varchar(255) DEFAULT NULL, + `rank_id` bigint(20) unsigned DEFAULT NULL, + `status` enum('pending','approved','rejected') NOT NULL DEFAULT 'pending', + `approved_by` bigint(20) unsigned DEFAULT NULL, + `approved_at` timestamp NULL DEFAULT NULL, + `rejected_by` bigint(20) unsigned DEFAULT NULL, + `rejected_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_applications_user_id_index` (`user_id`), + KEY `radio_applications_rank_id_index` (`rank_id`), + KEY `radio_applications_approved_by_index` (`approved_by`), + KEY `radio_applications_rejected_by_index` (`rejected_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_auto_dj`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_auto_dj` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `playlist_id` bigint(20) unsigned DEFAULT NULL, + `day` varchar(20) NOT NULL, + `start_time` time NOT NULL, + `end_time` time NOT NULL, + `is_active` tinyint(1) DEFAULT 1, + `priority` int(11) DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_playlist_id` (`playlist_id`), + KEY `idx_day_time` (`day`,`start_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_auto_dj_playlist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_auto_dj_playlist` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `artist` varchar(255) DEFAULT NULL, + `album` varchar(255) DEFAULT NULL, + `artwork_url` varchar(255) DEFAULT NULL, + `duration` int(10) unsigned DEFAULT NULL, + `play_count` int(10) unsigned NOT NULL DEFAULT 0, + `last_played_at` timestamp NULL DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `sort_order` int(10) unsigned NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_banners`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_banners` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `image_path` varchar(255) NOT NULL, + `title` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, + `sort_order` int(11) NOT NULL DEFAULT 0, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_banners_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_contests`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_contests` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 0, + `is_ended` tinyint(1) NOT NULL DEFAULT 0, + `starts_at` timestamp NULL DEFAULT NULL, + `ends_at` timestamp NULL DEFAULT NULL, + `winner_id` bigint(20) unsigned DEFAULT NULL, + `winners_announced` tinyint(1) NOT NULL DEFAULT 0, + `prize_description` text DEFAULT NULL, + `prize_value` decimal(10,2) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `contests_active_starts_index` (`is_active`,`starts_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_dj_stats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_dj_stats` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `total_hours` int(11) DEFAULT 0, + `total_sessions` int(11) DEFAULT 0, + `total_listeners` bigint(20) DEFAULT 0, + `peak_listeners` int(11) DEFAULT 0, + `total_likes` int(11) DEFAULT 0, + `total_songs_played` int(11) DEFAULT 0, + `average_listeners` float DEFAULT 0, + `last_session_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_total_hours` (`total_hours`), + KEY `idx_total_listeners` (`total_listeners`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_giveaways`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_giveaways` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `title` varchar(255) NOT NULL, + `description` text DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 0, + `is_ended` tinyint(1) NOT NULL DEFAULT 0, + `ends_at` timestamp NULL DEFAULT NULL, + `starts_at` timestamp NULL DEFAULT NULL, + `winner_id` bigint(20) unsigned DEFAULT NULL, + `prize_value` decimal(10,2) DEFAULT NULL, + `winner_announced` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `giveaways_active_starts_index` (`is_active`,`starts_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_history` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `show_name` varchar(255) DEFAULT NULL, + `started_at` timestamp NOT NULL, + `ended_at` timestamp NULL DEFAULT NULL, + `listeners_count` int(11) NOT NULL DEFAULT 0, + `notes` text DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_history_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_listener_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_listener_history` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `count` int(11) NOT NULL, + `recorded_at` timestamp NOT NULL, + `source` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_recorded` (`recorded_at`,`count`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_listener_points`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_listener_points` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + `points` decimal(10,2) DEFAULT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `reason` varchar(255) DEFAULT NULL, + `earned_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `rlp_user_earned_index` (`user_id`,`earned_at`), + KEY `rlp_earned_index` (`earned_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_playlist_songs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_playlist_songs` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `playlist_id` bigint(20) unsigned NOT NULL, + `title` varchar(200) NOT NULL, + `artist` varchar(200) DEFAULT NULL, + `duration` varchar(20) DEFAULT NULL, + `file_path` varchar(500) DEFAULT NULL, + `external_url` varchar(500) DEFAULT NULL, + `order_index` int(11) DEFAULT 0, + `play_count` int(11) DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_playlist_id` (`playlist_id`), + CONSTRAINT `radio_playlist_songs_ibfk_1` FOREIGN KEY (`playlist_id`) REFERENCES `radio_playlists` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_playlists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_playlists` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` text DEFAULT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `is_public` tinyint(1) NOT NULL DEFAULT 1, + `shuffle` int(11) NOT NULL DEFAULT 0, + `repeat` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_podcasts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_podcasts` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(200) NOT NULL, + `description` text DEFAULT NULL, + `user_id` bigint(20) unsigned NOT NULL, + `duration` varchar(20) DEFAULT NULL, + `file_path` varchar(500) DEFAULT NULL, + `external_url` varchar(500) DEFAULT NULL, + `cover_image` varchar(500) DEFAULT NULL, + `is_published` tinyint(1) DEFAULT 0, + `views` int(11) DEFAULT 0, + `published_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_ranks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_ranks` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `badge_code` varchar(255) DEFAULT NULL, + `accepts_applications` tinyint(1) NOT NULL DEFAULT 0, + `application_rank` enum('all','proef_dj','dj','hoofd_dj') NOT NULL DEFAULT 'all', + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_ranks_applications_index` (`accepts_applications`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_schedules`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_schedules` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `day` varchar(255) NOT NULL, + `start_time` time NOT NULL, + `end_time` time NOT NULL, + `show_name` varchar(255) DEFAULT NULL, + `description` text DEFAULT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_schedules_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_shouts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_shouts` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `message` text NOT NULL, + `reported` tinyint(1) NOT NULL DEFAULT 0, + `reported_by` bigint(20) unsigned DEFAULT NULL, + `approved` tinyint(1) NOT NULL DEFAULT 1, + `approved_by` bigint(20) unsigned DEFAULT NULL, + `approved_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `shouts_user_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_song_plays`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_song_plays` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `artist` varchar(255) DEFAULT NULL, + `album` varchar(255) DEFAULT NULL, + `artwork_url` varchar(255) DEFAULT NULL, + `duration` int(10) unsigned DEFAULT NULL, + `played_at` timestamp NOT NULL, + `dj_id` bigint(20) unsigned DEFAULT NULL, + `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)), + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `radio_song_plays_played_at_index` (`played_at`), + KEY `radio_song_plays_dj_id_index` (`dj_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_song_requests`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_song_requests` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned DEFAULT NULL, + `song_title` varchar(255) DEFAULT NULL, + `artist` varchar(255) DEFAULT NULL, + `is_approved` tinyint(1) NOT NULL DEFAULT 0, + `is_played` tinyint(1) NOT NULL DEFAULT 0, + `votes` int(11) NOT NULL DEFAULT 0, + `submitted_at` timestamp NULL DEFAULT NULL, + `played_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `radio_song_votes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `radio_song_votes` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `recycler_prizes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `recycler_prizes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `rarity` int(11) NOT NULL, - `item_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `referrals`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1915,39 +2908,62 @@ DROP TABLE IF EXISTS `room_bans`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `room_bans` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `room_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, - `ends` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `ends` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_room_bans_room_id` (`room_id`), + KEY `idx_room_bans_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_enter_log`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `room_enter_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `room_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `timestamp` int(11) NOT NULL, `exit_timestamp` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), KEY `room_enter_log_room_id` (`room_id`) USING BTREE, KEY `room_enter_log_user_entry` (`user_id`,`timestamp`) USING BTREE, KEY `room_id` (`room_id`) USING BTREE, KEY `exit_timestamp` (`exit_timestamp`) USING BTREE, KEY `timestamps` (`timestamp`,`exit_timestamp`) USING BTREE, KEY `user_id` (`user_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_furni_wired_variables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_furni_wired_variables` ( + `room_id` int(11) NOT NULL, + `furni_id` int(11) NOT NULL, + `variable_item_id` int(11) NOT NULL, + `value` int(11) DEFAULT NULL, + `created_at` int(11) NOT NULL DEFAULT 0, + `updated_at` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`room_id`,`furni_id`,`variable_item_id`), + KEY `idx_room_furni_wired_variables_room_item` (`room_id`,`variable_item_id`), + KEY `idx_room_furni_wired_variables_furni` (`furni_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_game_scores`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `room_game_scores` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `room_id` int(11) NOT NULL, `game_start_timestamp` int(11) NOT NULL, `game_name` varchar(64) NOT NULL DEFAULT '', `user_id` int(11) NOT NULL, `team_id` int(11) NOT NULL, `score` int(11) NOT NULL, - `team_score` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; + `team_score` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_models`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1961,7 +2977,7 @@ CREATE TABLE `room_models` ( `public_items` text NOT NULL, `club_only` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`name`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_models_custom`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1974,16 +2990,20 @@ CREATE TABLE `room_models_custom` ( `door_dir` int(11) NOT NULL, `heightmap` text NOT NULL, UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_mutes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `room_mutes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `room_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, - `ends` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `ends` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_room_mutes_room_id` (`room_id`), + KEY `idx_room_mutes_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_promotions`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -1996,15 +3016,71 @@ CREATE TABLE `room_promotions` ( `start_timestamp` int(11) NOT NULL DEFAULT -1, `category` int(11) NOT NULL DEFAULT 0, UNIQUE KEY `room_id` (`room_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_rights`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `room_rights` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `room_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_templates`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_templates` ( + `template_id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(128) NOT NULL DEFAULT '', + `description` varchar(256) NOT NULL DEFAULT '', + `thumbnail` varchar(512) NOT NULL DEFAULT '', + `sort_order` int(11) NOT NULL DEFAULT 0, + `enabled` enum('0','1') NOT NULL DEFAULT '1', + `name` varchar(50) NOT NULL DEFAULT '', + `room_description` varchar(250) NOT NULL DEFAULT '', + `model` varchar(100) NOT NULL, + `password` varchar(50) NOT NULL DEFAULT '', + `state` enum('open','locked','password','invisible') NOT NULL DEFAULT 'open', + `users_max` int(11) NOT NULL DEFAULT 25, + `category` int(11) NOT NULL DEFAULT 0, + `paper_floor` varchar(50) NOT NULL DEFAULT '0.0', + `paper_wall` varchar(50) NOT NULL DEFAULT '0.0', + `paper_landscape` varchar(50) NOT NULL DEFAULT '0.0', + `thickness_wall` int(11) NOT NULL DEFAULT 0, + `thickness_floor` int(11) NOT NULL DEFAULT 0, + `moodlight_data` varchar(2048) NOT NULL DEFAULT '', + `override_model` enum('0','1') NOT NULL DEFAULT '0', + `trade_mode` int(2) NOT NULL DEFAULT 2, + `heightmap` mediumtext NOT NULL, + `door_x` int(11) NOT NULL DEFAULT 0, + `door_y` int(11) NOT NULL DEFAULT 0, + `door_dir` int(4) NOT NULL DEFAULT 2, + PRIMARY KEY (`template_id`), + KEY `idx_room_templates_enabled_sort` (`enabled`,`sort_order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_templates_items`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_templates_items` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `template_id` int(11) NOT NULL, + `item_id` int(11) unsigned NOT NULL, + `wall_pos` varchar(20) NOT NULL DEFAULT '', + `x` int(11) NOT NULL DEFAULT 0, + `y` int(11) NOT NULL DEFAULT 0, + `z` double(10,6) NOT NULL DEFAULT 0.000000, + `rot` int(11) NOT NULL DEFAULT 0, + `extra_data` varchar(2096) NOT NULL DEFAULT '', + `wired_data` varchar(4096) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_room_templates_items_template_id` (`template_id`), + KEY `idx_room_templates_items_item_id` (`item_id`), + CONSTRAINT `fk_room_templates_items_item_base` FOREIGN KEY (`item_id`) REFERENCES `items_base` (`id`) ON DELETE CASCADE, + CONSTRAINT `fk_room_templates_items_template` FOREIGN KEY (`template_id`) REFERENCES `room_templates` (`template_id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_trade_log`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2040,26 +3116,72 @@ DROP TABLE IF EXISTS `room_trax`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `room_trax` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `room_id` int(11) NOT NULL, - `trax_item_id` int(11) NOT NULL + `trax_item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=armscii8 COLLATE=armscii8_general_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_trax_playlist`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `room_trax_playlist` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `room_id` int(11) NOT NULL, `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`), KEY `room_id` (`room_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_user_wired_variables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_user_wired_variables` ( + `room_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `variable_item_id` int(11) NOT NULL, + `value` int(11) DEFAULT NULL, + `created_at` int(11) NOT NULL DEFAULT 0, + `updated_at` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`room_id`,`user_id`,`variable_item_id`), + KEY `idx_room_user_wired_variables_room_item` (`room_id`,`variable_item_id`), + KEY `idx_room_user_wired_variables_user` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_votes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `room_votes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, - `room_id` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `room_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_room_votes_room_id` (`room_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_wired_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_wired_settings` ( + `room_id` int(11) NOT NULL, + `inspect_mask` int(11) NOT NULL DEFAULT 0 COMMENT 'Bitmask for who can open and inspect Wired in the room. 1=everyone, 2=users with rights, 4=group members, 8=group admins.', + `modify_mask` int(11) NOT NULL DEFAULT 0 COMMENT 'Bitmask for who can modify Wired in the room. 2=users with rights, 4=group members, 8=group admins.', + PRIMARY KEY (`room_id`), + CONSTRAINT `fk_room_wired_settings_room_id` FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `room_wired_variables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `room_wired_variables` ( + `room_id` int(11) NOT NULL, + `variable_item_id` int(11) NOT NULL, + `value` int(11) NOT NULL DEFAULT 0, + `created_at` int(11) NOT NULL DEFAULT 0, + `updated_at` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`room_id`,`variable_item_id`), + KEY `idx_room_wired_variables_room_item` (`room_id`,`variable_item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `room_wordfilter`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2068,7 +3190,7 @@ CREATE TABLE `room_wordfilter` ( `room_id` int(11) NOT NULL, `word` varchar(25) NOT NULL, UNIQUE KEY `unique_index` (`room_id`,`word`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `rooms`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2087,8 +3209,8 @@ CREATE TABLE `rooms` ( `guild_id` int(11) NOT NULL DEFAULT 0, `category` int(11) NOT NULL DEFAULT 1, `score` int(11) NOT NULL DEFAULT 0, - `paper_floor` varchar(5) NOT NULL DEFAULT '0.0', - `paper_wall` varchar(5) NOT NULL DEFAULT '0.0', + `paper_floor` varchar(10) DEFAULT NULL, + `paper_wall` varchar(10) DEFAULT NULL, `paper_landscape` varchar(5) NOT NULL DEFAULT '0.0', `thickness_wall` int(11) NOT NULL DEFAULT 0, `wall_height` int(11) NOT NULL DEFAULT -1, @@ -2115,9 +3237,13 @@ CREATE TABLE `rooms` ( `promoted` enum('0','1') NOT NULL DEFAULT '0', `trade_mode` int(11) NOT NULL DEFAULT 2, `move_diagonally` enum('0','1') NOT NULL DEFAULT '1', + `allow_underpass` enum('0','1') NOT NULL DEFAULT '0', `jukebox_active` enum('0','1') NOT NULL DEFAULT '0', `hidewired` enum('0','1') NOT NULL DEFAULT '0', `is_forsale` enum('0','1','2') NOT NULL DEFAULT '0', + `builders_club_trial_locked` enum('0','1') NOT NULL DEFAULT '0', + `builders_club_original_state` varchar(16) NOT NULL DEFAULT 'open', + `youtube_enabled` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, KEY `name` (`name`) USING BTREE, KEY `owner_name` (`owner_name`) USING BTREE, @@ -2129,7 +3255,8 @@ CREATE TABLE `rooms` ( KEY `tags` (`tags`) USING BTREE, KEY `state` (`state`) USING BTREE, KEY `description` (`description`) USING BTREE, - KEY `users` (`users`) USING BTREE + KEY `users` (`users`) USING BTREE, + CONSTRAINT `fk_rooms_owner` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `sanction_levels`; @@ -2155,7 +3282,8 @@ CREATE TABLE `sanctions` ( `trade_locked_until` int(11) NOT NULL DEFAULT 0, `is_muted` tinyint(1) NOT NULL DEFAULT 0, `mute_duration` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_sanctions_habbo_id` (`habbo_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `sessions`; @@ -2221,6 +3349,22 @@ CREATE TABLE `shop_products` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `social_accounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `social_accounts` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `provider` varchar(255) NOT NULL, + `provider_id` varchar(255) NOT NULL, + `avatar` varchar(255) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `social_accounts_provider_provider_id_unique` (`provider`,`provider_id`), + KEY `social_accounts_user_id_index` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `soundtracks`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -2241,7 +3385,27 @@ CREATE TABLE `special_enables` ( `effect_id` int(11) NOT NULL, `min_rank` int(11) NOT NULL, UNIQUE KEY `effect_id` (`effect_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `staff_activities`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `staff_activities` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `action` varchar(50) NOT NULL, + `target_type` varchar(100) DEFAULT NULL, + `target_id` bigint(20) unsigned DEFAULT NULL, + `description` text NOT NULL, + `ip_address` varchar(45) DEFAULT NULL, + `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)), + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `staff_activities_user_id_index` (`user_id`), + KEY `staff_activities_action_index` (`action`), + KEY `staff_activities_created_at_index` (`created_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `sub_navigations`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2281,7 +3445,8 @@ CREATE TABLE `support_cfh_topics` ( `ignore_target` enum('0','1') NOT NULL DEFAULT '0', `auto_reply` text DEFAULT NULL, `default_sanction` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_cfh_topics_category_id` (`category_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `support_issue_categories`; @@ -2343,7 +3508,11 @@ CREATE TABLE `support_tickets` ( KEY `timestamp` (`timestamp`) USING BTREE, KEY `user_data` (`sender_id`,`reported_id`) USING BTREE, KEY `room_id` (`room_id`) USING BTREE, - KEY `issue` (`issue`) USING BTREE + KEY `issue` (`issue`) USING BTREE, + KEY `idx_tickets_sender_id` (`sender_id`), + KEY `idx_tickets_reported_id` (`reported_id`), + KEY `idx_tickets_mod_id` (`mod_id`), + KEY `idx_tickets_room_id` (`room_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `taggables`; @@ -2387,10 +3556,29 @@ DROP TABLE IF EXISTS `trax_playlist`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `trax_playlist` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `trax_item_id` int(11) NOT NULL, - `item_id` int(11) NOT NULL + `item_id` int(11) NOT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=armscii8 COLLATE=armscii8_general_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `ui_news`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `ui_news` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(150) NOT NULL, + `body` text NOT NULL, + `image` mediumtext DEFAULT NULL, + `link_text` varchar(80) NOT NULL DEFAULT '', + `link_url` varchar(255) NOT NULL DEFAULT '', + `enabled` tinyint(1) NOT NULL DEFAULT 1, + `sort_order` int(11) NOT NULL DEFAULT 0, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`), + KEY `idx_ui_news_enabled_sort` (`enabled`,`sort_order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `ui_texts`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -2404,6 +3592,93 @@ CREATE TABLE `ui_texts` ( UNIQUE KEY `ui_texts_key_unique` (`key`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `update_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `update_history` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(255) NOT NULL, + `action` varchar(255) NOT NULL, + `item` varchar(255) DEFAULT NULL, + `status` varchar(255) NOT NULL, + `message` text DEFAULT NULL, + `user` varchar(255) DEFAULT NULL, + `ip` varchar(255) DEFAULT NULL, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + PRIMARY KEY (`id`), + KEY `update_history_type_created_at_index` (`type`,`created_at`), + KEY `update_history_status_index` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_challenge_progress`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_challenge_progress` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `challenge_id` bigint(20) unsigned NOT NULL, + `progress` int(11) NOT NULL DEFAULT 0, + `completed` tinyint(1) NOT NULL DEFAULT 0, + `claimed` tinyint(1) NOT NULL DEFAULT 0, + `completed_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_challenge_progress_user_id_challenge_id_unique` (`user_id`,`challenge_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_custom_badge`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_custom_badge` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `badge_id` varchar(64) NOT NULL, + `badge_name` varchar(64) NOT NULL DEFAULT '', + `badge_description` varchar(255) NOT NULL DEFAULT '', + `date_created` int(11) NOT NULL DEFAULT 0, + `date_edit` int(11) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `badge_id` (`badge_id`), + KEY `user_id` (`user_id`), + CONSTRAINT `fk_user_custom_badge_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_game_ranks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_game_ranks` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `game` varchar(255) NOT NULL, + `rank_id` bigint(20) unsigned NOT NULL, + `points` int(11) NOT NULL DEFAULT 0, + `wins` int(11) NOT NULL DEFAULT 0, + `games_played` int(11) NOT NULL DEFAULT 0, + `win_streak` int(11) NOT NULL DEFAULT 0, + `best_streak` int(11) NOT NULL DEFAULT 0, + `last_played_at` timestamp NULL DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_game_ranks_user_id_game_unique` (`user_id`,`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_game_xp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_game_xp` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `user_id` bigint(20) unsigned NOT NULL, + `game` varchar(255) NOT NULL, + `xp` int(11) NOT NULL DEFAULT 0, + `level` int(11) NOT NULL DEFAULT 1, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_game_xp_user_id_game_unique` (`user_id`,`game`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `user_home_items`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -2447,6 +3722,20 @@ CREATE TABLE `user_home_ratings` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_nick_icons`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_nick_icons` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `icon_key` varchar(50) NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_user_icon` (`user_id`,`icon_key`), + KEY `idx_user_id` (`user_id`), + KEY `idx_user_active` (`user_id`,`active`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `user_notifications`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -2483,6 +3772,28 @@ CREATE TABLE `user_orders` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_prefixes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_prefixes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `text` varchar(50) NOT NULL, + `color` varchar(255) NOT NULL DEFAULT '#FFFFFF', + `icon` varchar(50) NOT NULL DEFAULT '', + `effect` varchar(50) NOT NULL DEFAULT '', + `font` varchar(50) NOT NULL DEFAULT '', + `catalog_prefix_id` int(11) NOT NULL DEFAULT 0, + `display_name` varchar(100) NOT NULL DEFAULT '', + `points` int(11) NOT NULL DEFAULT 0, + `points_type` int(11) NOT NULL DEFAULT 0, + `is_custom` tinyint(1) NOT NULL DEFAULT 1, + `active` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_user_active` (`user_id`,`active`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `user_referrals`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -2497,6 +3808,15 @@ CREATE TABLE `user_referrals` ( CONSTRAINT `user_referrals_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_visual_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `user_visual_settings` ( + `user_id` int(11) NOT NULL, + `display_order` varchar(50) NOT NULL DEFAULT 'icon-prefix-name', + PRIMARY KEY (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `user_website_home_item`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -2523,7 +3843,7 @@ CREATE TABLE `user_window_settings` ( `width` int(11) NOT NULL DEFAULT 435, `height` int(11) NOT NULL DEFAULT 535, `open_searches` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2532,7 +3852,7 @@ CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(25) NOT NULL, `real_name` varchar(25) NOT NULL DEFAULT 'KREWS DEV', - `password` varchar(64) NOT NULL, + `password` varchar(255) NOT NULL, `two_factor_secret` text DEFAULT NULL, `two_factor_recovery_codes` text DEFAULT NULL, `two_factor_confirmed` tinyint(1) NOT NULL DEFAULT 0, @@ -2549,17 +3869,25 @@ CREATE TABLE `users` ( `rank` int(11) NOT NULL DEFAULT 1, `hidden_staff` tinyint(1) NOT NULL DEFAULT 0, `credits` int(11) NOT NULL DEFAULT 2500, + `radio_points` int(11) NOT NULL DEFAULT 0, + `preferences` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`preferences`)), + `radio_last_active` timestamp NULL DEFAULT NULL, `pixels` int(11) NOT NULL DEFAULT 500, `points` int(11) NOT NULL DEFAULT 10, `online` enum('0','1','2') NOT NULL DEFAULT '0', `auth_ticket` varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', + `auth_ticket_expires_at` timestamp NULL DEFAULT NULL, + `remember_token_hash` varchar(64) NOT NULL DEFAULT '', + `remember_token_expires_at` int(11) unsigned NOT NULL DEFAULT 0, `ip_register` varchar(255) NOT NULL, `ip_current` varchar(255) NOT NULL COMMENT 'Have your CMS update this IP. If you do not do this IP banning won''t work!', `machine_id` varchar(64) NOT NULL DEFAULT '', `background_id` int(11) NOT NULL DEFAULT 0, + `background_border_id` int(11) NOT NULL DEFAULT 0, `background_stand_id` int(11) NOT NULL DEFAULT 0, `background_overlay_id` int(11) NOT NULL DEFAULT 0, `home_room` int(11) NOT NULL DEFAULT 0, + `referral_code` varchar(255) DEFAULT NULL, `website_balance` int(10) unsigned NOT NULL DEFAULT 0, `secret_key` varchar(40) DEFAULT NULL, `pincode` varchar(11) DEFAULT NULL, @@ -2570,15 +3898,23 @@ CREATE TABLE `users` ( `provider_id` varchar(255) DEFAULT NULL, `is_hidden` tinyint(1) NOT NULL DEFAULT 0, `home_background` varchar(255) DEFAULT NULL, + `background_card_id` int(11) NOT NULL DEFAULT 0, + `last_username_change` int(11) NOT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `username` (`username`) USING BTREE, UNIQUE KEY `id` (`id`) USING BTREE, + UNIQUE KEY `referral_code` (`referral_code`), KEY `account_created` (`account_created`) USING BTREE, KEY `last_login` (`last_login`) USING BTREE, KEY `last_online` (`last_online`) USING BTREE, KEY `figure` (`motto`,`look`,`gender`) USING BTREE, KEY `auth_ticket` (`auth_ticket`) USING BTREE, KEY `users_team_id_foreign` (`team_id`) USING BTREE, + KEY `users_online_index` (`online`), + KEY `users_rank_index` (`rank`), + KEY `users_radio_points_index` (`radio_points`), + KEY `users_username_index` (`username`), + KEY `idx_users_remember_token_hash` (`remember_token_hash`), CONSTRAINT `users_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `website_teams` (`id`) ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2592,7 +3928,7 @@ CREATE TABLE `users_achievements` ( KEY `user_id` (`user_id`) USING BTREE, KEY `achievement_name` (`achievement_name`) USING BTREE, KEY `progress` (`progress`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_achievements_queue`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2603,7 +3939,7 @@ CREATE TABLE `users_achievements_queue` ( `amount` int(11) NOT NULL, UNIQUE KEY `unique_index` (`user_id`,`achievement_id`) USING BTREE, UNIQUE KEY `data` (`user_id`,`achievement_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_badges`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2613,7 +3949,8 @@ CREATE TABLE `users_badges` ( `user_id` int(11) NOT NULL DEFAULT 0, `slot_id` int(11) NOT NULL DEFAULT 0, `badge_code` varchar(32) NOT NULL, - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_users_badges_user_code` (`user_id`,`badge_code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_clothing`; @@ -2623,7 +3960,7 @@ CREATE TABLE `users_clothing` ( `user_id` int(11) NOT NULL, `clothing_id` int(11) NOT NULL, UNIQUE KEY `user_id` (`user_id`,`clothing_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_currency`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2634,8 +3971,21 @@ CREATE TABLE `users_currency` ( `amount` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`user_id`,`type`) USING BTREE, UNIQUE KEY `userdata` (`user_id`,`type`) USING BTREE, - KEY `amount` (`amount`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + KEY `amount` (`amount`) USING BTREE, + KEY `idx_users_currency_user_type` (`user_id`,`type`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_custom_badge_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_custom_badge_settings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `badge_path` varchar(255) NOT NULL DEFAULT '/var/www/gamedata/c_images/album1584', + `badge_url` varchar(255) NOT NULL DEFAULT '/gamedata/c_images/album1584', + `price_badge` int(11) NOT NULL DEFAULT 0, + `currency_type` int(11) NOT NULL DEFAULT -1, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_effects`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2647,7 +3997,7 @@ CREATE TABLE `users_effects` ( `activation_timestamp` int(11) NOT NULL DEFAULT -1, `total` int(11) NOT NULL DEFAULT 1, UNIQUE KEY `user_id` (`user_id`,`effect`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_favorite_rooms`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2656,7 +4006,7 @@ CREATE TABLE `users_favorite_rooms` ( `user_id` int(11) NOT NULL, `room_id` int(11) NOT NULL, UNIQUE KEY `user_id` (`user_id`,`room_id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_ignored`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2678,7 +4028,7 @@ CREATE TABLE `users_navigator_settings` ( UNIQUE KEY `userid` (`user_id`) USING BTREE, KEY `list_type` (`list_type`) USING BTREE, KEY `display` (`display`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_pets`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2721,7 +4071,7 @@ CREATE TABLE `users_pets` ( `mp_is_dead` tinyint(1) NOT NULL DEFAULT 0, `saddle_item_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_recipes`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2730,7 +4080,24 @@ CREATE TABLE `users_recipes` ( `user_id` int(11) NOT NULL, `recipe` int(11) NOT NULL, UNIQUE KEY `user_id` (`user_id`,`recipe`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `users_remember_families`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `users_remember_families` ( + `family_id` char(36) NOT NULL, + `user_id` int(11) NOT NULL, + `current_version` int(11) NOT NULL DEFAULT 1, + `created_at` int(11) NOT NULL, + `expires_at` int(11) NOT NULL, + `revoked` tinyint(1) NOT NULL DEFAULT 0, + `last_ip` varchar(45) NOT NULL DEFAULT '', + PRIMARY KEY (`family_id`), + KEY `idx_users_remember_families_user_id` (`user_id`), + KEY `idx_users_remember_families_expires_at` (`expires_at`), + CONSTRAINT `fk_users_remember_families_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_saved_searches`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2801,6 +4168,7 @@ CREATE TABLE `users_settings` ( `max_friends` int(11) DEFAULT 300, `streak_last` date NOT NULL DEFAULT '2025-04-18', `streak_days` int(11) NOT NULL DEFAULT 0, + `builders_club_bonus_furni` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `user_id` (`user_id`) USING BTREE, KEY `achievement_score` (`achievement_score`) USING BTREE, @@ -2814,7 +4182,7 @@ DROP TABLE IF EXISTS `users_subscriptions`; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `users_subscriptions` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, `subscription_type` varchar(255) DEFAULT NULL, `timestamp_start` int(10) unsigned DEFAULT NULL, `duration` int(10) unsigned DEFAULT NULL, @@ -2835,7 +4203,8 @@ CREATE TABLE `users_target_offer_purchases` ( `state` int(11) NOT NULL DEFAULT 0, `amount` int(11) NOT NULL DEFAULT 0, `last_purchase` int(11) NOT NULL DEFAULT 0, - UNIQUE KEY `use_id` (`user_id`,`offer_id`) USING BTREE + UNIQUE KEY `use_id` (`user_id`,`offer_id`) USING BTREE, + KEY `idx_utop_offer_id` (`offer_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_wardrobe`; @@ -2872,7 +4241,9 @@ CREATE TABLE `voucher_history` ( `voucher_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `timestamp` int(11) NOT NULL, - PRIMARY KEY (`id`) USING BTREE + PRIMARY KEY (`id`) USING BTREE, + KEY `idx_vh_voucher_id` (`voucher_id`), + KEY `idx_vh_user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `vouchers`; @@ -2888,7 +4259,7 @@ CREATE TABLE `vouchers` ( `amount` int(11) NOT NULL DEFAULT 1, `limit` int(11) NOT NULL DEFAULT -1, PRIMARY KEY (`id`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `website_ads`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -2901,6 +4272,19 @@ CREATE TABLE `website_ads` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_api_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_api_settings` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `key` varchar(255) NOT NULL, + `value` varchar(255) DEFAULT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `website_api_settings_key_unique` (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `website_article_comments`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -2914,6 +4298,7 @@ CREATE TABLE `website_article_comments` ( PRIMARY KEY (`id`) USING BTREE, KEY `website_article_comments_article_id_foreign` (`article_id`) USING BTREE, KEY `website_article_comments_user_id_foreign` (`user_id`) USING BTREE, + KEY `comments_article_id_index` (`article_id`), CONSTRAINT `website_article_comments_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `website_articles` (`id`) ON DELETE CASCADE, CONSTRAINT `website_article_comments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; @@ -2951,6 +4336,8 @@ CREATE TABLE `website_articles` ( PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `website_articles_slug_unique` (`slug`) USING BTREE, KEY `website_articles_user_id_foreign` (`user_id`) USING BTREE, + KEY `articles_user_created_index` (`user_id`,`created_at`), + KEY `articles_user_id_index` (`user_id`), CONSTRAINT `website_articles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2992,9 +4379,22 @@ CREATE TABLE `website_beta_codes` ( `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `website_beta_codes_code_unique` (`code`) USING BTREE + UNIQUE KEY `website_beta_codes_code_unique` (`code`) USING BTREE, + KEY `beta_codes_code_index` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `website_blocked_countries`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `website_blocked_countries` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `country_code` varchar(2) NOT NULL, + `country_name` varchar(255) NOT NULL, + `created_at` timestamp NULL DEFAULT NULL, + `updated_at` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `website_collectibles`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; @@ -3075,6 +4475,9 @@ CREATE TABLE `website_help_center_tickets` ( PRIMARY KEY (`id`) USING BTREE, KEY `website_help_center_tickets_user_id_foreign` (`user_id`) USING BTREE, KEY `website_help_center_tickets_category_id_foreign` (`category_id`) USING BTREE, + KEY `tickets_user_open_index` (`user_id`,`open`), + KEY `tickets_open_created_index` (`open`,`created_at`), + KEY `tickets_open_user_index` (`open`,`user_id`), CONSTRAINT `website_help_center_tickets_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `website_help_center_categories` (`id`) ON DELETE CASCADE, CONSTRAINT `website_help_center_tickets_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; @@ -3150,6 +4553,9 @@ CREATE TABLE `website_ip_blacklist` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `ip_address` varchar(255) NOT NULL, `asn` varchar(255) DEFAULT NULL, + `country_code` varchar(255) DEFAULT NULL, + `country_name` varchar(255) DEFAULT NULL, + `blacklist_country` tinyint(1) NOT NULL DEFAULT 0, `blacklist_asn` tinyint(1) NOT NULL DEFAULT 0, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, @@ -3163,6 +4569,9 @@ CREATE TABLE `website_ip_whitelist` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `ip_address` varchar(255) NOT NULL, `asn` varchar(255) DEFAULT NULL, + `country_code` varchar(255) DEFAULT NULL, + `country_name` varchar(255) DEFAULT NULL, + `whitelist_country` tinyint(1) NOT NULL DEFAULT 0, `whitelist_asn` tinyint(1) NOT NULL DEFAULT 0, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, @@ -3240,6 +4649,7 @@ CREATE TABLE `website_paypal_transactions` ( `status` varchar(255) DEFAULT NULL, `description` varchar(512) DEFAULT NULL, `amount` double(8,2) NOT NULL, + `expected_amount` decimal(10,2) DEFAULT NULL, `currency` varchar(255) NOT NULL DEFAULT 'USD', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, @@ -3333,9 +4743,10 @@ CREATE TABLE `website_settings` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `key` varchar(255) NOT NULL, `value` text NOT NULL, - `comment` varchar(255) NOT NULL COMMENT 'Add an explanation of the setting does', + `comment` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `website_settings_key_unique` (`key`) USING BTREE + UNIQUE KEY `website_settings_key_unique` (`key`) USING BTREE, + KEY `website_settings_key_index` (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `website_shop_article_features`; @@ -3406,7 +4817,8 @@ CREATE TABLE `website_shop_vouchers` ( `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `website_shop_vouchers_code_unique` (`code`) USING BTREE + UNIQUE KEY `website_shop_vouchers_code_unique` (`code`) USING BTREE, + KEY `shop_vouchers_code_index` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `website_staff_application_statuses`; @@ -3489,6 +4901,7 @@ CREATE TABLE `website_used_shop_vouchers` ( PRIMARY KEY (`id`) USING BTREE, KEY `website_used_shop_vouchers_user_id_foreign` (`user_id`) USING BTREE, KEY `website_used_shop_vouchers_voucher_id_foreign` (`voucher_id`) USING BTREE, + KEY `vouchers_user_voucher_index` (`user_id`,`voucher_id`), CONSTRAINT `website_used_shop_vouchers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, CONSTRAINT `website_used_shop_vouchers_voucher_id_foreign` FOREIGN KEY (`voucher_id`) REFERENCES `website_shop_vouchers` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; @@ -3535,15 +4948,27 @@ CREATE TABLE `website_writeable_boxes` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wired_emulator_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8mb4 */; +CREATE TABLE `wired_emulator_settings` ( + `key` varchar(191) NOT NULL, + `value` text NOT NULL, + `comment` text NOT NULL, + PRIMARY KEY (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `wired_rewards_given`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8mb4 */; CREATE TABLE `wired_rewards_given` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `wired_item` int(11) NOT NULL, `user_id` int(11) NOT NULL, `reward_id` int(11) NOT NULL, - `timestamp` int(11) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; + `timestamp` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `wordfilter`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -3556,7 +4981,7 @@ CREATE TABLE `wordfilter` ( `mute` tinyint(1) NOT NULL DEFAULT 0, `user_id` bigint(20) unsigned DEFAULT NULL, UNIQUE KEY `key` (`key`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `youtube_playlists`; /*!40101 SET @saved_cs_client = @@character_set_client */; @@ -3566,8 +4991,152 @@ CREATE TABLE `youtube_playlists` ( `playlist_id` varchar(255) NOT NULL COMMENT 'YouTube playlist ID', `order` int(11) NOT NULL, UNIQUE KEY `item_id` (`item_id`,`playlist_id`,`order`) USING BTREE -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 DROP PROCEDURE IF EXISTS `refresh_permission_definition_rank_columns` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_uca1400_ai_ci */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`%` PROCEDURE `refresh_permission_definition_rank_columns`() +BEGIN + DECLARE done INT DEFAULT 0; + DECLARE current_rank_id INT; + DECLARE current_column_name VARCHAR(32); + DECLARE column_exists INT DEFAULT 0; + DECLARE rank_cursor CURSOR FOR SELECT `id` FROM `permission_ranks` ORDER BY `id` ASC; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; + + OPEN rank_cursor; + + rank_loop: LOOP + FETCH rank_cursor INTO current_rank_id; + + IF done = 1 THEN + LEAVE rank_loop; + END IF; + + SET current_column_name = CONCAT('rank_', current_rank_id); + + SELECT COUNT(*) + INTO column_exists + FROM `information_schema`.`columns` + WHERE `table_schema` = DATABASE() + AND `table_name` = 'permission_definitions' + AND `column_name` = current_column_name; + + IF column_exists = 0 THEN + SET @alter_permissions_column_sql = CONCAT( + 'ALTER TABLE `permission_definitions` ADD COLUMN `', + current_column_name, + '` tinyint(3) unsigned NOT NULL DEFAULT 0' + ); + + PREPARE alter_permissions_column_stmt FROM @alter_permissions_column_sql; + EXECUTE alter_permissions_column_stmt; + DEALLOCATE PREPARE alter_permissions_column_stmt; + END IF; + END LOOP; + + CLOSE rank_cursor; +END +;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +/*!50003 DROP PROCEDURE IF EXISTS `refresh_permission_definition_values` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_uca1400_ai_ci */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`%` PROCEDURE `refresh_permission_definition_values`() +BEGIN + DECLARE done INT DEFAULT 0; + DECLARE current_rank_id INT; + DECLARE current_column_name VARCHAR(32); + DECLARE rank_cursor CURSOR FOR SELECT `id` FROM `permission_ranks` ORDER BY `id` ASC; + DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; + + OPEN rank_cursor; + + rank_loop: LOOP + FETCH rank_cursor INTO current_rank_id; + + IF done = 1 THEN + LEAVE rank_loop; + END IF; + + SET current_column_name = CONCAT('rank_', current_rank_id); + + SELECT GROUP_CONCAT( + CONCAT( + 'SELECT ''', + REPLACE(`column_name`, '''', ''''''), + ''' AS permission_key, CAST(COALESCE(`', + REPLACE(`column_name`, '`', '``'), + '`, ''0'') AS UNSIGNED) AS permission_value FROM `permissions` WHERE `id` = ', + current_rank_id + ) + ORDER BY `ordinal_position` + SEPARATOR ' UNION ALL ' + ) INTO @permission_rank_source_sql + FROM `information_schema`.`columns` + WHERE `table_schema` = DATABASE() + AND `table_name` = 'permissions' + AND `column_name` NOT IN ( + 'id', + 'rank_name', + 'hidden_rank', + 'badge', + 'job_description', + 'staff_color', + 'staff_background', + 'level', + 'room_effect', + 'log_commands', + 'prefix', + 'prefix_color', + 'auto_credits_amount', + 'auto_pixels_amount', + 'auto_gotw_amount', + 'auto_points_amount' + ); + + SET @permission_rank_update_sql = CONCAT( + 'UPDATE `permission_definitions` pd ', + 'INNER JOIN (', + @permission_rank_source_sql, + ') src ON src.permission_key = pd.permission_key ', + 'SET pd.`', + current_column_name, + '` = src.permission_value' + ); + + PREPARE permission_rank_update_stmt FROM @permission_rank_update_sql; + EXECUTE permission_rank_update_stmt; + DEALLOCATE PREPARE permission_rank_update_stmt; + END LOOP; + + CLOSE rank_cursor; +END +;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -3576,11 +5145,10 @@ CREATE TABLE `youtube_playlists` ( /*M!100616 SET NOTE_VERBOSITY=@OLD_NOTE_VERBOSITY */; /*M!999999\- enable the sandbox mode */ -set autocommit=0; +SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0; INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'2014_10_12_100000_create_password_resets_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (2,'2014_10_12_200000_add_two_factor_columns_to_users_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (3,'2019_08_19_000000_create_failed_jobs_table',1); -INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (4,'2019_12_14_000001_create_personal_access_tokens_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (5,'2022_08_01_181153_create_activity_log_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (6,'2022_08_01_181154_add_event_column_to_activity_log_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (7,'2022_08_01_181155_add_batch_uuid_column_to_activity_log_table',1); @@ -3600,9 +5168,7 @@ INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (20,'2022_08_26_225 INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (21,'2022_09_17_225245_add_staff_color_and_description_to_permissions_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2022_09_25_153707_add_staff_background_to_permissions_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2022_09_26_123543_add_website_article_reactions_table',1); -INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (24,'2022_10_01_204009_create_user_sessions_logs_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2022_10_11_135920_create_sessions_table',1); -INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (26,'2022_10_11_140005_drop_user_session_logs_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (27,'2022_10_28_144239_add_two_factor_confirmed_to_users_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (28,'2022_11_12_231917_create_website_wordfilter_table',1); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (29,'2022_11_15_190549_create_website_beta_codes_table',1); @@ -3735,6 +5301,84 @@ INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (157,'2025_10_13_11 INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (158,'2025_10_13_114411_add_team_support_to_website_open_positions_table',22); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (159,'2025_10_13_130215_make_permission_id_nullable_on_website_open_positions',22); INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (160,'2025_10_14_073736_add_status_to_website_staff_applications_table',22); -INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (161,'2026_02_02_000000_create_website_navigations_table',23); -INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (162,'2026_02_02_120000_create_website_writeable_boxes_table',23); -commit; +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (162,'2026_02_04_174420_create_radio_ranks_table',23); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (163,'2026_02_04_174422_create_radio_shouts_table',24); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (164,'2026_02_04_204305_add_radio_auto_play_setting',25); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (165,'2026_02_05_171923_create_radio_applications_table',26); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (166,'2026_02_05_173928_create_radio_schedules_table',27); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (167,'2026_02_05_173934_create_radio_banners_table',27); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (168,'2026_02_05_173934_create_radio_history_table',27); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (169,'2026_02_11_174258_create_radio_contests_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (170,'2026_02_11_174258_create_radio_giveaways_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (171,'2026_02_11_174259_create_radio_listener_points_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (172,'2026_02_11_174259_create_radio_song_requests_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (173,'2026_02_11_174259_create_radio_song_votes_table',28); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (174,'2026_02_11_175238_add_radio_points_to_users',29); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (177,'2026_02_11_181015_rename_date_columns_in_radio_contests_table',31); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (178,'2026_02_11_181053_add_missing_columns_to_radio_giveaways_table',31); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (179,'2026_02_11_181057_add_missing_columns_to_radio_contests_table',31); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (180,'2026_02_11_181904_add_default_value_to_comment_in_website_settings',32); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (181,'2026_02_11_182424_add_points_column_to_radio_listener_points_table',33); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (182,'2026_02_13_161236_add_last_fingerprint_to_users',34); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (183,'2026_02_13_162722_drop_last_fingerprint_from_users',35); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (184,'2026_02_16_210035_add_application_settings_to_radio_ranks',36); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (187,'2026_02_20_154415_add_reported_to_radio_shouts_table',39); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (188,'2026_02_02_120000_create_website_writeable_boxes_table',1); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (189,'2026_02_20_215514_add_register_figure_settings',40); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (190,'2026_02_23_000000_add_performance_indexes',41); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (191,'2026_02_23_000001_add_critical_indexes',42); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (192,'2026_02_24_000001_add_more_performance_indexes',43); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (193,'2026_02_24_000002_add_radio_indexes',44); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (194,'2026_02_24_000000_add_referral_code_fix',45); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (196,'2026_02_27_000000_add_performance_indexes_v2',46); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (197,'2026_02_27_000001_add_performance_indexes_v3',46); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (198,'2026_03_18_132511_add_preferences_to_users_table',47); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (200,'2024_01_01_000000_create_alert_logs_table',48); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (201,'2026_02_05_173935_create_radio_history_table',49); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (202,'2026_02_11_174260_create_radio_giveaways_table',50); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (203,'2026_02_11_174261_create_radio_listener_points_table',50); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (204,'2026_02_11_174262_create_radio_song_requests_table',50); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (205,'2026_02_11_174263_create_radio_song_votes_table',50); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (206,'2026_03_22_104619_create_game_scores_table',51); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (207,'2026_03_22_105936_create_game_rooms_table',52); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (208,'2026_03_22_110838_add_game_type_to_game_rooms',53); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (209,'2026_03_22_121054_create_game_rewards_table',54); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (210,'2026_03_22_121242_create_game_reward_claims_table',55); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (211,'2026_03_22_150000_create_game_chat_messages_table',56); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (212,'2026_03_22_160000_create_game_replays_table',57); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (213,'2026_03_22_170000_create_game_ranks_table',58); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (214,'2026_03_22_171000_create_game_invitations_table',58); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (215,'2026_03_22_180000_create_game_xp_table',59); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (216,'2026_03_22_181000_create_daily_challenges_table',59); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (217,'2026_03_26_135135_create_furniture_table',60); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (218,'2026_03_01_000000_create_permissions_table',61); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (219,'2026_05_02_000001_create_staff_activities_table',62); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (220,'2026_05_09_000001_create_ai_hotel_manager_tables',63); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (221,'2026_05_03_000001_add_updated_at_to_staff_activities_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (222,'2026_03_20_093038_create_home_categories_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (223,'2026_03_20_093038_create_home_items_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (224,'2026_03_20_093039_create_user_home_items_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (225,'2026_03_20_093039_create_user_home_ratings_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (226,'2026_03_20_093040_create_user_home_messages_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (227,'2026_03_20_104545_seed_default_home_items_for_existing_users',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (228,'2026_04_02_190625_create_personal_access_tokens_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (229,'2026_05_08_000001_create_radio_playlists_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (230,'2026_05_08_000002_create_radio_playlist_songs_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (231,'2026_05_08_000003_create_radio_podcasts_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (232,'2026_05_08_000004_create_radio_dj_stats_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (233,'2026_05_08_000005_create_radio_auto_dj_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (234,'2026_05_08_000006_create_radio_listener_history_table',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (235,'2026_05_08_000007_add_radio_advanced_settings',64); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (236,'2026_04_04_000000_add_missing_indexes_for_performance',65); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (237,'2026_05_03_000001_create_email_templates_table',65); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (238,'2026_05_04_000001_create_social_accounts_table',65); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (239,'2026_05_19_173520_add_expected_amount_to_paypal_transactions',66); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (240,'2026_05_20_210737_increase_password_column_length_for_argon2id',66); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (241,'2026_05_23_175328_add_attribute_changes_to_activity_log_table',67); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (242,'2026_05_24_120000_create_radio_api_keys_table',68); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (243,'2026_05_24_130000_create_radio_song_plays_table',69); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (244,'2026_05_24_140000_add_moderation_to_radio_shouts_table',69); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (245,'2026_05_24_150000_create_radio_auto_dj_playlist_table',69); +INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (246,'2026_05_24_160000_add_columns_to_radio_song_requests_table',70); +COMMIT; +SET AUTOCOMMIT=@OLD_AUTOCOMMIT;