--liquibase formatted sql

--changeset lioner:add form_sig_page table

CREATE TABLE `form_sig_page` (
  `id` int NOT NULL AUTO_INCREMENT,
  `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdBy` int DEFAULT NULL,
  `version` int NOT NULL DEFAULT '0',
  `modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedBy` int DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',

  `formCode` varchar(50) NOT NULL,
  `startDate` date NOT NULL,
  `sigType` varchar(20) NOT NULL,
  `pageFrom` int NOT NULL,
  `pageTo` int NOT NULL,
  `action` varchar(30) NOT NULL DEFAULT 'REPLACE',

  PRIMARY KEY (`id`),
  KEY `idx_form_sig_page_form_start` (`formCode`, `startDate`, `sigType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
