Skip to content

Commit

Permalink
Added table for Gotcha game type
Browse files Browse the repository at this point in the history
  • Loading branch information
thordy committed Sep 13, 2021
1 parent c17b110 commit 560429b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions migrations/00044_add_gotcha_type.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- +goose Up
INSERT INTO `match_type`(`id`,`name`,`description`) VALUES (13, 'Gotcha', 'Gotcha');

CREATE TABLE `statistics_gotcha` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`leg_id` int(10) unsigned NOT NULL,
`player_id` int(10) unsigned NOT NULL,
`darts_thrown` int(11) DEFAULT NULL,
`highest_score` int(11) NOT NULL DEFAULT '0',
`times_reset` int(11),
`others_reset` int(11),
`score` int(11),
PRIMARY KEY (`id`),
KEY `fk_statistics_gotcha_leg_id` (`leg_id`),
KEY `fk_statistics_gotcha_player_id` (`player_id`),
CONSTRAINT `fk_statistics_gotcha_leg_id` FOREIGN KEY (`leg_id`) REFERENCES `leg` (`id`),
CONSTRAINT `fk_statistics_gotcha_player_id` FOREIGN KEY (`player_id`) REFERENCES `player` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- +goose Down
DELETE FROM `match_type` WHERE id = 13;
DROP TABLE `statistics_gotcha`;

0 comments on commit 560429b

Please sign in to comment.