/*!999999\- enable the sandbox mode */ 
-- MariaDB dump 10.19  Distrib 10.6.18-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: open_erp
-- ------------------------------------------------------
-- Server version	10.6.18-MariaDB-0ubuntu0.22.04.1

/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `product_catalogs`
--

DROP TABLE IF EXISTS `product_catalogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product_catalogs` (
  `id` char(36) NOT NULL,
  `name` varchar(255) NOT NULL,
  `catalog_description` varchar(255) DEFAULT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `BY_NAME` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `product_catalogs`
--

LOCK TABLES `product_catalogs` WRITE;
/*!40000 ALTER TABLE `product_catalogs` DISABLE KEYS */;
INSERT INTO `product_catalogs` VALUES ('115153f3-2f59-4234-8ff8-e1b205761428','Automotive','',1),('f56f3412-ed23-490b-be6e-016208c415d2','Software','',1);
/*!40000 ALTER TABLE `product_catalogs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `product_categories`
--

DROP TABLE IF EXISTS `product_categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product_categories` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `product_catalog_id` char(36) NOT NULL,
  `internal_id` char(36) NOT NULL,
  `name` varchar(255) NOT NULL,
  `category_description` text DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `lft` int(11) NOT NULL,
  `rght` int(11) NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `BY_NAME_AND_CATALOG_ID` (`product_catalog_id`,`name`),
  KEY `parent_id` (`parent_id`),
  KEY `lft` (`lft`),
  KEY `product_catalog_id` (`product_catalog_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `product_categories`
--

LOCK TABLES `product_categories` WRITE;
/*!40000 ALTER TABLE `product_categories` DISABLE KEYS */;
INSERT INTO `product_categories` VALUES (1,'115153f3-2f59-4234-8ff8-e1b205761428','db4b4273-eddc-46d4-93c8-45cf7c6e058e','Engine','',NULL,1,4,1),(2,'115153f3-2f59-4234-8ff8-e1b205761428','3c2377c5-b97c-4bc9-9660-8f77b4893d8b','Engine Internals','',1,2,3,1),(3,'115153f3-2f59-4234-8ff8-e1b205761428','fbee6709-396f-4bb4-b60b-e125b0bc4e83','Electrical','',NULL,5,8,1),(4,'115153f3-2f59-4234-8ff8-e1b205761428','6d223283-361b-4f9f-a7f1-c97aa0ca4c23','Wiring','',3,6,7,1),(5,'115153f3-2f59-4234-8ff8-e1b205761428','c447b6f4-0fb1-4d59-ba45-5613829a725a','Suspension','',NULL,9,12,1),(6,'115153f3-2f59-4234-8ff8-e1b205761428','1e749d3b-aee0-48a5-8d6c-8cf2b83e9b6e','Coilovers','',5,10,11,1),(7,'f56f3412-ed23-490b-be6e-016208c415d2','8c89a3ca-d56f-46bf-a738-7e85b3342b2a','Support','',NULL,1,2,1);
/*!40000 ALTER TABLE `product_categories` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `product_category_attributes`
--

DROP TABLE IF EXISTS `product_category_attributes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product_category_attributes` (
  `id` char(36) NOT NULL,
  `name` varchar(255) NOT NULL,
  `product_category_id` char(36) DEFAULT NULL,
  `attribute_type_id` int(11) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `BY_NAME_AND_PRODUCT_CATEGORY_ID_UNIQUE` (`name`,`product_category_id`),
  KEY `BY_PRODUCT_CATEGORY_ID` (`product_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `product_category_attributes`
--

LOCK TABLES `product_category_attributes` WRITE;
/*!40000 ALTER TABLE `product_category_attributes` DISABLE KEYS */;
INSERT INTO `product_category_attributes` VALUES ('bffebec4-2533-45b9-8f4e-e9169f5143d4','AWG','4',1,1);
/*!40000 ALTER TABLE `product_category_attributes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `product_category_attribute_options`
--

DROP TABLE IF EXISTS `product_category_attribute_options`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product_category_attribute_options` (
  `id` char(36) NOT NULL,
  `product_category_attribute_id` char(36) NOT NULL,
  `attribute_value` varchar(255) NOT NULL,
  `attribute_label` varchar(255) NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`),
  KEY `BY_PRODUCT_CATEGORY_ATTRIBUTE_ID` (`product_category_attribute_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `product_category_attribute_options`
--

LOCK TABLES `product_category_attribute_options` WRITE;
/*!40000 ALTER TABLE `product_category_attribute_options` DISABLE KEYS */;
INSERT INTO `product_category_attribute_options` VALUES ('0a19dbc8-b09b-4843-8955-3c1a9c94de27','bffebec4-2533-45b9-8f4e-e9169f5143d4','8','8',1),('1d7705d0-e4a8-4b88-ad86-b021493a6191','bffebec4-2533-45b9-8f4e-e9169f5143d4','10','10',1),('49d79d68-62ac-4dae-8757-4b4e31f00f26','bffebec4-2533-45b9-8f4e-e9169f5143d4','12','12',1),('6fb40b3d-ec9f-4ad0-b21a-26de0769e10c','bffebec4-2533-45b9-8f4e-e9169f5143d4','14','14',1),('871df26a-8d91-425c-8f94-ac450323674f','bffebec4-2533-45b9-8f4e-e9169f5143d4','4','4',1),('87a465f3-5c4c-4c1b-9dd2-d5c08831386d','bffebec4-2533-45b9-8f4e-e9169f5143d4','16','16',1),('9efa9fce-cdcd-43ae-a6cc-c8fb4076690e','bffebec4-2533-45b9-8f4e-e9169f5143d4','6','6',1),('bebc8041-4502-4a3e-a452-ee41a1c6890e','bffebec4-2533-45b9-8f4e-e9169f5143d4','20','20',1),('dd21c817-670b-4118-9dcb-e9e88ffc8c86','bffebec4-2533-45b9-8f4e-e9169f5143d4','18','18',1);
/*!40000 ALTER TABLE `product_category_attribute_options` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `products`
--

DROP TABLE IF EXISTS `products`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `products` (
  `id` char(36) NOT NULL,
  `name` varchar(255) NOT NULL,
  `product_category_id` char(36) NOT NULL,
  `product_type_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `BY_NAME_AND_CATEGORY_ID` (`product_category_id`,`name`),
  KEY `product_category_id` (`product_category_id`),
  KEY `product_type_id` (`product_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `products`
--

LOCK TABLES `products` WRITE;
/*!40000 ALTER TABLE `products` DISABLE KEYS */;
/*!40000 ALTER TABLE `products` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `external_product_catalogs`
--

DROP TABLE IF EXISTS `external_product_catalogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `external_product_catalogs` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `product_catalog_id` char(36) NOT NULL,
  `base_url` varchar(255) NOT NULL,
  `api_url` varchar(255) NOT NULL,
  `created` datetime NOT NULL,
  `deleted` datetime DEFAULT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `BY_PRODUCT_CATALOG_ID` (`product_catalog_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `external_product_catalogs`
--

LOCK TABLES `external_product_catalogs` WRITE;
/*!40000 ALTER TABLE `external_product_catalogs` DISABLE KEYS */;
/*!40000 ALTER TABLE `external_product_catalogs` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2024-11-25  2:21:42
