 -- https://www.phpmyadmin.net/
 --
 -- Host: localhost:3306
--- Generation Time: 09 Sep 2017 pada 21.31
+-- Generation Time: 12 Sep 2017 pada 18.50
 -- Versi Server: 5.6.36
 -- PHP Version: 5.6.31
 

  ADD KEY `index_brand_id` (`brand_id`);

--
-- AUTO_INCREMENT for dumped tables
--


ALTER TABLE `products`
  ADD CONSTRAINT `lnk_brands_products` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`brand_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `lnk_categories_products` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Ketidakleluasaan untuk tabel `product_photos`
--
ALTER TABLE `product_photos`
  ADD CONSTRAINT `product_photos_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

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