2019-12-06 15:45:25 +00:00
|
|
|
-- phpMyAdmin SQL Dump
|
2020-04-17 13:12:22 +00:00
|
|
|
-- version 4.6.6deb4
|
2019-12-06 15:45:25 +00:00
|
|
|
-- https://www.phpmyadmin.net/
|
|
|
|
--
|
2020-04-17 13:12:22 +00:00
|
|
|
-- Host: localhost:3306
|
|
|
|
-- Erstellungszeit: 17. Apr 2020 um 09:07
|
|
|
|
-- Server-Version: 10.1.44-MariaDB-0+deb9u1
|
|
|
|
-- PHP-Version: 7.3.13-1+0~20191218.50+debian9~1.gbp23c2da
|
2019-12-06 15:45:25 +00:00
|
|
|
|
|
|
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
|
|
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 */;
|
|
|
|
|
|
|
|
--
|
2020-04-17 13:12:22 +00:00
|
|
|
-- Datenbank: `ingproject`
|
2019-12-06 15:45:25 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Tabellenstruktur für Tabelle `cities`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `cities` (
|
|
|
|
`id` int(11) NOT NULL,
|
|
|
|
`userid` int(11) NOT NULL,
|
|
|
|
`name` varchar(256) NOT NULL,
|
|
|
|
`wastetype` varchar(64) NOT NULL,
|
|
|
|
`zone` int(11) NOT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
2020-04-17 13:12:22 +00:00
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
2019-12-06 15:45:25 +00:00
|
|
|
--
|
2020-04-17 13:12:22 +00:00
|
|
|
-- Tabellenstruktur für Tabelle `devices`
|
2019-12-06 15:45:25 +00:00
|
|
|
--
|
|
|
|
|
2020-04-17 13:12:22 +00:00
|
|
|
CREATE TABLE `devices` (
|
|
|
|
`DeviceID` int(11) NOT NULL,
|
|
|
|
`CityID` int(11) NOT NULL DEFAULT '-1',
|
|
|
|
`DeviceName` varchar(15) DEFAULT NULL,
|
|
|
|
`DeviceLocation` varchar(15) DEFAULT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Tabellenstruktur für Tabelle `device_city`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `device_city` (
|
|
|
|
`DeviceID` int(11) NOT NULL,
|
|
|
|
`CityID` int(11) NOT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
2019-12-06 15:45:25 +00:00
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Tabellenstruktur für Tabelle `pickupdates`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `pickupdates` (
|
|
|
|
`id` int(11) NOT NULL,
|
|
|
|
`citywastezoneid` int(11) NOT NULL,
|
|
|
|
`pickupdate` date NOT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Tabellenstruktur für Tabelle `user`
|
|
|
|
--
|
|
|
|
|
|
|
|
CREATE TABLE `user` (
|
|
|
|
`id` int(11) NOT NULL,
|
|
|
|
`username` varchar(150) NOT NULL,
|
|
|
|
`firstName` varchar(32) NOT NULL,
|
|
|
|
`secondName` varchar(32) NOT NULL,
|
|
|
|
`password` varchar(32) NOT NULL,
|
2020-04-17 13:12:22 +00:00
|
|
|
`permission` int(11) NOT NULL DEFAULT '0',
|
2019-12-06 15:45:25 +00:00
|
|
|
`email` varchar(64) NOT NULL,
|
2020-04-17 13:12:22 +00:00
|
|
|
`logindate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
2019-12-06 15:45:25 +00:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Indizes der exportierten Tabellen
|
|
|
|
--
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Indizes für die Tabelle `cities`
|
|
|
|
--
|
|
|
|
ALTER TABLE `cities`
|
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
2020-04-17 13:12:22 +00:00
|
|
|
--
|
|
|
|
-- Indizes für die Tabelle `devices`
|
|
|
|
--
|
|
|
|
ALTER TABLE `devices`
|
|
|
|
ADD PRIMARY KEY (`DeviceID`);
|
|
|
|
|
2019-12-06 15:45:25 +00:00
|
|
|
--
|
|
|
|
-- Indizes für die Tabelle `pickupdates`
|
|
|
|
--
|
|
|
|
ALTER TABLE `pickupdates`
|
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
|
ADD KEY `citywastezoneid` (`citywastezoneid`);
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Indizes für die Tabelle `user`
|
|
|
|
--
|
|
|
|
ALTER TABLE `user`
|
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
|
|
--
|
|
|
|
-- AUTO_INCREMENT für exportierte Tabellen
|
|
|
|
--
|
|
|
|
|
|
|
|
--
|
|
|
|
-- AUTO_INCREMENT für Tabelle `cities`
|
|
|
|
--
|
|
|
|
ALTER TABLE `cities`
|
2020-04-17 13:12:22 +00:00
|
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=143;
|
2019-12-06 15:45:25 +00:00
|
|
|
--
|
|
|
|
-- AUTO_INCREMENT für Tabelle `pickupdates`
|
|
|
|
--
|
|
|
|
ALTER TABLE `pickupdates`
|
2020-04-17 13:12:22 +00:00
|
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=67;
|
2019-12-06 15:45:25 +00:00
|
|
|
--
|
|
|
|
-- AUTO_INCREMENT für Tabelle `user`
|
|
|
|
--
|
|
|
|
ALTER TABLE `user`
|
2020-04-17 13:12:22 +00:00
|
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
|
2019-12-06 15:45:25 +00:00
|
|
|
--
|
|
|
|
-- Constraints der exportierten Tabellen
|
|
|
|
--
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Constraints der Tabelle `pickupdates`
|
|
|
|
--
|
|
|
|
ALTER TABLE `pickupdates`
|
|
|
|
ADD CONSTRAINT `pickupdates_ibfk_1` FOREIGN KEY (`citywastezoneid`) REFERENCES `cities` (`id`);
|
|
|
|
|
|
|
|
/*!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 */;
|