--liquibase formatted sql

--changeset derek:2nd re create inv lot line
DROP TABLE `inventory_lot_line`;
CREATE TABLE `inventory_lot_line`
(
    `id` INT NOT NULL AUTO_INCREMENT,
    `created` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `createdBy` VARCHAR(30) NULL DEFAULT NULL,
    `version` INT NOT NULL DEFAULT '0',
    `modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `modifiedBy` VARCHAR(30) NULL DEFAULT NULL,
    `deleted` TINYINT(1) NOT NULL DEFAULT '0',
    `inventoryLotId` INT NOT NULL,
    `warehouseId` INT NOT NULL,
    `inQty` DECIMAL(14, 2) NULL DEFAULT '0',
    `outQty` DECIMAL(14, 2) NULL DEFAULT '0',
    `holdQty` DECIMAL(14, 2) NULL DEFAULT '0',
    `status` VARCHAR(255) NOT NULL DEFAULT 'available',
    `remarks` VARCHAR(255) NULL,
    CONSTRAINT PK_INVENTORY_LOT_LINE PRIMARY KEY (id),
    CONSTRAINT FK_INVENTORY_LOT_LINE_TO_INVENTORY_LOT_ON_INVENTORY_LOT_ID FOREIGN KEY (`inventoryLotId`) REFERENCES `inventory_Lot` (`id`),
    CONSTRAINT FK_INVENTORY_LOT_LINE_TO_WAREHOUSE_ON_WAREHOUSE_ID FOREIGN KEY (`warehouseId`) REFERENCES `warehouse` (`id`)
);