-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 16, 2020 at 05:38 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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: `montzo_manufacture`
--

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

--
-- Table structure for table `Bom`
--

DROP TABLE IF EXISTS `Bom`;
CREATE TABLE `Bom` (
  `id` int(11) NOT NULL,
  `bomNumber` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `itemId` int(11) NOT NULL,
  `variantId` int(11) NOT NULL,
  `outputQuantity` double NOT NULL COMMENT 'Quantity Of Items obtained after manufacturing',
  `transferMaterialAginst` int(11) NOT NULL COMMENT '2=>Job Card or 1=>Workorder',
  `branchId` int(11) NOT NULL DEFAULT '1',
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=>Draft, 1=>Publish',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `BomMaterials`
--

DROP TABLE IF EXISTS `BomMaterials`;
CREATE TABLE `BomMaterials` (
  `id` int(11) NOT NULL,
  `bomId` int(11) NOT NULL,
  `linkedOperationId` int(11) NOT NULL,
  `itemId` int(11) NOT NULL,
  `variantId` int(11) NOT NULL DEFAULT '0',
  `quantity` double NOT NULL DEFAULT '0',
  `unitTypeId` int(11) NOT NULL DEFAULT '0',
  `rate` double NOT NULL DEFAULT '0',
  `amount` double NOT NULL DEFAULT '0',
  `sourceWarehouseId` int(11) NOT NULL,
  `scrapPercentage` double NOT NULL COMMENT 'E material E Operation chaithal ithra Waste Varam',
  `branchId` int(11) NOT NULL DEFAULT '1',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `BomOperations`
--

DROP TABLE IF EXISTS `BomOperations`;
CREATE TABLE `BomOperations` (
  `id` int(11) NOT NULL,
  `bomId` int(11) NOT NULL,
  `operationId` int(11) NOT NULL,
  `workstationId` int(11) NOT NULL,
  `description` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `operationTime` int(11) NOT NULL COMMENT 'in Minute',
  `operationCost` double NOT NULL DEFAULT '0',
  `batchSize` int(11) NOT NULL,
  `branchId` int(11) NOT NULL DEFAULT '1',
  `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `Branches`
--

DROP TABLE IF EXISTS `Branches`;
CREATE TABLE `Branches` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `Brands`
--

DROP TABLE IF EXISTS `Brands`;
CREATE TABLE `Brands` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `Countries`
--

DROP TABLE IF EXISTS `Countries`;
CREATE TABLE `Countries` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Countries`
--

INSERT INTO `Countries` (`id`, `name`) VALUES
(1, 'India');

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

--
-- Table structure for table `Files`
--

DROP TABLE IF EXISTS `Files`;
CREATE TABLE `Files` (
  `id` int(11) NOT NULL,
  `type` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `width` double NOT NULL,
  `height` double NOT NULL,
  `size` double NOT NULL,
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `FormInputs`
--

DROP TABLE IF EXISTS `FormInputs`;
CREATE TABLE `FormInputs` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Empty For Input Single Or Multiple Separated By Comma For Select Box',
  `sectionId` int(11) NOT NULL,
  `formId` int(11) NOT NULL,
  `isRequired` tinyint(4) NOT NULL,
  `addToFilter` tinyint(4) NOT NULL,
  `position` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `Forms`
--

DROP TABLE IF EXISTS `Forms`;
CREATE TABLE `Forms` (
  `id` int(11) NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parentId` int(11) NOT NULL DEFAULT '0' COMMENT '0 (FORM) Else (SECTION) -> Section Will be Sub Sections in A form'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ItemCategories`
--

DROP TABLE IF EXISTS `ItemCategories`;
CREATE TABLE `ItemCategories` (
  `id` int(11) NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parentId` int(11) NOT NULL,
  `branchId` int(11) NOT NULL DEFAULT '1',
  `formId` int(11) NOT NULL DEFAULT '0',
  `position` int(11) NOT NULL COMMENT 'Order Position	',
  `level` int(11) NOT NULL COMMENT 'Tree Level'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ItemInputValues`
--

DROP TABLE IF EXISTS `ItemInputValues`;
CREATE TABLE `ItemInputValues` (
  `id` int(11) NOT NULL,
  `itemId` bigint(20) NOT NULL,
  `inputId` int(11) NOT NULL,
  `valueId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='This Table Holds the value Which Enter In Product Details Based On product_form_inputs table';

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

--
-- Table structure for table `ItemInputValuesMaster`
--

DROP TABLE IF EXISTS `ItemInputValuesMaster`;
CREATE TABLE `ItemInputValuesMaster` (
  `id` bigint(20) NOT NULL,
  `value` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `Items`
--

DROP TABLE IF EXISTS `Items`;
CREATE TABLE `Items` (
  `id` int(11) NOT NULL,
  `code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Style Code',
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `categoryId` int(11) NOT NULL,
  `brandId` int(11) NOT NULL,
  `hsn` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `isTaxable` tinyint(4) NOT NULL,
  `taxId` int(11) NOT NULL,
  `itemTypeId` int(11) NOT NULL,
  `unitTypeId` int(11) NOT NULL,
  `hasVariant` tinyint(4) NOT NULL DEFAULT '0',
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `branchId` int(11) NOT NULL DEFAULT '1',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ItemTypes`
--

DROP TABLE IF EXISTS `ItemTypes`;
CREATE TABLE `ItemTypes` (
  `id` int(11) NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ItemVariants`
--

DROP TABLE IF EXISTS `ItemVariants`;
CREATE TABLE `ItemVariants` (
  `id` int(11) NOT NULL,
  `itemId` int(11) NOT NULL,
  `colorId` int(11) NOT NULL,
  `sizeId` int(11) NOT NULL,
  `sellingPrice` double NOT NULL,
  `mrp` double NOT NULL,
  `openingStock` double NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `JobCardOperationStatus`
--

DROP TABLE IF EXISTS `JobCardOperationStatus`;
CREATE TABLE `JobCardOperationStatus` (
  `id` int(11) NOT NULL,
  `jobCardId` int(11) NOT NULL,
  `completedQuantity` double NOT NULL DEFAULT '0',
  `startedAt` datetime DEFAULT NULL,
  `endedAt` datetime DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=>Started,1=>Pause,2=>Completed',
  `createdAt` datetime DEFAULT NULL,
  `updatedAt` datetime DEFAULT NULL,
  `deletedAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `JobCards`
--

DROP TABLE IF EXISTS `JobCards`;
CREATE TABLE `JobCards` (
  `id` int(11) NOT NULL,
  `workOrderId` int(11) NOT NULL,
  `number` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `postingAt` datetime NOT NULL,
  `workstationId` int(11) NOT NULL,
  `operationId` int(11) NOT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `employeeId` int(11) NOT NULL,
  `quantityToManufacture` double NOT NULL,
  `wipWarehouse` int(11) NOT NULL,
  `projectId` int(11) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 = Draft 1 = Published 2 = Cancel	3 = JOB Started 4 = PAUSE, 5 = JOB Completed',
  `createdAt` datetime DEFAULT NULL,
  `updatedAt` datetime DEFAULT NULL,
  `deletedAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `MaterialRequest`
--

DROP TABLE IF EXISTS `MaterialRequest`;
CREATE TABLE `MaterialRequest` (
  `id` int(11) NOT NULL,
  `namingSeries` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `materialRequestTypeId` int(11) NOT NULL,
  `requiredDate` date NOT NULL,
  `warehouseId` int(11) NOT NULL,
  `requestedFor` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Just a Text Field',
  `createdAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `MaterialRequestItems`
--

DROP TABLE IF EXISTS `MaterialRequestItems`;
CREATE TABLE `MaterialRequestItems` (
  `id` int(11) NOT NULL,
  `itemId` int(11) NOT NULL,
  `planId` int(11) NOT NULL COMMENT 'If parent is Production Plan',
  `materialRequestId` int(11) NOT NULL COMMENT 'If material request parent',
  `materialRequestTypeId` int(11) NOT NULL,
  `warehouseId` int(11) NOT NULL,
  `requiredQuantity` double NOT NULL COMMENT 'Actual Quantity should be calculated'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='This table has relation with ProductionPlan';

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

--
-- Table structure for table `MaterialRequestTypes`
--

DROP TABLE IF EXISTS `MaterialRequestTypes`;
CREATE TABLE `MaterialRequestTypes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `Operations`
--

DROP TABLE IF EXISTS `Operations`;
CREATE TABLE `Operations` (
  `id` int(11) NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `workstationId` int(11) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ProductImages`
--

DROP TABLE IF EXISTS `ProductImages`;
CREATE TABLE `ProductImages` (
  `id` int(11) NOT NULL,
  `productId` int(11) NOT NULL,
  `variantId` int(11) NOT NULL,
  `fileId` int(11) NOT NULL,
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ProductionPlan`
--

DROP TABLE IF EXISTS `ProductionPlan`;
CREATE TABLE `ProductionPlan` (
  `id` int(11) NOT NULL,
  `namingSeries` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `postingDate` int(11) NOT NULL,
  `branchId` int(11) NOT NULL,
  `getItemFromType` tinyint(4) NOT NULL COMMENT 'Sales Order or Material Request',
  `getItemFromId` int(11) NOT NULL,
  `includeNSI` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Include Non Stock Items',
  `status` tinyint(4) NOT NULL COMMENT 'Material Request Warehouse Id',
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 = Production Plan 2 = Sales Order '
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ProductionPlanItems`
--

DROP TABLE IF EXISTS `ProductionPlanItems`;
CREATE TABLE `ProductionPlanItems` (
  `id` int(11) NOT NULL,
  `planId` int(11) NOT NULL,
  `itemId` int(11) NOT NULL,
  `quantity` double NOT NULL,
  `targetWarehouseId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `ProductTypes`
--

DROP TABLE IF EXISTS `ProductTypes`;
CREATE TABLE `ProductTypes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Eg. Consumable, Raw Material, Sellable';

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

--
-- Table structure for table `Projects`
--

DROP TABLE IF EXISTS `Projects`;
CREATE TABLE `Projects` (
  `id` int(11) NOT NULL,
  `name` text COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `PurchaseDetails`
--

DROP TABLE IF EXISTS `PurchaseDetails`;
CREATE TABLE `PurchaseDetails` (
  `id` bigint(20) NOT NULL,
  `purchaseId` bigint(20) NOT NULL DEFAULT '0',
  `itemId` int(11) NOT NULL DEFAULT '0',
  `variantId` int(11) NOT NULL DEFAULT '0',
  `price` double NOT NULL DEFAULT '0',
  `quantity` double NOT NULL DEFAULT '0',
  `gstRate` double NOT NULL DEFAULT '0',
  `cgstAmount` double NOT NULL DEFAULT '0',
  `sgstAmount` double NOT NULL DEFAULT '0',
  `igstAmount` double NOT NULL DEFAULT '0',
  `totalAmount` double NOT NULL DEFAULT '0',
  `cost` double NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `PurchaseFreight`
--

DROP TABLE IF EXISTS `PurchaseFreight`;
CREATE TABLE `PurchaseFreight` (
  `id` bigint(20) NOT NULL,
  `purchaseId` bigint(20) NOT NULL DEFAULT '0',
  `freightRate` double NOT NULL DEFAULT '0',
  `freightGstRate` double NOT NULL DEFAULT '0',
  `freightCgst` double NOT NULL DEFAULT '0',
  `freightSgst` double NOT NULL DEFAULT '0',
  `freightIgst` double NOT NULL DEFAULT '0',
  `freightNetAmount` double NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `Purchases`
--

DROP TABLE IF EXISTS `Purchases`;
CREATE TABLE `Purchases` (
  `id` bigint(20) NOT NULL,
  `invoiceNumber` varchar(30) DEFAULT NULL,
  `invoiceDate` date DEFAULT NULL,
  `referenceNumber` int(11) NOT NULL DEFAULT '0',
  `receivedDate` date DEFAULT NULL,
  `supplierId` int(11) NOT NULL DEFAULT '0',
  `purchaseType` tinyint(4) NOT NULL DEFAULT '0',
  `otherExpense` double NOT NULL DEFAULT '0',
  `discountAmount` double NOT NULL DEFAULT '0',
  `roundOffAmount` double NOT NULL DEFAULT '0',
  `netAmount` double NOT NULL DEFAULT '0',
  `createdAt` datetime DEFAULT NULL,
  `updatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deletedAt` datetime DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `PurchaseTypes`
--

DROP TABLE IF EXISTS `PurchaseTypes`;
CREATE TABLE `PurchaseTypes` (
  `id` tinyint(4) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `Routing`
--

DROP TABLE IF EXISTS `Routing`;
CREATE TABLE `Routing` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Operations Pa ';

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

--
-- Table structure for table `RoutingOperations`
--

DROP TABLE IF EXISTS `RoutingOperations`;
CREATE TABLE `RoutingOperations` (
  `id` int(11) NOT NULL,
  `routingId` int(11) NOT NULL,
  `operationId` int(11) NOT NULL,
  `position` int(11) NOT NULL,
  `operationTime` double NOT NULL COMMENT 'In Minutes',
  `batchSize` double NOT NULL COMMENT 'the number of units processed in this operation',
  `workstationId` int(11) NOT NULL,
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Operation order eg. Cutting then Stitching then Packing';

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

--
-- Table structure for table `SerialNumbers`
--

DROP TABLE IF EXISTS `SerialNumbers`;
CREATE TABLE `SerialNumbers` (
  `id` int(11) NOT NULL,
  `type` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `number` bigint(20) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `SerialNumbers`
--

INSERT INTO `SerialNumbers` (`id`, `type`, `number`) VALUES
(1, 'BOM', 4),
(2, 'WO', 0),
(3, 'JOB', 2);

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

--
-- Table structure for table `SizesAndColors`
--

DROP TABLE IF EXISTS `SizesAndColors`;
CREATE TABLE `SizesAndColors` (
  `id` int(11) NOT NULL,
  `name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` char(1) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'c = color s = size'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `States`
--

DROP TABLE IF EXISTS `States`;
CREATE TABLE `States` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `countryId` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `States`
--

INSERT INTO `States` (`id`, `name`, `countryId`) VALUES
(1, 'Andhra Pradesh', 1),
(2, 'Arunachal Pradesh', 1),
(3, 'Assam', 1),
(4, 'Bihar', 1),
(5, 'Karnataka', 1),
(6, 'Kerala', 1),
(7, 'Karnataka', 1),
(8, 'Tamil Nadu', 1),
(9, 'Maharashtra', 1),
(10, 'Gujarat', 1);

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

--
-- Table structure for table `Suppliers`
--

DROP TABLE IF EXISTS `Suppliers`;
CREATE TABLE `Suppliers` (
  `id` int(11) NOT NULL,
  `supplierCode` bigint(20) NOT NULL DEFAULT '0',
  `supplierName` varchar(250) DEFAULT NULL,
  `address1` varchar(250) DEFAULT NULL,
  `address2` varchar(250) DEFAULT NULL,
  `pinCode` varchar(10) DEFAULT NULL,
  `phoneNumber` varchar(15) DEFAULT NULL,
  `stateId` tinyint(4) NOT NULL,
  `countryId` tinyint(4) NOT NULL,
  `gstNumber` varchar(20) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `Taxes`
--

DROP TABLE IF EXISTS `Taxes`;
CREATE TABLE `Taxes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `Taxes`
--

INSERT INTO `Taxes` (`id`, `name`, `branchId`) VALUES
(1, 'GST 18', 1),
(2, 'GST 8', 1),
(3, 'GST 12', 1);

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

--
-- Table structure for table `Timeline`
--

DROP TABLE IF EXISTS `Timeline`;
CREATE TABLE `Timeline` (
  `id` int(11) NOT NULL,
  `action` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'eg. DELETE EDIT ADD',
  `table` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `colum` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `userId` int(11) NOT NULL,
  `time` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `UnitTypes`
--

DROP TABLE IF EXISTS `UnitTypes`;
CREATE TABLE `UnitTypes` (
  `id` int(11) NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `Users`
--

DROP TABLE IF EXISTS `Users`;
CREATE TABLE `Users` (
  `id` int(11) NOT NULL,
  `email` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` int(11) NOT NULL COMMENT '1 = ADMIN'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `WarehouseDetails`
--

DROP TABLE IF EXISTS `WarehouseDetails`;
CREATE TABLE `WarehouseDetails` (
  `id` int(11) NOT NULL,
  `phoneNumber` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mobileNumber` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `address` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `cityId` int(11) NOT NULL,
  `stateId` int(11) NOT NULL,
  `countryId` int(11) NOT NULL,
  `pin` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `Warehouses`
--

DROP TABLE IF EXISTS `Warehouses`;
CREATE TABLE `Warehouses` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parentId` int(11) NOT NULL,
  `typeId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `WarehouseTypes`
--

DROP TABLE IF EXISTS `WarehouseTypes`;
CREATE TABLE `WarehouseTypes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `WokstationWorkingHours`
--

DROP TABLE IF EXISTS `WokstationWorkingHours`;
CREATE TABLE `WokstationWorkingHours` (
  `id` int(11) NOT NULL,
  `startTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `endTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `workstationId` int(11) NOT NULL,
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `WorkOrderOperations`
--

DROP TABLE IF EXISTS `WorkOrderOperations`;
CREATE TABLE `WorkOrderOperations` (
  `id` bigint(20) NOT NULL,
  `workOrderId` bigint(20) NOT NULL,
  `operationId` bigint(20) NOT NULL,
  `operationTime` double NOT NULL,
  `operationCost` double NOT NULL,
  `workstationId` bigint(20) NOT NULL,
  `batchSize` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `WorkOrderRequiredItems`
--

DROP TABLE IF EXISTS `WorkOrderRequiredItems`;
CREATE TABLE `WorkOrderRequiredItems` (
  `id` int(11) NOT NULL,
  `itemId` int(11) NOT NULL,
  `variantId` bigint(20) NOT NULL DEFAULT '0',
  `sourceWarehouseId` int(11) NOT NULL,
  `requiredQuantity` double NOT NULL,
  `rate` double NOT NULL DEFAULT '0',
  `amount` double NOT NULL DEFAULT '0',
  `workOrderId` int(11) NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `WorkOrders`
--

DROP TABLE IF EXISTS `WorkOrders`;
CREATE TABLE `WorkOrders` (
  `id` int(11) NOT NULL,
  `productionPlanId` int(11) NOT NULL DEFAULT '0' COMMENT 'Left it 0 if not created from ProductionPlan or Sale Order',
  `number` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branchId` int(11) NOT NULL,
  `itemId` int(11) NOT NULL,
  `variantId` int(11) NOT NULL DEFAULT '0',
  `quantity` double NOT NULL,
  `bomId` bigint(20) NOT NULL,
  `projectId` int(11) NOT NULL DEFAULT '0',
  `allowAlternativeItem` tinyint(4) DEFAULT '0',
  `sourceWarehouseId` int(11) NOT NULL,
  `targetWarehouseId` int(11) NOT NULL,
  `wipWarehouseId` int(11) NOT NULL,
  `scrapWarehouseId` int(11) NOT NULL,
  `plannedStartDate` date DEFAULT NULL,
  `plannedEndDate` date DEFAULT NULL,
  `expectedDeliveryDate` date DEFAULT NULL,
  `transferMaterialAgainst` tinyint(4) NOT NULL DEFAULT '1' COMMENT '2 = JOB CARD or 1 = WORK ORDER',
  `additionalOperationCost` double NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 = Draft 1 = Published'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `WorkstationCosts`
--

DROP TABLE IF EXISTS `WorkstationCosts`;
CREATE TABLE `WorkstationCosts` (
  `id` int(11) NOT NULL,
  `costMasterId` int(11) NOT NULL,
  `workstationId` int(11) NOT NULL,
  `costPerHour` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `WorkstationCostsMaster`
--

DROP TABLE IF EXISTS `WorkstationCostsMaster`;
CREATE TABLE `WorkstationCostsMaster` (
  `id` int(11) NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `validation` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `Workstations`
--

DROP TABLE IF EXISTS `Workstations`;
CREATE TABLE `Workstations` (
  `id` int(11) NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `productionCapacity` double NOT NULL DEFAULT '1' COMMENT 'Production Capacity is the total number of jobs can be executed at the same time in the respective workstation',
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `Bom`
--
ALTER TABLE `Bom`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `BomMaterials`
--
ALTER TABLE `BomMaterials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `BomOperations`
--
ALTER TABLE `BomOperations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Branches`
--
ALTER TABLE `Branches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Brands`
--
ALTER TABLE `Brands`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Countries`
--
ALTER TABLE `Countries`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Files`
--
ALTER TABLE `Files`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `FormInputs`
--
ALTER TABLE `FormInputs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Forms`
--
ALTER TABLE `Forms`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ItemCategories`
--
ALTER TABLE `ItemCategories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ItemInputValues`
--
ALTER TABLE `ItemInputValues`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ItemInputValuesMaster`
--
ALTER TABLE `ItemInputValuesMaster`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Items`
--
ALTER TABLE `Items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`);

--
-- Indexes for table `ItemTypes`
--
ALTER TABLE `ItemTypes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ItemVariants`
--
ALTER TABLE `ItemVariants`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `JobCardOperationStatus`
--
ALTER TABLE `JobCardOperationStatus`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `JobCards`
--
ALTER TABLE `JobCards`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `MaterialRequest`
--
ALTER TABLE `MaterialRequest`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `MaterialRequestItems`
--
ALTER TABLE `MaterialRequestItems`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `MaterialRequestTypes`
--
ALTER TABLE `MaterialRequestTypes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Operations`
--
ALTER TABLE `Operations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ProductImages`
--
ALTER TABLE `ProductImages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ProductionPlan`
--
ALTER TABLE `ProductionPlan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ProductionPlanItems`
--
ALTER TABLE `ProductionPlanItems`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ProductTypes`
--
ALTER TABLE `ProductTypes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Projects`
--
ALTER TABLE `Projects`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `PurchaseDetails`
--
ALTER TABLE `PurchaseDetails`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `PurchaseFreight`
--
ALTER TABLE `PurchaseFreight`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Purchases`
--
ALTER TABLE `Purchases`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `PurchaseTypes`
--
ALTER TABLE `PurchaseTypes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Routing`
--
ALTER TABLE `Routing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `RoutingOperations`
--
ALTER TABLE `RoutingOperations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `SerialNumbers`
--
ALTER TABLE `SerialNumbers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `SizesAndColors`
--
ALTER TABLE `SizesAndColors`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `States`
--
ALTER TABLE `States`
  ADD PRIMARY KEY (`id`),
  ADD KEY `countryId` (`countryId`);

--
-- Indexes for table `Suppliers`
--
ALTER TABLE `Suppliers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Taxes`
--
ALTER TABLE `Taxes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Timeline`
--
ALTER TABLE `Timeline`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `UnitTypes`
--
ALTER TABLE `UnitTypes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Users`
--
ALTER TABLE `Users`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `WarehouseDetails`
--
ALTER TABLE `WarehouseDetails`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Warehouses`
--
ALTER TABLE `Warehouses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `WarehouseTypes`
--
ALTER TABLE `WarehouseTypes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `WokstationWorkingHours`
--
ALTER TABLE `WokstationWorkingHours`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `WorkOrderOperations`
--
ALTER TABLE `WorkOrderOperations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `WorkOrderRequiredItems`
--
ALTER TABLE `WorkOrderRequiredItems`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `WorkOrders`
--
ALTER TABLE `WorkOrders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `WorkstationCosts`
--
ALTER TABLE `WorkstationCosts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `WorkstationCostsMaster`
--
ALTER TABLE `WorkstationCostsMaster`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Workstations`
--
ALTER TABLE `Workstations`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `Bom`
--
ALTER TABLE `Bom`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `BomMaterials`
--
ALTER TABLE `BomMaterials`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `BomOperations`
--
ALTER TABLE `BomOperations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Branches`
--
ALTER TABLE `Branches`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Brands`
--
ALTER TABLE `Brands`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Countries`
--
ALTER TABLE `Countries`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `Files`
--
ALTER TABLE `Files`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `FormInputs`
--
ALTER TABLE `FormInputs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Forms`
--
ALTER TABLE `Forms`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ItemCategories`
--
ALTER TABLE `ItemCategories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ItemInputValues`
--
ALTER TABLE `ItemInputValues`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ItemInputValuesMaster`
--
ALTER TABLE `ItemInputValuesMaster`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Items`
--
ALTER TABLE `Items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ItemTypes`
--
ALTER TABLE `ItemTypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ItemVariants`
--
ALTER TABLE `ItemVariants`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `JobCardOperationStatus`
--
ALTER TABLE `JobCardOperationStatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `JobCards`
--
ALTER TABLE `JobCards`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `MaterialRequest`
--
ALTER TABLE `MaterialRequest`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `MaterialRequestItems`
--
ALTER TABLE `MaterialRequestItems`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `MaterialRequestTypes`
--
ALTER TABLE `MaterialRequestTypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Operations`
--
ALTER TABLE `Operations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ProductImages`
--
ALTER TABLE `ProductImages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ProductionPlan`
--
ALTER TABLE `ProductionPlan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ProductionPlanItems`
--
ALTER TABLE `ProductionPlanItems`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ProductTypes`
--
ALTER TABLE `ProductTypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Projects`
--
ALTER TABLE `Projects`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `PurchaseDetails`
--
ALTER TABLE `PurchaseDetails`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `PurchaseFreight`
--
ALTER TABLE `PurchaseFreight`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Purchases`
--
ALTER TABLE `Purchases`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `PurchaseTypes`
--
ALTER TABLE `PurchaseTypes`
  MODIFY `id` tinyint(4) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Routing`
--
ALTER TABLE `Routing`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `RoutingOperations`
--
ALTER TABLE `RoutingOperations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `SerialNumbers`
--
ALTER TABLE `SerialNumbers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `SizesAndColors`
--
ALTER TABLE `SizesAndColors`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `States`
--
ALTER TABLE `States`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `Suppliers`
--
ALTER TABLE `Suppliers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Taxes`
--
ALTER TABLE `Taxes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `Timeline`
--
ALTER TABLE `Timeline`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `UnitTypes`
--
ALTER TABLE `UnitTypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Users`
--
ALTER TABLE `Users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `WarehouseDetails`
--
ALTER TABLE `WarehouseDetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Warehouses`
--
ALTER TABLE `Warehouses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `WarehouseTypes`
--
ALTER TABLE `WarehouseTypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `WokstationWorkingHours`
--
ALTER TABLE `WokstationWorkingHours`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `WorkOrderOperations`
--
ALTER TABLE `WorkOrderOperations`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `WorkOrderRequiredItems`
--
ALTER TABLE `WorkOrderRequiredItems`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `WorkOrders`
--
ALTER TABLE `WorkOrders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `WorkstationCosts`
--
ALTER TABLE `WorkstationCosts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `WorkstationCostsMaster`
--
ALTER TABLE `WorkstationCostsMaster`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Workstations`
--
ALTER TABLE `Workstations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
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 */;
