--liquibase formatted sql

--changeset kelvin:add client table

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

  `fullname` VARCHAR(90) NOT NULL,
  `lastname` VARCHAR(30),
  `firstname` VARCHAR(60),
  `title` VARCHAR(60),
  `email` VARCHAR(120),
  `phone1` VARCHAR(30),
  `phone2` VARCHAR(30),
  `joinDate` datetime NOT NULL,
  `caseManagerId` int,
  `consultantId` int,
  `remarks` VARCHAR(600),
  
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `lionerdb`.`client` (`fullname`, `lastname`, `firstname`, `title`, `email`, `phone1`, `phone2`, `joinDate`, `remarks`) VALUES ('Chan Tai Ming', 'Chan', 'Tai Ming', 'Mr', 'ctm@mail.com', '30187234', '91092357', '2025-04-13', 'Testing');
INSERT INTO `lionerdb`.`client` (`fullname`, `lastname`, `firstname`, `title`, `email`, `phone1`, `joinDate`, `remarks`) VALUES ('Testing Wong', 'Wong', 'Testing', 'Ms', 'tw@mail.com', '23812238', '2025-06-08', 'Testing2');