|
@@ -0,0 +1,378 @@
|
|
|
+-- phpMyAdmin SQL Dump
|
|
|
+-- version 5.0.4
|
|
|
+-- https://www.phpmyadmin.net/
|
|
|
+--
|
|
|
+-- Host: 127.0.0.1
|
|
|
+-- Erstellungszeit: 12. Jul 2023 um 15:06
|
|
|
+-- Server-Version: 10.1.21-MariaDB
|
|
|
+-- PHP-Version: 8.0.2
|
|
|
+
|
|
|
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
|
+START TRANSACTION;
|
|
|
+SET time_zone = "+00:00";
|
|
|
+
|
|
|
+
|
|
|
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
|
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
|
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
|
+/*!40101 SET NAMES utf8mb4 */;
|
|
|
+
|
|
|
+--
|
|
|
+-- Datenbank: `tasks`
|
|
|
+--
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `arbeitstage`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `arbeitstage`;
|
|
|
+CREATE TABLE `arbeitstage` (
|
|
|
+ `bundesland` varchar(5) NOT NULL DEFAULT '',
|
|
|
+ `datum` date NOT NULL DEFAULT '0000-00-00',
|
|
|
+ `wochentag` varchar(5) NOT NULL DEFAULT '',
|
|
|
+ `feiertag` varchar(50) NOT NULL DEFAULT '',
|
|
|
+ `mofr` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
+ `mosa` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
+ `moso` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
+ `diso` tinyint(4) NOT NULL DEFAULT '0'
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `benutzer`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `benutzer`;
|
|
|
+CREATE TABLE `benutzer` (
|
|
|
+ `benutzer` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `vorname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `passwort` varchar(255) COLLATE utf8_unicode_ci NOT NULL
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `kunden`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `kunden`;
|
|
|
+CREATE TABLE `kunden` (
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `system` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '?',
|
|
|
+ `start_soll` time NOT NULL,
|
|
|
+ `ende_soll` time NOT NULL,
|
|
|
+ `erster_status` date NOT NULL,
|
|
|
+ `version` date NOT NULL,
|
|
|
+ `beta_version` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
+ `aktiv` tinyint(4) NOT NULL DEFAULT '1',
|
|
|
+ `woche` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Mo-Sa',
|
|
|
+ `bundesland` varchar(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'HE',
|
|
|
+ `plz` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `ort` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `whitelist` mediumtext COLLATE utf8_unicode_ci NOT NULL
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `kunden_aufgabe`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `kunden_aufgabe`;
|
|
|
+CREATE TABLE `kunden_aufgabe` (
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `aufgabe` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `start_soll` time NOT NULL,
|
|
|
+ `ende_soll` time NOT NULL,
|
|
|
+ `erster_status` date NOT NULL,
|
|
|
+ `aktiv` tinyint(4) NOT NULL DEFAULT '1',
|
|
|
+ `woche` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Mo-Sa',
|
|
|
+ `ende_mo` time DEFAULT NULL,
|
|
|
+ `ende_di` time DEFAULT NULL,
|
|
|
+ `ende_mi` time DEFAULT NULL,
|
|
|
+ `ende_do` time DEFAULT NULL,
|
|
|
+ `ende_fr` time DEFAULT NULL,
|
|
|
+ `ende_sa` time DEFAULT NULL,
|
|
|
+ `ende_so` time DEFAULT NULL,
|
|
|
+ `whitelist` mediumtext COLLATE utf8_unicode_ci NOT NULL
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `kunden_config`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `kunden_config`;
|
|
|
+CREATE TABLE `kunden_config` (
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `datum` date NOT NULL,
|
|
|
+ `info` longtext COLLATE utf8_unicode_ci NOT NULL
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `kunden_gcstarter`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `kunden_gcstarter`;
|
|
|
+CREATE TABLE `kunden_gcstarter` (
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `datum` date NOT NULL,
|
|
|
+ `gcstarter` longtext COLLATE utf8_unicode_ci NOT NULL
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Stellvertreter-Struktur des Views `kunden_gcstarter_max_datum`
|
|
|
+-- (Siehe unten für die tatsächliche Ansicht)
|
|
|
+--
|
|
|
+DROP VIEW IF EXISTS `kunden_gcstarter_max_datum`;
|
|
|
+CREATE TABLE `kunden_gcstarter_max_datum` (
|
|
|
+`kunde` varchar(50)
|
|
|
+,`max_datum` date
|
|
|
+);
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `kunden_gcstruct`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `kunden_gcstruct`;
|
|
|
+CREATE TABLE `kunden_gcstruct` (
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `datum` date NOT NULL,
|
|
|
+ `gcstruct` longtext COLLATE utf8_unicode_ci NOT NULL
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `status_kommentar`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `status_kommentar`;
|
|
|
+CREATE TABLE `status_kommentar` (
|
|
|
+ `id` int(11) NOT NULL,
|
|
|
+ `datum` date NOT NULL,
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `start` time NOT NULL,
|
|
|
+ `benutzer` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `fehler` int(11) NOT NULL,
|
|
|
+ `status` int(11) NOT NULL,
|
|
|
+ `kommentar` text COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `mdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
|
+ `cdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `status_kommentar_historie`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `status_kommentar_historie`;
|
|
|
+CREATE TABLE `status_kommentar_historie` (
|
|
|
+ `id` int(11) NOT NULL,
|
|
|
+ `datum` date NOT NULL,
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `start` time NOT NULL,
|
|
|
+ `benutzer` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `fehler` int(11) NOT NULL,
|
|
|
+ `status` int(11) NOT NULL,
|
|
|
+ `kommentar` text COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `mdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
|
+ `cdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `status_meldung`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `status_meldung`;
|
|
|
+CREATE TABLE `status_meldung` (
|
|
|
+ `datum` date NOT NULL,
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `aufgabe` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `start` time NOT NULL,
|
|
|
+ `ende` time NOT NULL,
|
|
|
+ `fehlerbericht_import` longtext COLLATE utf8_unicode_ci,
|
|
|
+ `fehlerbericht` longtext COLLATE utf8_unicode_ci,
|
|
|
+ `anzahl` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
+ `bearbeitet` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
+ `kommentar_id` int(11) NOT NULL DEFAULT '0'
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `status_meldung_historie`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `status_meldung_historie`;
|
|
|
+CREATE TABLE `status_meldung_historie` (
|
|
|
+ `datum` date NOT NULL,
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `aufgabe` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `start` time NOT NULL,
|
|
|
+ `ende` time NOT NULL,
|
|
|
+ `fehlerbericht_import` longtext COLLATE utf8_unicode_ci,
|
|
|
+ `fehlerbericht` longtext COLLATE utf8_unicode_ci,
|
|
|
+ `anzahl` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
+ `bearbeitet` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
+ `kommentar_id` int(11) NOT NULL DEFAULT '0'
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Tabellenstruktur für Tabelle `tickets`
|
|
|
+--
|
|
|
+
|
|
|
+DROP TABLE IF EXISTS `tickets`;
|
|
|
+CREATE TABLE `tickets` (
|
|
|
+ `id` int(11) NOT NULL,
|
|
|
+ `datum` date NOT NULL,
|
|
|
+ `benutzer` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `kunde` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `kontakt` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `beschreibung` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `termin` datetime NOT NULL,
|
|
|
+ `dauer` time NOT NULL,
|
|
|
+ `status` tinyint(4) NOT NULL,
|
|
|
+ `prioritaet` tinyint(4) NOT NULL,
|
|
|
+ `fortschritt` tinyint(4) NOT NULL,
|
|
|
+ `kategorie` tinyint(4) NOT NULL,
|
|
|
+ `programm` tinyint(4) NOT NULL,
|
|
|
+ `kommentar` mediumtext COLLATE utf8_unicode_ci NOT NULL,
|
|
|
+ `mdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
|
+ `cdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
+
|
|
|
+-- --------------------------------------------------------
|
|
|
+
|
|
|
+--
|
|
|
+-- Struktur des Views `kunden_gcstarter_max_datum`
|
|
|
+--
|
|
|
+DROP TABLE IF EXISTS `kunden_gcstarter_max_datum`;
|
|
|
+
|
|
|
+DROP VIEW IF EXISTS `kunden_gcstarter_max_datum`;
|
|
|
+CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `kunden_gcstarter_max_datum` AS SELECT `kunden_gcstarter`.`kunde` AS `kunde`, max(`kunden_gcstarter`.`datum`) AS `max_datum` FROM `kunden_gcstarter` GROUP BY `kunden_gcstarter`.`kunde` ;
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes der exportierten Tabellen
|
|
|
+--
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `arbeitstage`
|
|
|
+--
|
|
|
+ALTER TABLE `arbeitstage`
|
|
|
+ ADD PRIMARY KEY (`bundesland`,`datum`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `benutzer`
|
|
|
+--
|
|
|
+ALTER TABLE `benutzer`
|
|
|
+ ADD PRIMARY KEY (`benutzer`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `kunden`
|
|
|
+--
|
|
|
+ALTER TABLE `kunden`
|
|
|
+ ADD PRIMARY KEY (`kunde`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `kunden_aufgabe`
|
|
|
+--
|
|
|
+ALTER TABLE `kunden_aufgabe`
|
|
|
+ ADD PRIMARY KEY (`kunde`,`aufgabe`) USING BTREE;
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `kunden_config`
|
|
|
+--
|
|
|
+ALTER TABLE `kunden_config`
|
|
|
+ ADD PRIMARY KEY (`kunde`,`datum`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `kunden_gcstarter`
|
|
|
+--
|
|
|
+ALTER TABLE `kunden_gcstarter`
|
|
|
+ ADD PRIMARY KEY (`kunde`,`datum`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `kunden_gcstruct`
|
|
|
+--
|
|
|
+ALTER TABLE `kunden_gcstruct`
|
|
|
+ ADD PRIMARY KEY (`kunde`,`datum`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `status_kommentar`
|
|
|
+--
|
|
|
+ALTER TABLE `status_kommentar`
|
|
|
+ ADD PRIMARY KEY (`id`),
|
|
|
+ ADD KEY `datum-kunde-start` (`datum`,`kunde`,`start`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `status_kommentar_historie`
|
|
|
+--
|
|
|
+ALTER TABLE `status_kommentar_historie`
|
|
|
+ ADD PRIMARY KEY (`id`),
|
|
|
+ ADD KEY `datum-kunde-start` (`datum`,`kunde`,`start`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `status_meldung`
|
|
|
+--
|
|
|
+ALTER TABLE `status_meldung`
|
|
|
+ ADD PRIMARY KEY (`datum`,`kunde`,`aufgabe`,`start`),
|
|
|
+ ADD KEY `kunde` (`kunde`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `status_meldung_historie`
|
|
|
+--
|
|
|
+ALTER TABLE `status_meldung_historie`
|
|
|
+ ADD PRIMARY KEY (`datum`,`kunde`,`aufgabe`,`start`),
|
|
|
+ ADD KEY `kunde` (`kunde`);
|
|
|
+
|
|
|
+--
|
|
|
+-- Indizes für die Tabelle `tickets`
|
|
|
+--
|
|
|
+ALTER TABLE `tickets`
|
|
|
+ ADD PRIMARY KEY (`id`),
|
|
|
+ ADD KEY `datum-kunde-start` (`datum`,`kunde`);
|
|
|
+
|
|
|
+--
|
|
|
+-- AUTO_INCREMENT für exportierte Tabellen
|
|
|
+--
|
|
|
+
|
|
|
+--
|
|
|
+-- AUTO_INCREMENT für Tabelle `status_kommentar`
|
|
|
+--
|
|
|
+ALTER TABLE `status_kommentar`
|
|
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
|
+
|
|
|
+--
|
|
|
+-- AUTO_INCREMENT für Tabelle `status_kommentar_historie`
|
|
|
+--
|
|
|
+ALTER TABLE `status_kommentar_historie`
|
|
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
|
+
|
|
|
+--
|
|
|
+-- AUTO_INCREMENT für Tabelle `tickets`
|
|
|
+--
|
|
|
+ALTER TABLE `tickets`
|
|
|
+ MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
|
+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 */;
|