--liquibase formatted sql

--changeset cyril:master data for shop and warehouse
CREATE TABLE `shop`
(
    `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',
    `code`            VARCHAR(50) NOT NULL,
    `name`            VARCHAR(300) NOT NULL,
    `brNo`            VARCHAR(50) NULL,
    `contactNo`       VARCHAR(50) NULL,
    `contactEmail`    VARCHAR(50) NULL,
    `contactName`     VARCHAR(50) NULL,
    `addr1`           VARCHAR(300) NULL,
    `addr2`           VARCHAR(300) NULL,
    `addr3`           VARCHAR(300) NULL,
    `addr4`           VARCHAR(300) NULL,
    `district`        VARCHAR(300) NULL,
    `type`            VARCHAR(10) NULL,
    `m18Id`           INT         NOT NULL,
    `m18LastModifyDate` datetime    NOT NULL,
    CONSTRAINT pk_shop PRIMARY KEY (id)
);

CREATE TABLE `warehouse`
(
    `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',
    `code`        VARCHAR(30)    NOT NULL,
    `name`        VARCHAR(30)    NOT NULL,
    `description` VARCHAR(30)    NOT NULL,
    `capacity`    DECIMAL(14, 2) NOT NULL,
    CONSTRAINT pk_warehouse PRIMARY KEY (id)
);