-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               10.5.26-MariaDB-deb10 - mariadb.org binary distribution
-- Server OS:                    debian-linux-gnu
-- HeidiSQL Version:             12.10.0.7000
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!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' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


-- Dumping database structure for gcdm_global
CREATE DATABASE IF NOT EXISTS `gcdm_global` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci */;
USE `gcdm_global`;

-- Dumping structure for table gcdm_global.server_settings
CREATE TABLE IF NOT EXISTS `server_settings` (
  `setting_id` int(11) NOT NULL AUTO_INCREMENT,
  `setting_key` varchar(64) NOT NULL,
  `setting_value` text NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`setting_id`),
  UNIQUE KEY `setting_key` (`setting_key`),
  KEY `idx_setting_key` (`setting_key`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- Dumping data for table gcdm_global.server_settings: ~33 rows (approximately)
INSERT INTO `server_settings` (`setting_id`, `setting_key`, `setting_value`, `description`, `created_at`, `updated_at`) VALUES
	(1, 'match_duration_minutes', '30', 'Duration of matches in minutes', '2025-09-10 10:07:31', '2025-09-18 19:29:33'),
	(2, 'match_team_size', '2', 'Number of players per team', '2025-09-10 10:07:31', '2025-09-18 16:41:44'),
	(3, 'match_turnmin_seconds', '0.50', 'Minimum seconds per turn', '2025-09-10 10:07:31', '2025-09-18 19:29:26'),
	(4, 'match_turnmax', '1000', 'Maximum number of turns per match', '2025-09-10 10:07:31', '2025-09-10 10:10:15'),
	(5, 'max_concurrent_matches', '20', 'Maximum number of concurrent matches allowed', '2025-09-10 10:07:31', '2025-09-10 10:07:31'),
	(6, 'matchmaking_enabled', '1', 'Whether matchmaking system is enabled (1=yes, 0=no)', '2025-09-10 10:07:31', '2025-09-10 10:07:31'),
	(7, 'queue_timeout_minutes', '25', 'Minutes before queue entries expire', '2025-09-10 10:07:31', '2025-09-18 16:47:58'),
	(8, 'queue_check_interval', '15', 'Seconds between queue processing runs', '2025-09-10 10:07:31', '2025-09-10 10:10:26'),
	(9, 'initial_mmr', '1200', 'Starting MMR for new players', '2025-09-10 10:07:31', '2025-09-10 10:07:31'),
	(10, 'mmr_min_gain', '10', 'Minimum MMR gained from a win', '2025-09-10 10:07:31', '2025-09-10 10:07:31'),
	(11, 'mmr_max_gain', '50', 'Maximum MMR gained from a win', '2025-09-10 10:07:31', '2025-09-10 10:07:31'),
	(12, 'mmr_min_loss', '10', 'Minimum MMR lost from a loss', '2025-09-10 10:07:31', '2025-09-10 10:07:31'),
	(13, 'mmr_max_loss', '50', 'Maximum MMR lost from a loss', '2025-09-10 10:07:31', '2025-09-10 10:07:31'),
	(55, 'war_points_attack_1col', '10', 'Points awarded for capturing 1 colony in war battles', '2025-09-17 14:19:26', '2025-09-17 14:19:26'),
	(56, 'war_points_attack_2col', '25', 'Points awarded for capturing 2 colonies in war battles', '2025-09-17 14:19:26', '2025-09-17 14:19:26'),
	(57, 'war_points_attack_3col', '50', 'Points awarded for capturing 3 colonies in war battles', '2025-09-17 14:19:26', '2025-09-17 14:19:26'),
	(58, 'war_points_defense_win', '15', 'Points awarded for successfully defending against attack', '2025-09-17 14:19:26', '2025-09-17 14:19:26'),
	(59, 'war_points_attack_loss', '0', 'Points deducted for losing an attack (can be negative)', '2025-09-17 14:19:26', '2025-09-17 14:19:26'),
	(74, 'match_duration_minutes_ranked_2v2', '25', 'Duration of 2v2 matches in minutes', '2025-09-18 18:56:23', '2025-09-18 19:29:43'),
	(75, 'match_team_size_ranked_2v2', '1', 'Number of players per team in 2v2 mode', '2025-09-18 18:56:23', '2025-09-18 19:27:49'),
	(76, 'match_turnmin_seconds_ranked_2v2', '0.50', 'Minimum seconds per turn in 2v2 matches', '2025-09-18 18:56:23', '2025-09-18 19:29:22'),
	(77, 'match_turnmax_ranked_2v2', '1000', 'Maximum number of turns per 2v2 match', '2025-09-18 18:56:23', '2025-09-18 19:29:18'),
	(78, 'queue_timeout_minutes_ranked_2v2', '20', 'Minutes before 2v2 queue entries expire', '2025-09-18 18:56:23', '2025-09-18 18:56:23'),
	(79, 'mmr_k_factor_ranked_2v2', '32', 'MMR adjustment factor for 2v2 matches (higher = more volatile)', '2025-09-18 18:56:23', '2025-09-18 18:56:23'),
	(80, 'game_mode_ranked_5v5_enabled', '1', 'Whether 5v5 ranked mode is available (1=yes, 0=no)', '2025-09-18 18:56:23', '2025-09-18 18:56:23'),
	(81, 'game_mode_ranked_2v2_enabled', '1', 'Whether 2v2 ranked mode is available (1=yes, 0=no)', '2025-09-18 18:56:23', '2025-09-18 18:56:23'),
	(82, 'game_mode_ranked_5v5_display_name', '2v2 Ranked', 'Display name for 2v2 mode', '2025-09-18 18:56:23', '2025-09-18 19:28:49'),
	(83, 'game_mode_ranked_2v2_display_name', '1v1 Ranked', 'Display name for 1v1 mode', '2025-09-18 18:56:23', '2025-09-18 19:28:45'),
	(91, 'match_team_size_ranked_5v5', '2', 'Number of players per team in 5v5 mode', '2025-09-18 21:38:13', '2025-09-18 21:38:13'),
	(92, 'match_duration_minutes_ranked_5v5', '30', 'Duration of 5v5 matches in minutes', '2025-09-18 21:38:13', '2025-09-18 21:38:13'),
	(93, 'match_turnmin_seconds_ranked_5v5', '0.50', 'Minimum seconds per turn in 5v5 matches', '2025-09-18 21:40:26', '2025-09-18 21:40:26'),
	(94, 'match_turnmax_ranked_5v5', '1000', 'Maximum number of turns per 5v5 match', '2025-09-18 21:40:26', '2025-09-18 21:40:26'),
	(95, 'mmr_k_factor_ranked_5v5', '32', 'MMR adjustment factor for 5v5 matches (higher = more volatile)', '2025-09-18 21:40:26', '2025-09-18 21:40:26');

/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
