-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 23, 2026 at 02:02 PM
-- Wersja serwera: 10.4.32-MariaDB
-- Wersja PHP: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `atelier_live`
--

-- --------------------------------------------------------

--
-- Struktura tabeli dla tabeli `supplier_catalog_product_allergen`
--

CREATE TABLE `supplier_catalog_product_allergen` (
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `allergen_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indeksy dla zrzutów tabel
--

--
-- Indeksy dla tabeli `supplier_catalog_product_allergen`
--
ALTER TABLE `supplier_catalog_product_allergen`
  ADD PRIMARY KEY (`product_id`,`allergen_id`),
  ADD KEY `idx_allergen` (`allergen_id`);

--
-- Constraints for dumped tables
--

--
-- Constraints for table `supplier_catalog_product_allergen`
--
ALTER TABLE `supplier_catalog_product_allergen`
  ADD CONSTRAINT `fk_scpa_allergen` FOREIGN KEY (`allergen_id`) REFERENCES `allergen` (`id`),
  ADD CONSTRAINT `fk_scpa_product` FOREIGN KEY (`product_id`) REFERENCES `supplier_catalog_product` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

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