* Add upgrade sql.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE `zt_branch` ADD `default` enum ('0', '1') NOT NULL DEFAULT '0' AFTER `name`;
|
||||
ALTER TABLE `zt_branch` ADD `status` enum ('active', 'closed') NOT NULL DEFAULT 'active' AFTER `default`;
|
||||
ALTER TABLE `zt_branch` ADD `desc` varchar(255) NOT NULL AFTER `status`;
|
||||
ALTER TABLE `zt_branch` ADD `createdDate` date NOT NULL AFTER `desc`;
|
||||
ALTER TABLE `zt_branch` ADD `closedDate` date NOT NULL AFTER `createdDate`;
|
||||
ALTER TABLE `zt_projectproduct` ADD PRIMARY KEY `project_product_branch` (`project`, `product`, `branch`), DROP INDEX `PRIMARY`;
|
||||
@@ -147,6 +147,11 @@ CREATE TABLE IF NOT EXISTS `zt_branch` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`default` enum ('0', '1') NOT NULL DEFAULT '0'
|
||||
`status` enum ('active', 'closed') NOT NULL DEFAULT 'active'
|
||||
`desc` varchar(255) NOT NULL,
|
||||
`createdDate` date NOT NULL,
|
||||
`closedDate` date NOT NULL,
|
||||
`order` smallint unsigned NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
|
||||
@@ -729,6 +729,10 @@ class upgradeModel extends model
|
||||
$this->saveLogs('Execute 15_7');
|
||||
$this->execSQL($this->getUpgradeFile('15.7'));
|
||||
$this->appendExec('15_7');
|
||||
case '15_7_1':
|
||||
$this->saveLogs('Execute 15_7_1');
|
||||
$this->execSQL($this->getUpgradeFile('15.7.1'));
|
||||
$this->appendExec('15_7_1');
|
||||
}
|
||||
|
||||
$this->deletePatch();
|
||||
|
||||
Reference in New Issue
Block a user