create database if not exists d1;

use d1;

DROP TABLE IF EXISTS `t1`;
CREATE TABLE `t1` (
  `t1c1` int(10) unsigned NOT NULL, 
  `t1c2` mediumint(8) unsigned DEFAULT NULL, 
  `t1c3` int(10) unsigned NOT NULL, 
  `t1c4` int(10) unsigned NOT NULL DEFAULT 0, 
  `t1c5` varchar(100) DEFAULT NULL,
  `t1c6` varchar(32) DEFAULT 'regular',
  `t1c7` smallint(6) NOT NULL DEFAULT 0, 
  `t1c8` tinyint(4) NOT NULL DEFAULT 0, 
  `t1c9` date DEFAULT NULL,
  `t1c10` timestamp NOT NULL DEFAULT current_timestamp(), 
  `t1c11` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `t1c12` timestamp NULL DEFAULT NULL, 
  PRIMARY KEY (`t1c1`),
  KEY `t1c3` (`t1c3`),
  KEY `t1c2` (`t1c2`),
  KEY `t1c6` (`t1c6`),
  KEY `t1c5` (`t1c5`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT INTO `t1` VALUES (1,NULL,11,0,'20251106-TEST CLOSED','regular',1,0,NULL,'2025-11-06 12:24:27','2025-11-06 12:24:27','2025-11-06 12:24:27'),(2,NULL,11,0,'20251106-TEST OPEN','regular',0,0,NULL,'2025-11-06 12:24:27','2025-11-06 12:24:27',NULL),(3,NULL,11,0,'20251106-TEST PARTIAL','regular',2,0,NULL,'2025-11-06 12:24:27','2025-11-06 12:24:27',NULL),(4,NULL,11,0,'20251106-TEST FULL PROBLEMS','regular',2,0,NULL,'2025-11-06 12:24:27','2025-11-06 12:24:27',NULL),(5,NULL,11,0,'20251106-TEST FULL','regular',2,0,NULL,'2025-11-06 12:24:27','2025-11-06 12:24:27',NULL),(6,NULL,11,0,'20251106-TEST FULL OPEN RC','regular',2,0,NULL,'2025-11-06 12:24:27','2025-11-06 12:24:27',NULL),(7,NULL,11,0,'20251106-TEST FULL OPEN RC','regular',2,0,NULL,'2025-11-06 12:24:27','2025-11-06 12:24:27',NULL);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;

DROP TABLE IF EXISTS `t2`;
CREATE TABLE `t2` (
  `t2c1` int(10) unsigned NOT NULL AUTO_INCREMENT, 
  `t2c2` int(10) unsigned DEFAULT NULL, 
  `t2c3` timestamp NOT NULL DEFAULT current_timestamp(), 
  `t2c4` timestamp NULL DEFAULT NULL, 
  `t2c5` int(11) unsigned DEFAULT NULL, 
  `t2c6` timestamp NULL DEFAULT NULL, 
  `t2c7` int(10) unsigned DEFAULT NULL, 
  `t2c8` smallint(6) NOT NULL DEFAULT 2 , 
  `t2c9` varchar(255) DEFAULT NULL , 
  `t2c10` smallint(6) DEFAULT NULL , 
  `t2c11` smallint(5) unsigned DEFAULT NULL , 
  PRIMARY KEY (`t2c1`),
  KEY `t2c2_key` (`t2c2`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table `t2`
LOCK TABLES `t2` WRITE;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
INSERT INTO `t2` VALUES (1,1,'2025-11-06 12:24:27',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(2,3,'2025-11-06 12:24:27',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(3,4,'2025-11-06 12:24:27',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(4,5,'2025-11-06 12:24:27',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(5,6,'2025-11-06 12:24:27',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL),(6,6,'2025-11-06 12:24:27',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL),(7,7,'2025-11-06 12:24:27',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL);
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
UNLOCK TABLES;

DROP TABLE IF EXISTS `t3`;
CREATE TABLE `t3` (
  `t3c1` int(10) unsigned NOT NULL AUTO_INCREMENT, 
  `t3c2` int(10) unsigned NOT NULL, 
  `t3c3` mediumint(7) unsigned NOT NULL, 
  `t3c4` smallint(5) unsigned NOT NULL,
  `t3c5` smallint(5) unsigned DEFAULT NULL, 
  PRIMARY KEY (`t3c1`),
  UNIQUE KEY `t3c2_t3c3_unique` (`t3c2`,`t3c3`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


LOCK TABLES `t3` WRITE;
/*!40000 ALTER TABLE `t3` DISABLE KEYS */;
INSERT INTO `t3` VALUES (1,1,12345,1,1),(2,1,23456,3,3),(3,2,12345,10,10),(4,3,12345,5,5),(5,3,23456,9,9),(6,4,12345,8,8),(7,4,23456,2,2),(8,5,12345,8,8),(9,5,23456,9,9),(10,6,12345,10,10),(11,6,23456,5,5),(12,7,12345,10,10),(13,7,23456,10,10);
/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
UNLOCK TABLES;

DROP TABLE IF EXISTS `t4`;
CREATE TABLE `t4` (
  `t4c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT, 
  `t4c2` int(10) unsigned NOT NULL, 
  `t4c3` mediumint(7) unsigned DEFAULT NULL, 
  `t4c4` varchar(100) DEFAULT NULL, 
  `t4c5` smallint(5) unsigned NOT NULL DEFAULT 0, 
  `t4c6` smallint(5) unsigned NOT NULL DEFAULT 0, 
  `t4c7` smallint(5) unsigned NOT NULL DEFAULT 0, 
  `t4c8` smallint(5) unsigned NOT NULL DEFAULT 0, 
  `t4c9` smallint(5) unsigned NOT NULL DEFAULT 0, 
  `t4c10` timestamp NULL DEFAULT NULL, 
  PRIMARY KEY (`t4c1`),
  UNIQUE KEY `t4c2_t4c3_unique` (`t4c2`,`t4c3`),
  KEY `t4c3_t4c9_key` (`t4c3`,`t4c9`),
  KEY `t4c2_key` (`t4c2`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


LOCK TABLES `t4` WRITE;
/*!40000 ALTER TABLE `t4` DISABLE KEYS */;
INSERT INTO `t4` VALUES (1,1,12345,'Test Product 12345',1,1,0,0,0,'2025-11-06 10:24:27'),(2,1,23456,'Test Product 23456',3,3,0,0,0,'2025-11-06 10:24:27'),(3,2,12345,'Test Product 12345',5,4,0,0,0,'2025-11-06 10:24:27'),(4,2,23456,'Test Product 23456',9,10,0,0,0,'2025-11-06 10:24:27'),(5,3,12345,'Test Product 12345',8,8,1,0,0,'2025-11-06 10:24:27'),(6,3,23456,'Test Product 23456',2,2,0,0,0,'2025-11-06 10:24:27'),(7,4,12345,'Test Product 12345',8,8,0,0,0,'2025-11-06 10:24:27'),(8,4,23456,'Test Product 23456',9,9,0,0,0,'2025-11-06 10:24:27'),(9,5,12345,'Test Product 12345',10,9,0,0,0,'2025-11-06 10:24:27'),(10,5,23456,'Test Product 23456',5,4,0,0,0,'2025-11-06 10:24:27'),(11,6,12345,'Test Product 12345',10,1,0,0,0,'2025-11-06 10:24:27'),(12,6,23456,'Test Product 23456',5,1,0,0,0,'2025-11-06 10:24:27'),(13,7,12345,'Test Product 12345',10,10,0,0,0,'2025-11-06 12:24:27'),(14,7,23456,'Test Product 23456',10,10,0,0,0,'2025-11-06 12:24:27');
/*!40000 ALTER TABLE `t4` ENABLE KEYS */;
UNLOCK TABLES;


                    
                    
