Segelparade / test_dbdump.sql
test_dbdump.sql
Raw
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: echtz_2_db
-- Erstellungszeit: 02. Mai 2024 um 07:19
-- Server-Version: 10.3.39-MariaDB-1:10.3.39+maria~ubu2004
-- PHP-Version: 8.2.18

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: `test`
--

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

--
-- Tabellenstruktur für Tabelle `backend_user`
--

CREATE TABLE `backend_user` (
  `id` int(11) NOT NULL,
  `email` varchar(180) NOT NULL,
  `roles` longtext NOT NULL COMMENT '(DC2Type:json)',
  `password` varchar(255) NOT NULL,
  `password_salt` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `backend_user`
--

INSERT INTO `backend_user` (`id`, `email`, `roles`, `password`, `password_salt`) VALUES
(1, 'admin@email.com', '[]', '$2y$13$qzqj8guWYdyGfgIg6hxEee9Wk8EJ8Y.Tt.n1slxTquXRGscos8a6W', NULL);

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

--
-- Tabellenstruktur für Tabelle `conversation`
--

CREATE TABLE `conversation` (
  `id` int(11) NOT NULL,
  `fk_image_id` int(11) NOT NULL,
  `message` varchar(255) NOT NULL,
  `send` date NOT NULL,
  `type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Tabellenstruktur für Tabelle `doctrine_migration_versions`
--

CREATE TABLE `doctrine_migration_versions` (
  `version` varchar(191) NOT NULL,
  `executed_at` datetime DEFAULT NULL,
  `execution_time` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Daten für Tabelle `doctrine_migration_versions`
--

INSERT INTO `doctrine_migration_versions` (`version`, `executed_at`, `execution_time`) VALUES
('DoctrineMigrations\\Version20240330163335', '2024-04-09 10:17:15', 52),
('DoctrineMigrations\\Version20240417205528', '2024-04-24 11:47:31', 269),
('DoctrineMigrations\\Version20240417205827', '2024-05-02 06:14:24', 50),
('DoctrineMigrations\\Version20240430132551', '2024-05-02 06:14:24', 8);

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

--
-- Tabellenstruktur für Tabelle `image`
--

CREATE TABLE `image` (
  `id` int(11) NOT NULL,
  `fk_user_id` int(11) NOT NULL,
  `image_file` varchar(255) NOT NULL,
  `uploaded` date NOT NULL,
  `accepted` date DEFAULT NULL,
  `deleted` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `image`
--

INSERT INTO `image` (`id`, `fk_user_id`, `image_file`, `uploaded`, `accepted`, `deleted`) VALUES
(2, 2, 'Bild_2.png', '2024-04-24', '2024-04-24', NULL),
(3, 3, 'Bild_3.jpg', '2024-04-24', '2024-04-24', NULL),
(4, 3, 'Bild_4.jpg', '2024-04-24', NULL, NULL),
(5, 3, 'Bild_5.png', '2024-04-24', NULL, NULL),
(6, 4, 'Bild_6.jpg', '2024-05-02', NULL, NULL),
(7, 4, 'Bild_7.jpg', '2024-05-02', NULL, NULL);

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

--
-- Tabellenstruktur für Tabelle `image_processing`
--

CREATE TABLE `image_processing` (
  `image_id` int(11) NOT NULL,
  `processing_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `image_processing`
--

INSERT INTO `image_processing` (`image_id`, `processing_id`) VALUES
(2, 2),
(3, 2),
(4, 1),
(5, 1),
(6, 1),
(7, 1);

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

--
-- Tabellenstruktur für Tabelle `image_tag`
--

CREATE TABLE `image_tag` (
  `image_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `image_tag`
--

INSERT INTO `image_tag` (`image_id`, `tag_id`) VALUES
(2, 1),
(2, 2),
(2, 3),
(3, 3),
(3, 4),
(3, 5),
(4, 3),
(4, 5),
(4, 6),
(5, 4),
(5, 5),
(5, 7),
(6, 3),
(6, 4),
(7, 3),
(7, 4);

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

--
-- Tabellenstruktur für Tabelle `pasword_salt`
--

CREATE TABLE `pasword_salt` (
  `id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Tabellenstruktur für Tabelle `processing`
--

CREATE TABLE `processing` (
  `id` int(11) NOT NULL,
  `type` varchar(255) NOT NULL,
  `quality` varchar(255) NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `processing`
--

INSERT INTO `processing` (`id`, `type`, `quality`, `date`) VALUES
(1, 'new', '1', '2024-04-18'),
(2, 'read', '1', '2024-04-23');

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

--
-- Tabellenstruktur für Tabelle `tag`
--

CREATE TABLE `tag` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `tag`
--

INSERT INTO `tag` (`id`, `name`, `type`) VALUES
(1, 'submarine', 'content'),
(2, 'underWater', 'place'),
(3, 'left', 'direction'),
(4, 'sailingboat', 'content'),
(5, 'aboveWater', 'place'),
(6, 'hotairballoon', 'content'),
(7, 'right', 'direction');

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

--
-- Tabellenstruktur für Tabelle `user`
--

CREATE TABLE `user` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `email` varchar(255) NOT NULL,
  `teacher` int(11) DEFAULT NULL,
  `otp` varchar(255) DEFAULT NULL,
  `age` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Daten für Tabelle `user`
--

INSERT INTO `user` (`id`, `name`, `email`, `teacher`, `otp`, `age`) VALUES
(1, 'Admin', 'admin@mail.com', NULL, NULL, 0),
(2, NULL, 'admin@email.com', NULL, NULL, 0),
(3, NULL, 'test@mail.com', NULL, NULL, 0),
(4, 'Max', 'test@test.de', NULL, NULL, 99);

--
-- Indizes der exportierten Tabellen
--

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

--
-- Indizes für die Tabelle `conversation`
--
ALTER TABLE `conversation`
  ADD PRIMARY KEY (`id`),
  ADD KEY `IDX_8A8E26E9F8D66B3` (`fk_image_id`);

--
-- Indizes für die Tabelle `doctrine_migration_versions`
--
ALTER TABLE `doctrine_migration_versions`
  ADD PRIMARY KEY (`version`);

--
-- Indizes für die Tabelle `image`
--
ALTER TABLE `image`
  ADD PRIMARY KEY (`id`),
  ADD KEY `IDX_C53D045F5741EEB9` (`fk_user_id`);

--
-- Indizes für die Tabelle `image_processing`
--
ALTER TABLE `image_processing`
  ADD PRIMARY KEY (`image_id`,`processing_id`),
  ADD KEY `IDX_E4B2BC1D3DA5256D` (`image_id`),
  ADD KEY `IDX_E4B2BC1D5BAE24E8` (`processing_id`);

--
-- Indizes für die Tabelle `image_tag`
--
ALTER TABLE `image_tag`
  ADD PRIMARY KEY (`image_id`,`tag_id`),
  ADD KEY `IDX_5B6367D03DA5256D` (`image_id`),
  ADD KEY `IDX_5B6367D0BAD26311` (`tag_id`);

--
-- Indizes für die Tabelle `pasword_salt`
--
ALTER TABLE `pasword_salt`
  ADD PRIMARY KEY (`id`);

--
-- Indizes für die Tabelle `processing`
--
ALTER TABLE `processing`
  ADD PRIMARY KEY (`id`);

--
-- Indizes für die Tabelle `tag`
--
ALTER TABLE `tag`
  ADD PRIMARY KEY (`id`);

--
-- Indizes für die Tabelle `user`
--
ALTER TABLE `user`
  ADD PRIMARY KEY (`id`);

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

--
-- AUTO_INCREMENT für Tabelle `backend_user`
--
ALTER TABLE `backend_user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

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

--
-- AUTO_INCREMENT für Tabelle `image`
--
ALTER TABLE `image`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

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

--
-- AUTO_INCREMENT für Tabelle `processing`
--
ALTER TABLE `processing`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT für Tabelle `tag`
--
ALTER TABLE `tag`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT für Tabelle `user`
--
ALTER TABLE `user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Constraints der exportierten Tabellen
--

--
-- Constraints der Tabelle `conversation`
--
ALTER TABLE `conversation`
  ADD CONSTRAINT `FK_8A8E26E9F8D66B3` FOREIGN KEY (`fk_image_id`) REFERENCES `image` (`id`);

--
-- Constraints der Tabelle `image`
--
ALTER TABLE `image`
  ADD CONSTRAINT `FK_C53D045F5741EEB9` FOREIGN KEY (`fk_user_id`) REFERENCES `user` (`id`);

--
-- Constraints der Tabelle `image_processing`
--
ALTER TABLE `image_processing`
  ADD CONSTRAINT `FK_E4B2BC1D3DA5256D` FOREIGN KEY (`image_id`) REFERENCES `image` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_E4B2BC1D5BAE24E8` FOREIGN KEY (`processing_id`) REFERENCES `processing` (`id`) ON DELETE CASCADE;

--
-- Constraints der Tabelle `image_tag`
--
ALTER TABLE `image_tag`
  ADD CONSTRAINT `FK_5B6367D03DA5256D` FOREIGN KEY (`image_id`) REFERENCES `image` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_5B6367D0BAD26311` FOREIGN KEY (`tag_id`) REFERENCES `tag` (`id`) ON DELETE CASCADE;
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 */;