· 6 years ago · Jun 13, 2019, 02:22 AM
1-- MySQL dump 10.17 Distrib 10.3.13-MariaDB, for osx10.14 (x86_64)
2--
3-- Host: 127.0.0.1 Database: alphheim
4-- ------------------------------------------------------
5-- Server version 10.3.13-MariaDB
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8mb4 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `cc3_account`
20--
21
22DROP TABLE IF EXISTS `cc3_account`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `cc3_account` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `name` varchar(50) DEFAULT NULL,
28 `infiniteMoney` tinyint(1) DEFAULT 0,
29 `uuid` varchar(36) DEFAULT NULL,
30 `ignoreACL` tinyint(1) DEFAULT 0,
31 `bank` tinyint(1) DEFAULT 0,
32 PRIMARY KEY (`id`),
33 UNIQUE KEY `uuid` (`uuid`),
34 KEY `cc3_account_name_index` (`name`)
35) ENGINE=InnoDB AUTO_INCREMENT=237 DEFAULT CHARSET=utf8mb4;
36/*!40101 SET character_set_client = @saved_cs_client */;
37
38
39DROP TABLE IF EXISTS `cc3_acl`;
40/*!40101 SET @saved_cs_client = @@character_set_client */;
41/*!40101 SET character_set_client = utf8 */;
42CREATE TABLE `cc3_acl` (
43 `account_id` int(11) NOT NULL,
44 `playerName` varchar(16) NOT NULL,
45 `owner` tinyint(1) DEFAULT NULL,
46 `balance` tinyint(1) DEFAULT 0,
47 `deposit` tinyint(1) DEFAULT 0,
48 `acl` tinyint(1) DEFAULT 0,
49 `withdraw` tinyint(1) DEFAULT 0,
50 PRIMARY KEY (`account_id`,`playerName`),
51 CONSTRAINT `cc3_fk_acl_account` FOREIGN KEY (`account_id`) REFERENCES `cc3_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
52) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
53/*!40101 SET character_set_client = @saved_cs_client */;
54
55--
56-- Table structure for table `cc3_balance`
57--
58
59DROP TABLE IF EXISTS `cc3_balance`;
60/*!40101 SET @saved_cs_client = @@character_set_client */;
61/*!40101 SET character_set_client = utf8 */;
62CREATE TABLE `cc3_balance` (
63 `balance` double DEFAULT NULL,
64 `worldName` varchar(255) NOT NULL,
65 `username_id` int(11) NOT NULL,
66 `currency_id` varchar(50) NOT NULL,
67 PRIMARY KEY (`worldName`,`username_id`,`currency_id`),
68 KEY `cc3_fk_balance_account` (`username_id`),
69 KEY `cc3_fk_balance_currency` (`currency_id`),
70 CONSTRAINT `cc3_fk_balance_account` FOREIGN KEY (`username_id`) REFERENCES `cc3_account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
71 CONSTRAINT `cc3_fk_balance_currency` FOREIGN KEY (`currency_id`) REFERENCES `cc3_currency` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
72) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
73/*!40101 SET character_set_client = @saved_cs_client */;
74
75--
76-- Table structure for table `cc3_config`
77--
78
79DROP TABLE IF EXISTS `cc3_config`;
80/*!40101 SET @saved_cs_client = @@character_set_client */;
81/*!40101 SET character_set_client = utf8 */;
82CREATE TABLE `cc3_config` (
83 `name` varchar(30) NOT NULL,
84 `value` varchar(255) NOT NULL,
85 PRIMARY KEY (`name`)
86) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
87/*!40101 SET character_set_client = @saved_cs_client */;
88
89--
90-- Table structure for table `cc3_currency`
91--
92
93DROP TABLE IF EXISTS `cc3_currency`;
94/*!40101 SET @saved_cs_client = @@character_set_client */;
95/*!40101 SET character_set_client = utf8 */;
96CREATE TABLE `cc3_currency` (
97 `name` varchar(50) NOT NULL,
98 `plural` varchar(50) DEFAULT NULL,
99 `minor` varchar(50) DEFAULT NULL,
100 `minorplural` text DEFAULT NULL,
101 `sign` varchar(5) DEFAULT NULL,
102 `status` tinyint(1) DEFAULT 0,
103 `bankCurrency` tinyint(1) DEFAULT 0,
104 PRIMARY KEY (`name`)
105) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
106/*!40101 SET character_set_client = @saved_cs_client */;
107
108--
109-- Table structure for table `cc3_exchange`
110--
111
112DROP TABLE IF EXISTS `cc3_exchange`;
113/*!40101 SET @saved_cs_client = @@character_set_client */;
114/*!40101 SET character_set_client = utf8 */;
115CREATE TABLE `cc3_exchange` (
116 `from_currency` varchar(50) NOT NULL,
117 `to_currency` varchar(50) NOT NULL,
118 `amount` double DEFAULT 1,
119 PRIMARY KEY (`from_currency`,`to_currency`),
120 KEY `cc3_fk_exchange_currencyto` (`to_currency`),
121 CONSTRAINT `cc3_fk_exchange_currencyfrom` FOREIGN KEY (`from_currency`) REFERENCES `cc3_currency` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
122 CONSTRAINT `cc3_fk_exchange_currencyto` FOREIGN KEY (`to_currency`) REFERENCES `cc3_currency` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
123) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
124/*!40101 SET character_set_client = @saved_cs_client */;
125
126--
127-- Table structure for table `cc3_log`
128--
129
130DROP TABLE IF EXISTS `cc3_log`;
131/*!40101 SET @saved_cs_client = @@character_set_client */;
132/*!40101 SET character_set_client = utf8 */;
133CREATE TABLE `cc3_log` (
134 `id` int(11) NOT NULL AUTO_INCREMENT,
135 `username_id` int(11) DEFAULT NULL,
136 `type` varchar(30) DEFAULT NULL,
137 `cause` varchar(50) DEFAULT NULL,
138 `causeReason` varchar(50) DEFAULT NULL,
139 `worldName` varchar(50) DEFAULT NULL,
140 `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
141 `amount` double DEFAULT NULL,
142 `currency_id` varchar(50) DEFAULT NULL,
143 PRIMARY KEY (`id`),
144 KEY `cc3_fk_log_account` (`username_id`),
145 KEY `cc3_fk_log_currency` (`currency_id`),
146 CONSTRAINT `cc3_fk_log_account` FOREIGN KEY (`username_id`) REFERENCES `cc3_account` (`id`) ON DELETE CASCADE,
147 CONSTRAINT `cc3_fk_log_currency` FOREIGN KEY (`currency_id`) REFERENCES `cc3_currency` (`name`) ON DELETE CASCADE
148) ENGINE=InnoDB AUTO_INCREMENT=8049 DEFAULT CHARSET=utf8mb4;
149/*!40101 SET character_set_client = @saved_cs_client */;
150
151--
152-- Table structure for table `cc3_worldgroup`
153--
154
155DROP TABLE IF EXISTS `cc3_worldgroup`;
156/*!40101 SET @saved_cs_client = @@character_set_client */;
157/*!40101 SET character_set_client = utf8 */;
158CREATE TABLE `cc3_worldgroup` (
159 `groupName` varchar(255) NOT NULL,
160 `worldList` varchar(255) DEFAULT NULL,
161 PRIMARY KEY (`groupName`)
162) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
163/*!40101 SET character_set_client = @saved_cs_client */;
164
165/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
166
167/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
168/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
169/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
170/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
171/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
172/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
173/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
174
175-- Dump completed on 2019-03-18 5:12:28