-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server Version: 5.1.53-community - MySQL Community Server (GPL) -- Server Betriebssystem: Win64 -- HeidiSQL Version: 8.0.0.4396 -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -- Exportiere Datenbank Struktur fuer shoppinghelper DROP DATABASE IF EXISTS `shoppinghelper`; CREATE DATABASE IF NOT EXISTS `shoppinghelper` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `shoppinghelper`; -- Exportiere Struktur von Tabelle shoppinghelper.category DROP TABLE IF EXISTS `category`; CREATE TABLE IF NOT EXISTS `category` ( `id` bigint(20) NOT NULL, `description` varchar(3000) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(30) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.category: ~1 rows (ungefaehr) DELETE FROM `category`; /*!40000 ALTER TABLE `category` DISABLE KEYS */; INSERT INTO `category` (`id`, `description`, `name`) VALUES (1, 'Breakfast-related like bread, butter, coffee, tea, etc', 'Breakfast'); /*!40000 ALTER TABLE `category` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.country DROP TABLE IF EXISTS `country`; CREATE TABLE IF NOT EXISTS `country` ( `id` bigint(20) NOT NULL, `iso3` varchar(3) COLLATE utf8_unicode_ci NOT NULL, `iso_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `numcode` varchar(3) COLLATE utf8_unicode_ci NOT NULL, `printable_name` varchar(80) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.country: ~2 rows (ungefaehr) DELETE FROM `country`; /*!40000 ALTER TABLE `country` DISABLE KEYS */; INSERT INTO `country` (`id`, `iso3`, `iso_code`, `name`, `numcode`, `printable_name`) VALUES (1, 'USA', 'US', 'United States Of America', '840', 'United States Of America'), (2, 'DEU', 'DE', 'Germany', '276', 'Germany'); /*!40000 ALTER TABLE `country` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.item DROP TABLE IF EXISTS `item`; CREATE TABLE IF NOT EXISTS `item` ( `id` bigint(20) NOT NULL, `brand` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `description` varchar(3000) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(30) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.item: ~1 rows (ungefaehr) DELETE FROM `item`; /*!40000 ALTER TABLE `item` DISABLE KEYS */; INSERT INTO `item` (`id`, `brand`, `description`, `name`) VALUES (1, 'Dunkin Donuts', 'Fresh Donuts', 'Donuts'); /*!40000 ALTER TABLE `item` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.price_at_retailer DROP TABLE IF EXISTS `price_at_retailer`; CREATE TABLE IF NOT EXISTS `price_at_retailer` ( `id` bigint(20) NOT NULL, `pricePerPackage` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.price_at_retailer: ~1 rows (ungefaehr) DELETE FROM `price_at_retailer`; /*!40000 ALTER TABLE `price_at_retailer` DISABLE KEYS */; INSERT INTO `price_at_retailer` (`id`, `pricePerPackage`) VALUES (1, '4 EUR per 6-Pack Donuts'), (2, '10 EUR per 16-Pack Donuts'); /*!40000 ALTER TABLE `price_at_retailer` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.selected_item DROP TABLE IF EXISTS `selected_item`; CREATE TABLE IF NOT EXISTS `selected_item` ( `id` bigint(20) NOT NULL, `title` varchar(256) COLLATE utf8_unicode_ci NOT NULL, `category_id` bigint(20) NOT NULL, `item_id` bigint(20) DEFAULT NULL, `shoppingList_id` bigint(20) NOT NULL, `priceAtRetailer_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FKgcr5ln1fannmuq5a6ccfm2v56` (`category_id`), KEY `FKhtf26nu501eakisyoe062h9jd` (`item_id`), KEY `FK4rk8wm95i3kjqg8h6twnmcqjj` (`shoppingList_id`), KEY `FK1fk5mm17iekmqi1h2tnnscqjk` (`priceAtRetailer_id`), CONSTRAINT `FK1fk5mm17iekmqi1h2tnnscqjk` FOREIGN KEY (`priceAtRetailer_id`) REFERENCES `price_at_retailer` (`id`), CONSTRAINT `FK4rk8wm95i3kjqg8h6twnmcqjj` FOREIGN KEY (`shoppingList_id`) REFERENCES `shopping_list` (`id`), CONSTRAINT `FKgcr5ln1fannmuq5a6ccfm2v56` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`), CONSTRAINT `FKhtf26nu501eakisyoe062h9jd` FOREIGN KEY (`item_id`) REFERENCES `item` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.selected_item: ~1 rows (ungefaehr) DELETE FROM `selected_item`; /*!40000 ALTER TABLE `selected_item` DISABLE KEYS */; INSERT INTO `selected_item` (`id`, `title`, `category_id`, `item_id`, `shoppingList_id`, `priceAtRetailer_id`) VALUES (1, 'Sweet Donuts', 1, 1, 1, 1); /*!40000 ALTER TABLE `selected_item` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.sequence_category DROP TABLE IF EXISTS `sequence_category`; CREATE TABLE IF NOT EXISTS `sequence_category` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.sequence_category: ~1 rows (ungefaehr) DELETE FROM `sequence_category`; /*!40000 ALTER TABLE `sequence_category` DISABLE KEYS */; INSERT INTO `sequence_category` (`next_val`) VALUES (2); /*!40000 ALTER TABLE `sequence_category` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.sequence_country DROP TABLE IF EXISTS `sequence_country`; CREATE TABLE IF NOT EXISTS `sequence_country` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.sequence_country: ~1 rows (ungefaehr) DELETE FROM `sequence_country`; /*!40000 ALTER TABLE `sequence_country` DISABLE KEYS */; INSERT INTO `sequence_country` (`next_val`) VALUES (1); /*!40000 ALTER TABLE `sequence_country` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.sequence_item DROP TABLE IF EXISTS `sequence_item`; CREATE TABLE IF NOT EXISTS `sequence_item` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.sequence_item: ~1 rows (ungefaehr) DELETE FROM `sequence_item`; /*!40000 ALTER TABLE `sequence_item` DISABLE KEYS */; INSERT INTO `sequence_item` (`next_val`) VALUES (2); /*!40000 ALTER TABLE `sequence_item` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.sequence_price_at_retailer DROP TABLE IF EXISTS `sequence_price_at_retailer`; CREATE TABLE IF NOT EXISTS `sequence_price_at_retailer` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.sequence_price_at_retailer: ~1 rows (ungefaehr) DELETE FROM `sequence_price_at_retailer`; /*!40000 ALTER TABLE `sequence_price_at_retailer` DISABLE KEYS */; INSERT INTO `sequence_price_at_retailer` (`next_val`) VALUES (3); /*!40000 ALTER TABLE `sequence_price_at_retailer` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.sequence_selected_item DROP TABLE IF EXISTS `sequence_selected_item`; CREATE TABLE IF NOT EXISTS `sequence_selected_item` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.sequence_selected_item: ~1 rows (ungefaehr) DELETE FROM `sequence_selected_item`; /*!40000 ALTER TABLE `sequence_selected_item` DISABLE KEYS */; INSERT INTO `sequence_selected_item` (`next_val`) VALUES (2); /*!40000 ALTER TABLE `sequence_selected_item` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.sequence_shopping_list DROP TABLE IF EXISTS `sequence_shopping_list`; CREATE TABLE IF NOT EXISTS `sequence_shopping_list` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.sequence_shopping_list: ~1 rows (ungefaehr) DELETE FROM `sequence_shopping_list`; /*!40000 ALTER TABLE `sequence_shopping_list` DISABLE KEYS */; INSERT INTO `sequence_shopping_list` (`next_val`) VALUES (2); /*!40000 ALTER TABLE `sequence_shopping_list` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.sequence_user DROP TABLE IF EXISTS `sequence_user`; CREATE TABLE IF NOT EXISTS `sequence_user` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.sequence_user: ~1 rows (ungefaehr) DELETE FROM `sequence_user`; /*!40000 ALTER TABLE `sequence_user` DISABLE KEYS */; INSERT INTO `sequence_user` (`next_val`) VALUES (1); /*!40000 ALTER TABLE `sequence_user` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.shopping_list DROP TABLE IF EXISTS `shopping_list`; CREATE TABLE IF NOT EXISTS `shopping_list` ( `id` bigint(20) NOT NULL, `title` varchar(256) COLLATE utf8_unicode_ci NOT NULL, `user_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `FKt18fbu046w9svmlc3potf15po` (`user_id`), CONSTRAINT `FKt18fbu046w9svmlc3potf15po` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.shopping_list: ~1 rows (ungefaehr) DELETE FROM `shopping_list`; /*!40000 ALTER TABLE `shopping_list` DISABLE KEYS */; INSERT INTO `shopping_list` (`id`, `title`, `user_id`) VALUES (1, 'Shopping List 1', 1); /*!40000 ALTER TABLE `shopping_list` ENABLE KEYS */; -- Exportiere Struktur von Tabelle shoppinghelper.user DROP TABLE IF EXISTS `user`; CREATE TABLE IF NOT EXISTS `user` ( `id` bigint(20) NOT NULL, `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `street1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `street2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `date_of_birth` date NOT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `firstName` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `lastName` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `login` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `middleName` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `password` varchar(256) COLLATE utf8_unicode_ci NOT NULL, `phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `country_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FKk1jeoaj2fixpghqk5olopn1lq` (`country_id`), CONSTRAINT `FKk1jeoaj2fixpghqk5olopn1lq` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Exportiere Daten aus Tabelle shoppinghelper.user: ~1 rows (ungefaehr) DELETE FROM `user`; /*!40000 ALTER TABLE `user` DISABLE KEYS */; INSERT INTO `user` (`id`, `city`, `state`, `street1`, `street2`, `zip_code`, `date_of_birth`, `email`, `firstName`, `lastName`, `login`, `middleName`, `password`, `phone`, `country_id`) VALUES (1, 'Phoenix', 'Arizona', '98th, Maple Ave', '', '63544', '1979-04-01', 'bananajoe@bananajoe.com', 'Joe', 'Banana', 'bananajoe', '', 'bananarama', '02211123456789', 1); /*!40000 ALTER TABLE `user` ENABLE KEYS */; /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;