First migrated version
This commit is contained in:
parent
12b2cd91f8
commit
acb7618086
6 changed files with 268 additions and 2 deletions
68
schema.sql
Normal file
68
schema.sql
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
CREATE TABLE `users` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(201) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`firstname` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`lastname` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`email` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`password` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`iban` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`bankname` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`blz` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`kontonr` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`deleted` timestamp NULL DEFAULT NULL,
|
||||
`admin` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `users_email_unique` (`email`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `tipps` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`user_id` int(11) NOT NULL,
|
||||
`game_id` int(11) NOT NULL,
|
||||
`score1` int(11) NOT NULL,
|
||||
`score2` int(11) NOT NULL,
|
||||
`joker` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `games` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`round_id` int(11) NOT NULL,
|
||||
`team1` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`team2` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`score1` int(11) NOT NULL DEFAULT '-1',
|
||||
`score2` int(11) NOT NULL DEFAULT '-1',
|
||||
`kickoff` datetime NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `rounds` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`season_id` int(11) NOT NULL,
|
||||
`report` varchar(16000) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE `seasons` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`rounds` int(11) NOT NULL DEFAULT '36',
|
||||
`active` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- Weitere Tabellen (Settings, Payments, Quotas) können bei Bedarf ergänzt werden.
|
||||
-- Tote Features (Ligen, Matches) wurden absichtlich weggelassen.
|
||||
Loading…
Add table
Add a link
Reference in a new issue