ALTER TABLE `players` ADD COLUMN IF NOT EXISTS `yacht_inside` VARCHAR(40) NULL DEFAULT NULL;
CREATE TABLE IF NOT EXISTS `qs_yachts` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`yacht_id` INT(11) NOT NULL,
`owner` VARCHAR(60) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`owner_name` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`name` VARCHAR(100) NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
`modifications` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
`upgrades` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
`created_at` TIMESTAMP NULL DEFAULT current_timestamp(),
`updated_at` TIMESTAMP NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `yacht_id` (`yacht_id`) USING BTREE,
INDEX `owner` (`owner`) USING BTREE
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE IF NOT EXISTS `qs_yacht_tebex_transactions` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`transaction_id` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`yacht_id` INT(11) NOT NULL,
`owner` VARCHAR(60) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`created_at` TIMESTAMP NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`) USING BTREE,
INDEX `transaction_id` (`transaction_id`) USING BTREE,
INDEX `yacht_id` (`yacht_id`) USING BTREE,
INDEX `owner` (`owner`) USING BTREE,
UNIQUE INDEX `unique_transaction_yacht` (`transaction_id`, `yacht_id`) USING BTREE,
FOREIGN KEY (`yacht_id`) REFERENCES `qs_yachts`(`yacht_id`) ON DELETE CASCADE
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE IF NOT EXISTS `qs_yacht_tebex_spent` (
`transaction_id` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`owner` VARCHAR(60) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`created_at` TIMESTAMP NULL DEFAULT current_timestamp(),
PRIMARY KEY (`transaction_id`) USING BTREE,
INDEX `owner` (`owner`) USING BTREE
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE IF NOT EXISTS `qs_yacht_player_tebex_saved` (
`identifier` VARCHAR(60) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`transaction_id` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`updated_at` TIMESTAMP NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`identifier`) USING BTREE
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE IF NOT EXISTS `qs_yacht_keys` (
`id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`yacht_id` INT(11) NOT NULL,
`identifier` VARCHAR(60) NOT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY `unique_yacht_key` (`yacht_id`, `identifier`),
INDEX `yacht_id` (`yacht_id`),
INDEX `identifier` (`identifier`),
FOREIGN KEY (`yacht_id`) REFERENCES `qs_yachts`(`yacht_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `qs_yacht_decorations` (
`id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`creator` VARCHAR(60) NOT NULL,
`yacht_id` INT(11) NOT NULL,
`modelName` VARCHAR(255) NOT NULL,
`coords` LONGTEXT NOT NULL,
`rotation` LONGTEXT NOT NULL,
`inStash` TINYINT(1) DEFAULT 0,
`inHouse` TINYINT(1) DEFAULT 0,
`created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`uniq` VARCHAR(255) DEFAULT NULL,
`lightData` LONGTEXT DEFAULT NULL,
INDEX `yacht_id` (`yacht_id`),
INDEX `creator` (`creator`),
FOREIGN KEY (`yacht_id`) REFERENCES `qs_yachts`(`yacht_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `qs_yachts` ADD COLUMN IF NOT EXISTS `locations` LONGTEXT NULL DEFAULT NULL;
CREATE TABLE IF NOT EXISTS `qs_yacht_vault_codes` (
`id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`yacht_id` INT(11) NOT NULL,
`code` VARCHAR(10) NOT NULL,
`uniq` VARCHAR(255) NOT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY `unique_yacht_vault` (`yacht_id`, `uniq`),
INDEX `yacht_id` (`yacht_id`),
FOREIGN KEY (`yacht_id`) REFERENCES `qs_yachts`(`yacht_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `players` ADD COLUMN IF NOT EXISTS `yacht_inside` VARCHAR(40) NULL DEFAULT NULL;
CREATE TABLE IF NOT EXISTS `qs_yachts` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`yacht_id` INT(11) NOT NULL,
`owner` VARCHAR(60) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`owner_name` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`name` VARCHAR(100) NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
`modifications` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
`upgrades` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
`created_at` TIMESTAMP NULL DEFAULT current_timestamp(),
`updated_at` TIMESTAMP NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `yacht_id` (`yacht_id`) USING BTREE,
INDEX `owner` (`owner`) USING BTREE
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE IF NOT EXISTS `qs_yacht_tebex_transactions` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`transaction_id` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`yacht_id` INT(11) NOT NULL,
`owner` VARCHAR(60) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`created_at` TIMESTAMP NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`) USING BTREE,
INDEX `transaction_id` (`transaction_id`) USING BTREE,
INDEX `yacht_id` (`yacht_id`) USING BTREE,
INDEX `owner` (`owner`) USING BTREE,
UNIQUE INDEX `unique_transaction_yacht` (`transaction_id`, `yacht_id`) USING BTREE,
FOREIGN KEY (`yacht_id`) REFERENCES `qs_yachts`(`yacht_id`) ON DELETE CASCADE
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE IF NOT EXISTS `qs_yacht_tebex_spent` (
`transaction_id` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`owner` VARCHAR(60) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`created_at` TIMESTAMP NULL DEFAULT current_timestamp(),
PRIMARY KEY (`transaction_id`) USING BTREE,
INDEX `owner` (`owner`) USING BTREE
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE IF NOT EXISTS `qs_yacht_player_tebex_saved` (
`identifier` VARCHAR(60) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`transaction_id` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`updated_at` TIMESTAMP NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`identifier`) USING BTREE
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE IF NOT EXISTS `qs_yacht_keys` (
`id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`yacht_id` INT(11) NOT NULL,
`identifier` VARCHAR(60) NOT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY `unique_yacht_key` (`yacht_id`, `identifier`),
INDEX `yacht_id` (`yacht_id`),
INDEX `identifier` (`identifier`),
FOREIGN KEY (`yacht_id`) REFERENCES `qs_yachts`(`yacht_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `qs_yacht_decorations` (
`id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`creator` VARCHAR(60) NOT NULL,
`yacht_id` INT(11) NOT NULL,
`modelName` VARCHAR(255) NOT NULL,
`coords` LONGTEXT NOT NULL,
`rotation` LONGTEXT NOT NULL,
`inStash` TINYINT(1) DEFAULT 0,
`inHouse` TINYINT(1) DEFAULT 0,
`created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`uniq` VARCHAR(255) DEFAULT NULL,
`lightData` LONGTEXT DEFAULT NULL,
INDEX `yacht_id` (`yacht_id`),
INDEX `creator` (`creator`),
FOREIGN KEY (`yacht_id`) REFERENCES `qs_yachts`(`yacht_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `qs_yachts` ADD COLUMN IF NOT EXISTS `locations` LONGTEXT NULL DEFAULT NULL;
CREATE TABLE IF NOT EXISTS `qs_yacht_vault_codes` (
`id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`yacht_id` INT(11) NOT NULL,
`code` VARCHAR(10) NOT NULL,
`uniq` VARCHAR(255) NOT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY `unique_yacht_vault` (`yacht_id`, `uniq`),
INDEX `yacht_id` (`yacht_id`),
FOREIGN KEY (`yacht_id`) REFERENCES `qs_yachts`(`yacht_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;