SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_audiofiles` -- CREATE TABLE `prefix-placeholder_audiofiles` ( `id` int(11) NOT NULL, `file_name` varchar(1024) NOT NULL, `file_path` varchar(1024) NOT NULL, `edited_by` int(11) DEFAULT NULL, `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_disziplinen` -- CREATE TABLE `prefix-placeholder_disziplinen` ( `id` int(11) NOT NULL, `name` varchar(1024) DEFAULT NULL, `start_index` int(11) DEFAULT NULL, `color_kampfrichter` char(7) NOT NULL DEFAULT '#424242', `audiofile` tinyint(1) DEFAULT NULL, `audiofile_max_duration` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_einmal_links` -- CREATE TABLE `prefix-placeholder_einmal_links` ( `id` int(11) NOT NULL, `url` varchar(1000) DEFAULT NULL, `user_id` int(11) NOT NULL DEFAULT 0, `type` enum('login','pwreset','create_profile','') NOT NULL, `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), `expires_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -- Trigger `prefix-placeholder_einmal_links` -- DELIMITER $$ CREATE TRIGGER `before_insert_login_tokens` BEFORE INSERT ON `prefix-placeholder_einmal_links` FOR EACH ROW BEGIN IF NEW.url IS NULL THEN SET NEW.url = HEX(RANDOM_BYTES(32)); END IF; END $$ DELIMITER ; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_gruppen` -- CREATE TABLE `prefix-placeholder_gruppen` ( `id` int(11) NOT NULL, `name` varchar(100) NOT NULL DEFAULT 'KEIN NAME', `order_index` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_gruppen_zeiten` -- CREATE TABLE `prefix-placeholder_gruppen_zeiten` ( `zeitplan_id` int(11) NOT NULL, `start_time` time NOT NULL, `end_time` time DEFAULT NULL, `abt_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_intern_benutzende` -- CREATE TABLE `prefix-placeholder_intern_benutzende` ( `id` bigint(20) UNSIGNED NOT NULL, `username` varchar(191) DEFAULT NULL, `name_person` varchar(255) DEFAULT NULL, `password_hash` varchar(255) DEFAULT NULL, `password_cipher` text DEFAULT NULL, `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `edited_by` varchar(20) NOT NULL DEFAULT '0', `freigabe` varchar(500) NOT NULL DEFAULT 'keine', `login_active` tinyint(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT INTO `prefix-placeholder_intern_benutzende` (`id`, `username`, `password_hash`, `password_cipher`, `freigabe`, `login_active`) VALUES ('1', 'admin', 'PW_HASH', 'not_set', '{"types":["wk_leitung","trainer","kampfrichter"],"freigabenTrainer":["admin"],"freigabenKampfrichter":["A"]}', '1'); -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_kategorien` -- CREATE TABLE `prefix-placeholder_kategorien` ( `id` int(11) NOT NULL, `programm` text NOT NULL, `order_index` int(11) DEFAULT NULL, `preis` decimal(10,2) DEFAULT 0.00, `aktiv` tinyint(1) NOT NULL DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_tabellen_konfiguration` -- CREATE TABLE `prefix-placeholder_tabellen_konfiguration` ( `id` int(11) NOT NULL, `type_slug` varchar(128) NOT NULL, `json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`json`)), `all_noten_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`all_noten_json`)), `created_at` timestamp NOT NULL DEFAULT current_timestamp(), `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `created_by` int(11) DEFAULT NULL, `updated_by` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_teilnehmende` -- CREATE TABLE `prefix-placeholder_teilnehmende` ( `id` int(11) NOT NULL, `wk_id` int(11) DEFAULT NULL, `name` text NOT NULL, `vorname` text NOT NULL, `geburtsdatum` date NOT NULL, `programm` text NOT NULL, `verein` text NOT NULL, `bezahlt` int(11) NOT NULL DEFAULT 1, `bezahltoverride` int(11) NOT NULL DEFAULT 0, `betrag_bezahlt` decimal(12,2) NOT NULL DEFAULT 0.00 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_teilnehmende_audiofiles` -- CREATE TABLE `prefix-placeholder_teilnehmende_audiofiles` ( `person_id` int(7) NOT NULL, `geraet_id` int(7) NOT NULL, `audiofile_id` int(7) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_teilnehmende_gruppen` -- CREATE TABLE `prefix-placeholder_teilnehmende_gruppen` ( `id` int(11) NOT NULL, `turnerin_id` int(11) NOT NULL, `abteilung_id` int(11) NOT NULL, `geraet_id` int(11) NOT NULL, `turnerin_index` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_variables` -- CREATE TABLE `prefix-placeholder_variables` ( `name` varchar(255) NOT NULL DEFAULT 'NaN', `value` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_verbuchte_startgebueren` -- CREATE TABLE `prefix-placeholder_verbuchte_startgebueren` ( `order_id` int(11) NOT NULL, `order_type` varchar(100) DEFAULT NULL, `preis` float DEFAULT NULL, `user_id` int(11) NOT NULL, `item_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`item_ids`)), `used_verein_konten` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '\'{}\'', `order_status` int(11) NOT NULL DEFAULT 0, `timestamp` timestamp NOT NULL DEFAULT current_timestamp(), `edited_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_verbuchte_startgebueren_log` -- CREATE TABLE `prefix-placeholder_verbuchte_startgebueren_log` ( `id` int(11) NOT NULL, `order_id` int(11) NOT NULL, `old_order_status` int(11) NOT NULL, `new_order_status` int(11) NOT NULL, `edited_by` int(11) NOT NULL, `edited_at` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_vereine` -- CREATE TABLE `prefix-placeholder_vereine` ( `id` int(11) NOT NULL, `verein` text NOT NULL, `email` varchar(100) NOT NULL DEFAULT 'forms@testseite-fh.ch', `konto` decimal(12,2) NOT NULL DEFAULT 0.00 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_warenkorb_startgebueren` -- CREATE TABLE `prefix-placeholder_warenkorb_startgebueren` ( `id` int(11) NOT NULL, `user_id` bigint(20) UNSIGNED NOT NULL, `item_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_wertungen` -- CREATE TABLE `prefix-placeholder_wertungen` ( `person_id` int(11) NOT NULL, `note_bezeichnung_id` int(11) NOT NULL, `geraet_id` int(11) NOT NULL, `wk_id` int(11) NOT NULL, `run_number` tinyint(3) NOT NULL DEFAULT 1, `value` float DEFAULT NULL, `is_public` tinyint(1) DEFAULT NULL, `public_value` float DEFAULT NULL, `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_wertungen_log` -- CREATE TABLE `prefix-placeholder_wertungen_log` ( `id` int(11) NOT NULL, `person_id` int(11) NOT NULL, `note_bezeichnung_id` int(11) NOT NULL, `geraet_id` int(11) NOT NULL, `wk_id` int(11) NOT NULL, `run_number` tinyint(3) NOT NULL DEFAULT 1, `old_value` float DEFAULT NULL, `new_value` float DEFAULT NULL, `edited_by` int(11) NOT NULL, `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_wertungstypen` -- CREATE TABLE `prefix-placeholder_wertungstypen` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `default_value` float DEFAULT NULL, `type` enum('input','berechnung') NOT NULL DEFAULT 'input', `berechnung` varchar(255) DEFAULT NULL, `berechnung_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`berechnung_json`)), `max_value` float DEFAULT NULL, `min_value` float DEFAULT NULL, `pro_geraet` tinyint(1) NOT NULL DEFAULT 1, `anzahl_laeufe_json` text DEFAULT NULL, `geraete_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '[]', `zeige_auf_rangliste` float DEFAULT NULL, `groesse_auf_rangliste` int(11) NOT NULL DEFAULT 0, `nullstellen` int(11) NOT NULL DEFAULT 2, `display_string` varchar(63) NOT NULL DEFAULT '${note}' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_wettkaempfe` -- CREATE TABLE `prefix-placeholder_wettkaempfe` ( `id` int(11) NOT NULL, `name` varchar(256) NOT NULL, `slug` varchar(64) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -------------------------------------------------------- -- -- Tabellenstruktur für Tabelle `prefix-placeholder_zeitplan_types` -- CREATE TABLE `prefix-placeholder_zeitplan_types` ( `id` int(11) NOT NULL, `name` varchar(2048) NOT NULL, `has_endtime` tinyint(1) DEFAULT NULL, `display_index` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; -- -- Indizes der exportierten Tabellen -- -- -- Indizes für die Tabelle `prefix-placeholder_audiofiles` -- ALTER TABLE `prefix-placeholder_audiofiles` ADD PRIMARY KEY (`id`); -- -- Indizes für die Tabelle `prefix-placeholder_disziplinen` -- ALTER TABLE `prefix-placeholder_disziplinen` ADD PRIMARY KEY (`id`); -- -- Indizes für die Tabelle `prefix-placeholder_einmal_links` -- ALTER TABLE `prefix-placeholder_einmal_links` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `url` (`url`); -- -- Indizes für die Tabelle `prefix-placeholder_gruppen` -- ALTER TABLE `prefix-placeholder_gruppen` ADD PRIMARY KEY (`id`); -- -- Indizes für die Tabelle `prefix-placeholder_gruppen_zeiten` -- ALTER TABLE `prefix-placeholder_gruppen_zeiten` ADD UNIQUE KEY `unique_index` (`zeitplan_id`,`abt_id`); -- -- Indizes für die Tabelle `prefix-placeholder_intern_benutzende` -- ALTER TABLE `prefix-placeholder_intern_benutzende` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username_page_unique` (`username`,`password_hash`) USING BTREE, ADD KEY `indexFreigabe` (`freigabe`); -- -- Indizes für die Tabelle `prefix-placeholder_kategorien` -- ALTER TABLE `prefix-placeholder_kategorien` ADD PRIMARY KEY (`id`); -- -- Indizes für die Tabelle `prefix-placeholder_tabellen_konfiguration` -- ALTER TABLE `prefix-placeholder_tabellen_konfiguration` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `unique_slug` (`type_slug`); -- -- Indizes für die Tabelle `prefix-placeholder_teilnehmende` -- ALTER TABLE `prefix-placeholder_teilnehmende` ADD PRIMARY KEY (`id`), ADD KEY `wk_index` (`wk_id`); -- -- Indizes für die Tabelle `prefix-placeholder_teilnehmende_audiofiles` -- ALTER TABLE `prefix-placeholder_teilnehmende_audiofiles` ADD UNIQUE KEY `unique_combo` (`person_id`,`geraet_id`); -- -- Indizes für die Tabelle `prefix-placeholder_teilnehmende_gruppen` -- ALTER TABLE `prefix-placeholder_teilnehmende_gruppen` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `unique_turnerin` (`turnerin_id`); -- -- Indizes für die Tabelle `prefix-placeholder_variables` -- ALTER TABLE `prefix-placeholder_variables` ADD UNIQUE KEY `uniqueIndex` (`name`); -- -- Indizes für die Tabelle `prefix-placeholder_verbuchte_startgebueren` -- ALTER TABLE `prefix-placeholder_verbuchte_startgebueren` ADD PRIMARY KEY (`order_id`); -- -- Indizes für die Tabelle `prefix-placeholder_verbuchte_startgebueren_log` -- ALTER TABLE `prefix-placeholder_verbuchte_startgebueren_log` ADD PRIMARY KEY (`id`); -- -- Indizes für die Tabelle `prefix-placeholder_vereine` -- ALTER TABLE `prefix-placeholder_vereine` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `indexturnerinnen` (`id`,`verein`(31)); -- -- Indizes für die Tabelle `prefix-placeholder_warenkorb_startgebueren` -- ALTER TABLE `prefix-placeholder_warenkorb_startgebueren` ADD PRIMARY KEY (`id`), ADD KEY `prefix-placeholder_basket_items_ibfk_1` (`user_id`), ADD KEY `prefix-placeholder_basket_items_ibfk_2` (`item_id`); -- -- Indizes für die Tabelle `prefix-placeholder_wertungen` -- ALTER TABLE `prefix-placeholder_wertungen` ADD UNIQUE KEY `uniquePersonNoteJahrGereat` (`person_id`,`note_bezeichnung_id`,`wk_id`,`geraet_id`,`run_number`) USING BTREE; -- -- Indizes für die Tabelle `prefix-placeholder_wertungen_log` -- ALTER TABLE `prefix-placeholder_wertungen_log` ADD PRIMARY KEY (`id`); -- -- Indizes für die Tabelle `prefix-placeholder_wertungstypen` -- ALTER TABLE `prefix-placeholder_wertungstypen` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `uniqueName` (`name`) USING BTREE, ADD KEY `indexMaxValue` (`max_value`), ADD KEY `indexMinValue` (`min_value`), ADD KEY `indexBerechnungJson` (`berechnung_json`(768)), ADD KEY `indexDefaultValue` (`default_value`), ADD KEY `indexType` (`type`), ADD KEY `indexNullstellen` (`nullstellen`) USING BTREE; -- -- Indizes für die Tabelle `prefix-placeholder_wettkaempfe` -- ALTER TABLE `prefix-placeholder_wettkaempfe` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `slug` (`slug`); -- -- Indizes für die Tabelle `prefix-placeholder_zeitplan_types` -- ALTER TABLE `prefix-placeholder_zeitplan_types` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT für exportierte Tabellen -- -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_audiofiles` -- ALTER TABLE `prefix-placeholder_audiofiles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_disziplinen` -- ALTER TABLE `prefix-placeholder_disziplinen` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_einmal_links` -- ALTER TABLE `prefix-placeholder_einmal_links` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=118; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_gruppen` -- ALTER TABLE `prefix-placeholder_gruppen` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=165; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_intern_benutzende` -- ALTER TABLE `prefix-placeholder_intern_benutzende` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_kategorien` -- ALTER TABLE `prefix-placeholder_kategorien` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_tabellen_konfiguration` -- ALTER TABLE `prefix-placeholder_tabellen_konfiguration` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=106; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_teilnehmende` -- ALTER TABLE `prefix-placeholder_teilnehmende` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=295; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_teilnehmende_gruppen` -- ALTER TABLE `prefix-placeholder_teilnehmende_gruppen` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1030; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_verbuchte_startgebueren_log` -- ALTER TABLE `prefix-placeholder_verbuchte_startgebueren_log` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=86; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_vereine` -- ALTER TABLE `prefix-placeholder_vereine` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_warenkorb_startgebueren` -- ALTER TABLE `prefix-placeholder_warenkorb_startgebueren` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1241; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_wertungen_log` -- ALTER TABLE `prefix-placeholder_wertungen_log` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=883; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_wettkaempfe` -- ALTER TABLE `prefix-placeholder_wettkaempfe` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT für Tabelle `prefix-placeholder_zeitplan_types` -- ALTER TABLE `prefix-placeholder_zeitplan_types` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;