ALTER TABLE `PM_ATTENDANCE` ADD `JCODE` VARCHAR(4) NOT NULL COMMENT '事業所コード' AFTER `RTCODE`;

ALTER TABLE `M_SYUKKINBO` 
ADD `WARIMASI1` INT NOT NULL DEFAULT '0' COMMENT '1.00割増' AFTER `NIJIKYU`,
ADD `ZKINMU` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '前回勤務形態' AFTER `WARIMASI1`;

ALTER TABLE `M_SCHEDULE` 
ADD `WARIMASI1` INT NOT NULL DEFAULT '0' COMMENT '1.00割増' AFTER `NIJIKYU`,
ADD `ZKINMU` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '前回勤務形態' AFTER `WARIMASI1`;

ALTER TABLE `M_KINTAI` ADD `WARIMASI1` INT NOT NULL DEFAULT '0' COMMENT '1.00割増' AFTER `NIJIKYU`;

DROP TABLE IF EXISTS `CT_OVERTIME_REQUEST`;
CREATE TABLE `CT_OVERTIME_REQUEST` (
  VOUCHER int(10) unsigned zerofill NOT NULL COMMENT '残業申請伝票番号',
  WORKFLOW bigint(20) unsigned zerofill NOT NULL COMMENT 'ワークフロー番号',
  KCODE varchar(10) NOT NULL COMMENT '社員コード',
  REQUESTDATE date NOT NULL COMMENT '申請日',
  WORKDATE date NOT NULL COMMENT '勤務日',
  OVERTIME int(11) NOT NULL COMMENT '申請時間',
  REASON text NOT NULL COMMENT '事由',
  DELETEFLAG int(1) NOT NULL COMMENT '削除フラグ',
  ADDDT datetime NOT NULL COMMENT '登録日',
  ADDCD varchar(10) NOT NULL COMMENT '登録者',
  UPDDT timestamp NOT NULL default CURRENT_TIMESTAMP COMMENT '更新日',
  UPDCD varchar(10) NOT NULL COMMENT '更新者',
  PRIMARY KEY  (VOUCHER)
) ENGINE=InnoDB DEFAULT CHARSET=cp932 COMMENT='残業申請テーブル';