migration

This commit is contained in:
torsten 2026-10-04 23:15:54 +02:00
parent add615fe9c
commit e3d6272276
37 changed files with 2777 additions and 144 deletions

View file

@ -13,7 +13,7 @@ CREATE TABLE `users` (
`mobile` varchar(255) DEFAULT NULL,
`deleted` timestamp NULL DEFAULT NULL,
`admin` tinyint(1) NOT NULL DEFAULT '0',
`remember_token` varchar(100) DEFAULT NULL,
`gets_reminders` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
@ -30,7 +30,8 @@ CREATE TABLE `tipps` (
`joker` tinyint(1) NOT NULL DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
UNIQUE KEY `tipps_user_game_unique` (`user_id`, `game_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `games`;
@ -63,7 +64,7 @@ CREATE TABLE `seasons` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`rounds` int(11) NOT NULL DEFAULT '36',
`active` tinyint(1) NOT NULL DEFAULT '1',
`max_identical_jokertipps` int(11) NOT NULL DEFAULT '6',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
@ -73,6 +74,7 @@ DROP TABLE IF EXISTS `settings`;
CREATE TABLE `settings` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`current_season_id` int(11) NOT NULL,
`registration_open` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
@ -123,3 +125,11 @@ CREATE TABLE `manual_payouts` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `password_resets`;
CREATE TABLE `password_resets` (
`email` varchar(150) NOT NULL,
`token` varchar(100) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;