--liquibase formatted sql

--changeset jason:update uom_conversion
DROP TABLE IF EXISTS uom_conversion;

CREATE TABLE uom_conversion
(
    id          INT            NOT NULL AUTO_INCREMENT,
    version     INT            NOT NULL DEFAULT '0',
    created     datetime       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    createdBy   VARCHAR(30) NULL,
    modified    datetime       NOT NULL DEFAULT CURRENT_TIMESTAMP,
    modifiedBy  VARCHAR(30) NULL,
    deleted     TINYINT(1) NOT NULL DEFAULT '0',

    m18Id       INT              NOT NULL,
    code        VARCHAR(50)      NULL,
    udfudesc    VARCHAR(50)      NULL,
    unit1       VARCHAR(50)      NULL,
    unit1Qty    DECIMAL(16, 2)   NULL DEFAULT 1,
    unit2       VARCHAR(50)      NULL,
    unit2Qty    DECIMAL(16, 2)   NULL,
    unit3       VARCHAR(50)      NULL,
    unit3Qty    DECIMAL(16, 2)   NULL,
    unit4       VARCHAR(50)      NULL,
    unit4Qty    DECIMAL(16, 2)   NULL,
    sizeInGram  DECIMAL(16, 2)   NULL,
    gramPerSmallestUnit DECIMAL(16, 2)   NULL,
    lastModifyDate datetime   NOT NULL,

    CONSTRAINT pk_uom_conversion PRIMARY KEY (id)
);