SQL

CREATE TABLE `origen_ilegal_documents` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`gangid` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'latin1_swedish_ci',
	`title` VARCHAR(255) NULL DEFAULT '' COLLATE 'utf8mb4_spanish_ci',
	`description` TEXT NULL DEFAULT '' COLLATE 'utf8mb4_spanish_ci',
	`author` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'latin1_swedish_ci',
	`date` TIMESTAMP NULL DEFAULT current_timestamp(),
	`images` TEXT NULL DEFAULT '[]' COLLATE 'utf8mb4_spanish_ci',
	PRIMARY KEY (`id`) USING BTREE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=3
;

CREATE TABLE IF NOT EXISTS `origen_ilegal_gangs` (
  `id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT 'ERROR',
  `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT 'ERROR',
  `color` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT '#000',
  `max_members` int(3) DEFAULT NULL,
  `level` int(11) NOT NULL DEFAULT 0,
  `experience` int(11) NOT NULL DEFAULT 0,
  `logo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci DEFAULT NULL,
  `focus` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci DEFAULT NULL,
  `skills` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT '{}',
  `grades` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT '[]',
  `players` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT '[]',
  `missions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT '[]',
  `vehicles` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT '[]',
  `territories` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT '[]',
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT '[]',
  `discovered` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '[]',
  `stats` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_spanish_ci NOT NULL DEFAULT '[]',
  `price_sprays` int(20) DEFAULT 10000,
  PRIMARY KEY (`id`) USING BTREE,
  CONSTRAINT `metadata` CHECK (json_valid(`metadata`)),
  CONSTRAINT `discovered` CHECK (json_valid(`discovered`))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

CREATE TABLE `origen_ilegal_labs` (
	`code` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'latin1_swedish_ci',
	`type` VARCHAR(50) NOT NULL DEFAULT 'weed' COLLATE 'utf8mb4_spanish_ci',
	`ipl` LONGTEXT NOT NULL COLLATE 'utf8mb4_spanish_ci',
	`existences` LONGTEXT NOT NULL COLLATE 'utf8mb4_spanish_ci',
	PRIMARY KEY (`code`) USING BTREE,
	CONSTRAINT `existences` CHECK (json_valid(`existences`)),
	CONSTRAINT `ipl` CHECK (json_valid(`ipl`))
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
;

CREATE TABLE `origen_ilegal_notes` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`documentid` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_spanish_ci',
	`title` VARCHAR(255) NULL DEFAULT '' COLLATE 'utf8mb4_spanish_ci',
	`description` TEXT NULL DEFAULT '' COLLATE 'utf8mb4_spanish_ci',
	`author` VARCHAR(255) NULL DEFAULT '' COLLATE 'utf8mb4_spanish_ci',
	`date` TIMESTAMP NULL DEFAULT current_timestamp(),
	`fixed` INT(1) NULL DEFAULT '0',
	PRIMARY KEY (`id`) USING BTREE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
;

CREATE TABLE `origen_ilegal_spray` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`gang` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_spanish_ci',
	`coords` LONGTEXT NOT NULL COLLATE 'utf8mb4_spanish_ci',
	`url` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_spanish_ci',
	PRIMARY KEY (`id`) USING BTREE
)
COLLATE='utf8mb3_general_ci'
ENGINE=InnoDB
;

CREATE TABLE IF NOT EXISTS `origen_ilegal_gangs_members` (
	`citizenid` varchar(46) NOT NULL,
	`gang_id` varchar(50) NOT NULL DEFAULT '',
	`grade` int(11) DEFAULT NULL,
	PRIMARY KEY (`citizenid`) USING BTREE,
	KEY `gangID` (`gang_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `origen_ilegal_garage` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `gang_id` varchar(50) DEFAULT NULL,
  `plate` varchar(50) DEFAULT '0',
  `owner` varchar(50) DEFAULT '0',
  `status` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `plate` (`plate`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

Last updated