 --
 
 INSERT INTO `user` (`id`, `username`, `password`, `email`, `name`, `role`) VALUES
-(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin@gmail.com', 'administrator', 'A');
+(1, 'admin123', '0192023a7bbd73250516f069df18b500', 'admin@gmail.com', 'administrator', 'A');
 
 --
 -- Indexes for dumped tables
 --
 
 --
+-- Indexes for table `gallery`
+--
+ALTER TABLE `gallery`
+  ADD PRIMARY KEY (`id`);
+
+--
+-- Indexes for table `gallery_images`
+--
+ALTER TABLE `gallery_images`
+  ADD PRIMARY KEY (`id`),
+  ADD KEY `gallery_id` (`gallery_id`);
+
+--
 -- Indexes for table `merchant`
 --
 ALTER TABLE `merchant`
   ADD PRIMARY KEY (`id`);
+
+--
+-- Indexes for table `merchant_promo`
+--
+ALTER TABLE `merchant_promo`
+  ADD PRIMARY KEY (`id`),
+  ADD KEY `id_product` (`merchant_id`);
+
+--
+-- Indexes for table `merchant_socmed`
+--
+ALTER TABLE `merchant_socmed`
+  ADD PRIMARY KEY (`id`),
+  ADD KEY `socmend_id` (`socmed_id`),
+  ADD KEY `socmed_id` (`socmed_id`),
+  ADD KEY `merchant` (`merchant_id`);
 
 --
 -- Indexes for table `product`
 --
 ALTER TABLE `product`
   ADD PRIMARY KEY (`id`),
-  ADD KEY `category_product_id` (`product_category`);
+  ADD KEY `category_product_id` (`product_category_id`),
+  ADD KEY `merchant_id` (`merchant_id`),
+  ADD KEY `merchant_id_2` (`merchant_id`);
 
 --
 -- Indexes for table `product_category`

  ADD KEY `id_product_idx` (`id_product`);

--
-- Indexes for table `product_promo`
--
ALTER TABLE `product_promo`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_product` (`id_product`);

--
-- Indexes for table `setting`
--
ALTER TABLE `setting`
  ADD PRIMARY KEY (`id`);

--

--

--
-- Constraints for table `gallery_images`
--
ALTER TABLE `gallery_images`
  ADD CONSTRAINT `gallery_images_ibfk_1` FOREIGN KEY (`gallery_id`) REFERENCES `gallery` (`id`);

--
-- Constraints for table `merchant_promo`
--
ALTER TABLE `merchant_promo`
  ADD CONSTRAINT `merchant_promo_ibfk_1` FOREIGN KEY (`merchant_id`) REFERENCES `merchant` (`id`);

--
-- Constraints for table `merchant_socmed`
--
ALTER TABLE `merchant_socmed`
  ADD CONSTRAINT `merchant_socmed_ibfk_1` FOREIGN KEY (`merchant_id`) REFERENCES `merchant` (`id`),
  ADD CONSTRAINT `merchant_socmed_ibfk_2` FOREIGN KEY (`socmed_id`) REFERENCES `socmed` (`id`);

--
-- Constraints for table `product`
--
ALTER TABLE `product`
  ADD CONSTRAINT `category_product` FOREIGN KEY (`product_category_id`) REFERENCES `product_category` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `merchant_id` FOREIGN KEY (`merchant_id`) REFERENCES `merchant` (`id`);

--
-- Constraints for table `product_images`
--
ALTER TABLE `product_images`
  ADD CONSTRAINT `id_product` FOREIGN KEY (`id_product`) REFERENCES `product` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
