-- MariaDB dump 10.19 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 3.94.250.169 Database: ABC_Johnson
-- ------------------------------------------------------
-- Server version 10.6.16-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 utf8 */;
/*!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 `finished_goods`
--
DROP TABLE IF EXISTS `finished_goods`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `finished_goods` (
`finished_goods_id` int(11) NOT NULL,
`product_name` varchar(20) DEFAULT NULL,
`product_price` decimal(5,0) DEFAULT NULL,
`product_ship_date` date DEFAULT NULL,
PRIMARY KEY (`finished_goods_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `finished_goods`
--
LOCK TABLES `finished_goods` WRITE;
/*!40000 ALTER TABLE `finished_goods` DISABLE KEYS */;
INSERT INTO `finished_goods` VALUES
(2230,'spike',50,'2024-05-15'),
(2234,'run',40,'2024-05-15');
/*!40000 ALTER TABLE `finished_goods` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order_inventory`
--
DROP TABLE IF EXISTS `order_inventory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `order_inventory` (
`raw_material_id` int(11) DEFAULT NULL,
`quantity` int(11) DEFAULT NULL,
`entry_type` enum('ordered','received','used','initial_inventory') DEFAULT NULL,
KEY `raw_material_id` (`raw_material_id`),
CONSTRAINT `order_inventory_ibfk_1` FOREIGN KEY (`raw_material_id`) REFERENCES `raw_material` (`raw_material_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order_inventory`
--
LOCK TABLES `order_inventory` WRITE;
/*!40000 ALTER TABLE `order_inventory` DISABLE KEYS */;
INSERT INTO `order_inventory` VALUES
(2151,20,'initial_inventory');
/*!40000 ALTER TABLE `order_inventory` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `raw_material`
--
DROP TABLE IF EXISTS `raw_material`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `raw_material` (
`raw_material_id` int(11) NOT NULL,
`order_at` int(11) DEFAULT NULL,
`reorder_quantity` int(11) DEFAULT NULL,
`color` varchar(255) DEFAULT NULL,
`size` int(3) DEFAULT NULL,
`previous_raw_material_id` int(11) DEFAULT NULL,
PRIMARY KEY (`raw_material_id`),
KEY `previous_raw_material_id` (`previous_raw_material_id`),
CONSTRAINT `raw_material_ibfk_1` FOREIGN KEY (`previous_raw_material_id`) REFERENCES `raw_material` (`raw_material_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `raw_material`
--
LOCK TABLES `raw_material` WRITE;
/*!40000 ALTER TABLE `raw_material` DISABLE KEYS */;
INSERT INTO `raw_material` VALUES
(2151,10,20,'blue',7,NULL),
(2223,12,15,'red',9,NULL),
(2225,10,12,'green',6,NULL),
(2227,12,20,'yellow',10,2223);
/*!40000 ALTER TABLE `raw_material` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `raw_material_finished_goods`
--
DROP TABLE IF EXISTS `raw_material_finished_goods`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `raw_material_finished_goods` (
`raw_material_id` int(11) DEFAULT NULL,
`finished_goods_id` int(11) DEFAULT NULL,
KEY `raw_material_id` (`raw_material_id`),
KEY `finished_goods_id` (`finished_goods_id`),
CONSTRAINT `raw_material_finished_goods_ibfk_1` FOREIGN KEY (`raw_material_id`) REFERENCES `raw_material` (`raw_material_id`),
CONSTRAINT `raw_material_finished_goods_ibfk_2` FOREIGN KEY (`finished_goods_id`) REFERENCES `finished_goods` (`finished_goods_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `raw_material_finished_goods`
--
LOCK TABLES `raw_material_finished_goods` WRITE;
/*!40000 ALTER TABLE `raw_material_finished_goods` DISABLE KEYS */;
INSERT INTO `raw_material_finished_goods` VALUES
(2151,2230),
(2151,2234);
/*!40000 ALTER TABLE `raw_material_finished_goods` 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-05-28 2:59:21