forked from easysoft/zentaopms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update1.0.beta.sql
68 lines (66 loc) · 4.28 KB
/
update1.0.beta.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
-- 2010-04-06 bug table.
ALTER TABLE `zt_bug` ADD `deleted` ENUM( "0", "1" ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_build` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_case` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_company` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_file` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_product` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_productPlan` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_project` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_release` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_story` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_task` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_testTask` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
ALTER TABLE `zt_user` ADD `deleted` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
-- user table.
UPDATE zt_user SET deleted = '1' WHERE STATUS = 'delete';
ALTER TABLE `zt_user` DROP `status`;
INSERT INTO zt_action(`company`, `objecttype`, `objectID`, `actor`, action, `date`, `comment` , `extra`) SELECT `company`, 'user', `id`, 'system', 'deleted', now( ) , '', 1 FROM zt_user WHERE zt_user.deleted ='1';
-- company fields.
ALTER TABLE `zt_action` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_bug` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_bug` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_build` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_build` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_burn` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ;
ALTER TABLE `zt_burn` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_case` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_case` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_caseStep` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_caseStep` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_effort` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_effort` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_groupPriv` ADD `company` MEDIUMINT NOT NULL FIRST ;
ALTER TABLE `zt_groupPriv` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_history` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_history` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_module` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_module` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_productPlan` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_productPlan` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_projectProduct` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ;
ALTER TABLE `zt_projectProduct` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_projectStory` ADD `company` MEDIUMINT NOT NULL FIRST ;
ALTER TABLE `zt_projectStory` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_release` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_release` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_story` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_story` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_storySpec` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ;
ALTER TABLE `zt_storySpec` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_task` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_task` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_taskEstimate` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_taskEstimate` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_team` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ;
ALTER TABLE `zt_team` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_testResult` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_testResult` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_testRun` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_testRun` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_testTask` ADD `company` MEDIUMINT UNSIGNED NOT NULL AFTER `id` ;
ALTER TABLE `zt_testTask` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_todo` ADD `company` MEDIUMINT NOT NULL AFTER `id` ;
ALTER TABLE `zt_todo` ADD INDEX ( `company` ) ;
ALTER TABLE `zt_userGroup` ADD `company` MEDIUMINT UNSIGNED NOT NULL FIRST ;
ALTER TABLE `zt_userGroup` ADD INDEX ( `company` ) ;