# --------------------------------------------------------
# Host:                         127.0.0.1
# Server version:               5.5.23
# Server OS:                    Win32
# HeidiSQL version:             6.0.0.3603
# Date/time:                    2014-04-23 14:20:35
# --------------------------------------------------------


# Dumping database structure for dada_rebuild_2
CREATE DATABASE IF NOT EXISTS `dada_rebuild_2` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `dada_rebuild_2`;


# Dumping structure for table dada_rebuild_2.category
CREATE TABLE IF NOT EXISTS `category` (
  `id` tinyint(4) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.category: ~3 rows (approximately)
INSERT INTO `category` (`id`, `name`) VALUES
	(1, 'Dada Premium'),
	(2, 'Dada Premium Extra Soft'),
	(3, 'test1243567 łść');


# Dumping structure for table dada_rebuild_2.content
CREATE TABLE IF NOT EXISTS `content` (
  `name` varchar(50) DEFAULT NULL,
  `value` text,
  `page_id` smallint(6) NOT NULL,
  PRIMARY KEY (`page_id`),
  CONSTRAINT `fk_content_page1` FOREIGN KEY (`page_id`) REFERENCES `page` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.content: ~1 rows (approximately)
INSERT INTO `content` (`name`, `value`, `page_id`) VALUES
	(NULL, NULL, 2);


# Dumping structure for table dada_rebuild_2.homepage
CREATE TABLE IF NOT EXISTS `homepage` (
  `id` tinyint(4) NOT NULL AUTO_INCREMENT,
  `big_box_image_desktop` varchar(255) DEFAULT NULL,
  `big_box_image_tablet` varchar(255) DEFAULT NULL,
  `big_box_image_mobile` varchar(255) DEFAULT NULL,
  `video_id` varchar(255) DEFAULT NULL COMMENT 'link do video - youtube',
  `small_box_ico` varchar(255) DEFAULT NULL COMMENT 'icona - maly box',
  `small_box_desc` varchar(255) DEFAULT NULL COMMENT 'opis - maly box',
  `small_box_link` varchar(255) DEFAULT NULL COMMENT 'link w malym boxie ',
  `small_box_alt` varchar(45) DEFAULT NULL COMMENT 'tresc na odnosniku',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.homepage: ~1 rows (approximately)
INSERT INTO `homepage` (`id`, `big_box_image_desktop`, `big_box_image_tablet`, `big_box_image_mobile`, `video_id`, `small_box_ico`, `small_box_title`, `small_box_subtitle`, `small_box_link`, `small_box_alt`) VALUES
	(1, 'homepage-bigpromo_17d1a8f59fb61120c299fe8822c746e2.png', 'homepage-bigpromo-tablet_9b768ed550bb3df8c3c6d23ad7e33f3e.png', 'homepage-bigpromo-smartphone_9b768ed550bb3df8c3c6d23ad7e33f3e.png', 'Iowsn6DKcjQ', 'calendar_icon_5950c9755f7b7f9c9104339e05e792e8.png', 'Stwórz kalendarz', 'ze zdjęciem Twojego dziecka', '/stworz-kalendarz-dada', 'Zaprojektuj kalendarz');


# Dumping structure for table dada_rebuild_2.navigation
CREATE TABLE IF NOT EXISTS `navigation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order` int(11) DEFAULT NULL,
  `url` varchar(255) NOT NULL DEFAULT '',
  `text` varchar(50) DEFAULT NULL,
  `is_novelty` int(11) DEFAULT '0',
  `is_active` int(11) DEFAULT '0',
  PRIMARY KEY (`id`,`url`),
  UNIQUE KEY `url_UNIQUE` (`url`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.navigation: ~6 rows (approximately)
INSERT INTO `navigation` (`id`, `order`, `url`, `text`, `is_novelty`, `is_active`) VALUES
	(1, 2, '/budowa-pieluszek-dada', 'Budowa pieluszek Dada', 0, 1),
	(2, 1, '/premium-extra-soft', 'Premium Extra Soft', 1, 1),
	(3, 3, '/produkty-dada', 'Produkty Dada', 0, 1),
	(4, 4, '/stworz-kalendarz-dada', 'Stwórz kalendarz Dada', 0, 1),
	(5, 5, 'http://biedronka.pl/sklepy', 'Znajdź sklep', 0, 1),
	(6, 6, 'http://www.google.pl', 'Google', 0, 0);


# Dumping structure for table dada_rebuild_2.novelty
CREATE TABLE IF NOT EXISTS `novelty` (
  `id` smallint(6) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  `layout_type` smallint(6) DEFAULT NULL,
  `mixed_content` text,
  `is_active` smallint(6) DEFAULT '0',
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.novelty: ~2 rows (approximately)
INSERT INTO `novelty` (`id`, `name`, `layout_type`, `mixed_content`, `is_active`, `date`) VALUES
	(1, 'TEST123', 0, '{"text1":"test","text2":"test","textbig":"<p>test<\\/p>\\r\\n","image1":"penguins_cf923956f237c697ac542ef564544842.jpg"}', 1, NULL),
	(3, 'TEST', 0, '{"text1":"test","text2":"test","textbig":"<p>test1234<\\/p>\\r\\n","image1":"penguins_18fa2bded5850bc6a90d3cfb738020b6.jpg"}', 1, NULL);


# Dumping structure for table dada_rebuild_2.option
CREATE TABLE IF NOT EXISTS `option` (
  `id` tinyint(4) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `ico` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.option: ~9 rows (approximately)
INSERT INTO `option` (`id`, `name`, `ico`) VALUES
	(1, 'Łatwe zakładanie', 'easy-on'),
	(2, 'Łatwe zdejmowanie', 'easy-out'),
	(3, 'Elastyczne boki', 'flex'),
	(4, 'Ekstrakt z aloesu', 'aloes'),
	(5, 'Przewiewne', 'air'),
	(6, 'Superchłonne', 'Superabsorbent'),
	(7, 'Na dzień i na noc', 'day-night'),
	(8, 'Inteligentne taśmy', 'smart-string'),
	(9, 'Super miekkie', 'extra-soft');


# Dumping structure for table dada_rebuild_2.page
CREATE TABLE IF NOT EXISTS `page` (
  `id` smallint(6) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `url` varchar(50) DEFAULT NULL,
  `is_active` tinyint(4) DEFAULT NULL COMMENT 'flaga oznaczajaca czy dany element ma byc widoczny w menu',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name_UNIQUE` (`name`),
  UNIQUE KEY `url_UNIQUE` (`url`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.page: ~2 rows (approximately)
INSERT INTO `page` (`id`, `name`, `url`, `is_active`) VALUES
	(1, 'homepage', '/', 1),
	(2, 'globals', '', NULL);


# Dumping structure for table dada_rebuild_2.product_option
CREATE TABLE IF NOT EXISTS `product_option` (
  `product_id` tinyint(4) NOT NULL,
  `option_id` tinyint(4) NOT NULL,
  PRIMARY KEY (`product_id`,`option_id`),
  KEY `fk_product_has_product_option_product_option1_idx` (`option_id`),
  KEY `fk_product_has_product_option_product1_idx` (`product_id`),
  CONSTRAINT `fk_product_has_product_option_product1` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_product_has_product_option_product_option1` FOREIGN KEY (`option_id`) REFERENCES `option` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.product_option: ~33 rows (approximately)
INSERT INTO `product_option` (`product_id`, `option_id`) VALUES
	(7, 1),
	(8, 1),
	(9, 1),
	(10, 1),
	(7, 2),
	(8, 2),
	(9, 2),
	(10, 2),
	(7, 3),
	(8, 3),
	(9, 3),
	(10, 3),
	(3, 4),
	(4, 4),
	(5, 4),
	(9, 4),
	(1, 5),
	(2, 5),
	(3, 5),
	(4, 5),
	(5, 5),
	(1, 6),
	(2, 6),
	(3, 6),
	(4, 6),
	(5, 6),
	(2, 7),
	(3, 7),
	(4, 7),
	(5, 7),
	(1, 8),
	(2, 8),
	(1, 9);


# Dumping structure for table dada_rebuild_2.router_static
CREATE TABLE IF NOT EXISTS `router_static` (
  `url` varchar(50) NOT NULL,
  `module` varchar(50) DEFAULT NULL,
  `controller` varchar(50) DEFAULT NULL,
  `action` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`url`),
  UNIQUE KEY `url_UNIQUE` (`url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.router_static: ~4 rows (approximately)
INSERT INTO `router_static` (`url`, `module`, `controller`, `action`) VALUES
	('budowa-pieluszek-dada', 'front', 'product', 'construction'),
	('premium-extra-soft', 'front', 'product', 'premium-extra-soft'),
	('produkty-dada', 'front', 'product', 'review'),
	('stworz-kalendarz-dada', 'front', 'calendar', 'index');


# Dumping structure for table dada_rebuild_2.session
CREATE TABLE IF NOT EXISTS `session` (
  `id` char(32) NOT NULL,
  `modified` int(11) DEFAULT NULL,
  `lifetime` int(11) DEFAULT NULL,
  `data` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dumping data for table dada_rebuild_2.session: ~3 rows (approximately)

