* Add upgrade sql.

This commit is contained in:
tianshujie
2021-11-04 15:42:39 +08:00
parent 8b1b92bdfc
commit e893c7f6c3
3 changed files with 15 additions and 0 deletions
+6
View File
@@ -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`;
+5
View File
@@ -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`),
+4
View File
@@ -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();