-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: dd3632
-- Erstellungszeit: 19. Feb 2019 um 20:53
-- Server-Version: 5.7.21-nmm1-log
-- PHP-Version: 5.6.38-nmm2

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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: `d02ca258`
--

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `account`
--

DROP TABLE IF EXISTS `account`;
CREATE TABLE `account` (
                         `id` int(11) UNSIGNED NOT NULL,
                         `email` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
                         `pass` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
                         `is_validated` tinyint(1) DEFAULT NULL,
                         `subscribed_newsletter` tinyint(4) NOT NULL DEFAULT '0',
                         `last_updated_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                         `created_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `action_token`
--

DROP TABLE IF EXISTS `action_token`;
CREATE TABLE `action_token` (
                              `id` int(11) NOT NULL,
                              `token` varchar(255) NOT NULL,
                              `action` varchar(255) NOT NULL,
                              `action_data_sr` text,
                              `last_updated_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                              `created_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `device_reg`
--

DROP TABLE IF EXISTS `device_reg`;
CREATE TABLE `device_reg` (
                            `id` int(11) NOT NULL,
                            `platform` enum('ANDROID','IOS') NOT NULL,
                            `account_id` int(11) NOT NULL,
                            `reg_id` varchar(4096) NOT NULL,
                            `last_update_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `session`
--

DROP TABLE IF EXISTS `session`;
CREATE TABLE `session` (
                         `id` int(10) UNSIGNED NOT NULL,
                         `account_id` int(10) UNSIGNED NOT NULL,
                         `profile_id` int(10) UNSIGNED NOT NULL,
                         `token` varchar(255) NOT NULL,
                         `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indizes der exportierten Tabellen
--

--
-- Indizes für die Tabelle `account`
--
ALTER TABLE `account`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`),
  ADD KEY `email_2` (`email`,`pass`);

--
-- Indizes für die Tabelle `action_token`
--
ALTER TABLE `action_token`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `token` (`token`);

--
-- Indizes für die Tabelle `device_reg`
--
ALTER TABLE `device_reg`
  ADD PRIMARY KEY (`id`),
  ADD KEY `platform` (`platform`,`account_id`),
  ADD KEY `reg_id` (`reg_id`(255));

--
-- Indizes für die Tabelle `session`
--
ALTER TABLE `session`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `token` (`token`,`account_id`),
  ADD KEY `last_call_dt` (`last_update`);

--
-- AUTO_INCREMENT für exportierte Tabellen
--

--
-- AUTO_INCREMENT für Tabelle `account`
--
ALTER TABLE `account`
  MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT für Tabelle `action_token`
--
ALTER TABLE `action_token`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT für Tabelle `device_reg`
--
ALTER TABLE `device_reg`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT für Tabelle `session`
--
ALTER TABLE `session`
  MODIFY `id` int(10) UNSIGNED 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 */;