--
-- Table structure for table `outfits_flat`
--
DROP TABLE IF EXISTS `outfits_flat`;
CREATE TABLE `outfits_flat` (
  `outfit_id` int(11) UNSIGNED NOT NULL,
  `timestamp` timestamp NULL DEFAULT NULL,
  `created_by_user` int(11) UNSIGNED DEFAULT NULL,
  `template_id` int(11) DEFAULT NULL,
  `designer_approved` boolean DEFAULT 0,
  `occasion` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `style` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `age` varchar(16) CHARACTER SET utf8 DEFAULT NULL,
  `season` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `price` float DEFAULT NULL,
  `product_1` int(11) UNSIGNED NULL DEFAULT NULL,
  `product_2` int(11) UNSIGNED NULL DEFAULT NULL,
  `product_3` int(11) UNSIGNED NULL DEFAULT NULL,
  `product_4` int(11) UNSIGNED NULL DEFAULT NULL,
  `product_5` int(11) UNSIGNED NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `outfits_flat`
--
ALTER TABLE `outfits_flat`
  ADD PRIMARY KEY (`outfit_id`);

--
-- Constraints for dumped tables
--

--
-- Constraints for table `users_flat`
--
ALTER TABLE `outfits_flat`
  ADD CONSTRAINT `outfits_flat_ibfk_1` FOREIGN KEY (`outfit_id`) REFERENCES `outfits` (`outfit_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Table structure for table `outfits_change_log`
--

DROP TABLE IF EXISTS `outfits_change_log`;
CREATE TABLE `outfits_change_log` (
  `outfit_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `users_change_log`
--
ALTER TABLE `outfits_change_log`
  ADD PRIMARY KEY (`outfit_id`);
