1
0
Fork 0
forked from Simnation/Main
Main/resources/[creator]/missions_creator/sql/statistics.sql

15 lines
689 B
MySQL
Raw Permalink Normal View History

2025-06-07 08:51:21 +02:00
CREATE TABLE IF NOT EXISTS `missions_creator_statistics` (
`template_id` INT(11) NOT NULL,
`likes` INT(11) NOT NULL DEFAULT '0',
`dislikes` INT(11) NOT NULL DEFAULT '0',
`success_count` INT(11) NOT NULL DEFAULT '0',
`fail_count` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`template_id`) USING BTREE,
UNIQUE INDEX `template_id` (`template_id`) USING BTREE,
CONSTRAINT `fk_mc_statistics_mc_templates` FOREIGN KEY (`template_id`) REFERENCES `missions_creator_templates` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
)
COMMENT='Keeps track of the missions statistics (likes, dislikes, success/fail count)'
DEFAULT CHARSET=utf8mb4
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB;