--
-- Table structure for table `products_flat`
--
DROP TABLE IF EXISTS `products_flat`;
CREATE TABLE `products_flat` (
  `product_id` int(11) UNSIGNED NOT NULL,
  `category` varchar(255) CHARACTER SET utf8 NULL,
  `subcategory` varchar(255) CHARACTER SET utf8 NULL,
  `brand` varchar(255) CHARACTER SET utf8 NULL,
  `title` varchar(255) CHARACTER SET utf8 NOT NULL,
  `title_embedding` float NULL,
  `description` text CHARACTER SET utf8 NULL,
  `description_embedding` float NULL,
  `images` text NULL,
  `occasion` varchar(255) CHARACTER SET utf8 NULL,
  `style` varchar(255) CHARACTER SET utf8 NULL,
  `season` varchar(255) CHARACTER SET utf8 NULL,
  `gender` varchar(255) CHARACTER SET utf8 NULL,
  `age` varchar(255) CHARACTER SET utf8 NULL,
  `price` float NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `fashion_season` varchar(255) NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `products_flat`
--
ALTER TABLE `products_flat`
  ADD PRIMARY KEY (`product_id`);

--
-- Constraints for dumped tables
--

--
-- Constraints for table `products_flat`
--
ALTER TABLE `products_flat`
  ADD CONSTRAINT `products_flat_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Table structure for table `products_change_log`
--

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

--
-- Indexes for dumped tables
--

--
-- Indexes for table `products_change_log`
--
ALTER TABLE `products_change_log`
  ADD PRIMARY KEY (`product_id`);
