· 6 years ago · Jun 23, 2019, 11:18 AM
1[SQL] Query database_schema start
2[ERR] 1005 - Can't create table `altislife`.`players` (errno: 150 "Foreign key constraint is incorrectly formed")
3[ERR] -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
4--
5-- Host: localhost Database: gw_existence_db
6-- ------------------------------------------------------
7-- Server version 5.5.5-10.1.21-MariaDB
8
9/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
10/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
11/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
12/*!40101 SET NAMES utf8 */;
13/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
14/*!40103 SET TIME_ZONE='+00:00' */;
15/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
16/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
17/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
18/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
19
20--
21-- Table structure for table `players`
22--
23
24DROP TABLE IF EXISTS `players`;
25/*!40101 SET @saved_cs_client = @@character_set_client */;
26/*!40101 SET character_set_client = utf8 */;
27CREATE TABLE `players` (
28 `id` int(11) NOT NULL AUTO_INCREMENT,
29 `player_id` varchar(17) NOT NULL,
30 `name` varchar(32) NOT NULL,
31 `aliases` text NOT NULL,
32 `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
33 `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
34 `ranks` text NOT NULL,
35 `money` text NOT NULL,
36 `alive` tinyint(1) NOT NULL DEFAULT '0',
37 `inventory` text NOT NULL,
38 `gear` text NOT NULL,
39 `body_stats` text NOT NULL,
40 `playtime` text NOT NULL,
41 `experience` text NOT NULL,
42 `licenses` text NOT NULL,
43 `jail_time` int(10) NOT NULL DEFAULT '0',
44 `jail` text NOT NULL,
45 `admin_rank` enum('0','1','2','3') NOT NULL DEFAULT '0',
46 PRIMARY KEY (`id`),
47 UNIQUE KEY `playerid_UNIQUE` (`player_id`)
48) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
49/*!40101 SET character_set_client = @saved_cs_client */;
50
51--
52-- Table structure for table `deaths`
53--
54
55DROP TABLE IF EXISTS `deaths`;
56/*!40101 SET @saved_cs_client = @@character_set_client */;
57/*!40101 SET character_set_client = utf8 */;
58CREATE TABLE `deaths` (
59 `id` int(11) NOT NULL AUTO_INCREMENT,
60 `player_id` varchar(17) NOT NULL,
61 `physical_inventory` text NOT NULL,
62 `virtual_inventory` text NOT NULL,
63 `cash` int(100) NOT NULL,
64 `killer_playerid` varchar(17) NOT NULL,
65 `killer_weapon` varchar(17) NOT NULL,
66 `killer_distance` text NOT NULL,
67 PRIMARY KEY (`id`)
68) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=latin1;
69/*!40101 SET character_set_client = @saved_cs_client */;
70
71--
72-- Table structure for table `deposit_box`
73--
74
75DROP TABLE IF EXISTS `deposit_box`;
76/*!40101 SET @saved_cs_client = @@character_set_client */;
77/*!40101 SET character_set_client = utf8 */;
78CREATE TABLE `deposit_box` (
79 `id` int(11) NOT NULL AUTO_INCREMENT,
80 `player_id` varchar(17) NOT NULL,
81 `reason` varchar(64) NOT NULL DEFAULT 'N/A',
82 `amount` int(64) NOT NULL DEFAULT '0',
83 `case_url` text NOT NULL,
84 `deposit_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
85 PRIMARY KEY (`id`),
86 UNIQUE KEY `deposit_box_id_uindex` (`id`),
87 KEY `deposit_box_players_playerid_fk` (`player_id`),
88 CONSTRAINT `deposit_box_players_playerid_fk` FOREIGN KEY (`player_id`) REFERENCES `players` (`player_id`) ON DELETE CASCADE
89) ENGINE=InnoDB DEFAULT CHARSET=latin1;
90/*!40101 SET character_set_client = @saved_cs_client */;
91
92--
93-- Table structure for table `organizations`
94--
95
96DROP TABLE IF EXISTS `organizations`;
97/*!40101 SET @saved_cs_client = @@character_set_client */;
98/*!40101 SET character_set_client = utf8 */;
99CREATE TABLE `organizations` (
100 `id` int(11) NOT NULL AUTO_INCREMENT,
101 `org_tag` varchar(45) NOT NULL,
102 `org_ownerid` varchar(17) NOT NULL,
103 `org_name` varchar(45) NOT NULL,
104 `org_datecreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
105 `org_lastupdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
106 `org_bank` int(64) NOT NULL DEFAULT '0',
107 `org_points` int(64) NOT NULL DEFAULT '0',
108 `org_members` text NOT NULL,
109 PRIMARY KEY (`id`),
110 UNIQUE KEY `org_ownerid_UNIQUE` (`org_ownerid`)
111) ENGINE=InnoDB AUTO_INCREMEN
112[SQL] Finished with error