feat,wip: 경매장을 db table로 분리

This commit is contained in:
2022-06-09 01:21:21 +09:00
parent bb04632a7f
commit 9b1a57bbd2
5 changed files with 90 additions and 89 deletions
+15 -13
View File
@@ -692,21 +692,23 @@ CREATE TABLE `vote_comment` (
##############################
# KVStorage에
CREATE TABLE `ng_auction` (
`no` INT(11) NOT NULL AUTO_INCREMENT,
`auction_id` INT(11) NOT NULL,
`owner` INT(11) NULL DEFAULT NULL,
`general_id` INT(11) NOT NULL,
`amount` INT(11) NOT NULL,
`date` DATETIME NOT NULL,
`aux` LONGTEXT NOT NULL COLLATE 'utf8mb4_bin',
PRIMARY KEY (`no`),
UNIQUE INDEX `by_general` (`general_id`, `auction_id`, `amount`),
UNIQUE INDEX `by_owner` (`owner`, `auction_id`, `amount`),
INDEX `by_amount` (`auction_id`, `amount`, `date`),
CONSTRAINT `aux` CHECK (json_valid(`aux`))
`id` INT(11) NOT NULL AUTO_INCREMENT,
`type` ENUM('gold','rice','uniqueItem') NOT NULL COLLATE 'utf8mb4_bin',
`finished` BIT(1) NOT NULL,
`target` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`opener_general_id` INT(11) NOT NULL,
`req_resource` ENUM('gold','rice','inheritPoint') NOT NULL COLLATE 'utf8mb4_bin',
`open_date` DATETIME NOT NULL,
`close_date` DATETIME NOT NULL,
`detail` LONGTEXT NOT NULL COLLATE 'utf8mb4_bin',
PRIMARY KEY (`id`) USING BTREE,
INDEX `by_close` (`finished`, `type`, `close_date`) USING BTREE,
INDEX `by_general_id` (`opener_general_id`, `type`, `finished`) USING BTREE,
CONSTRAINT `detail` CHECK (json_valid(`detail`))
)
COLLATE='utf8mb4_general_ci'
ENGINE = Aria;
ENGINE=Aria
;
CREATE TABLE `ng_auction_bid` (
`no` INT(11) NOT NULL AUTO_INCREMENT,