[ Index ] |
|
Code source de Mantis 1.1.0rc3 |
1 <?php 2 # Mantis - a php based bugtracking system 3 4 # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 5 # Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net 6 7 # Mantis is free software: you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation, either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # Mantis is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with Mantis. If not, see <http://www.gnu.org/licenses/>. 19 20 # Changes applied to 0.14 database to give us 0.15 21 22 # -------------------------------------------------------- 23 # $Id: 0_14_inc.php,v 1.9.16.1 2007-10-13 22:35:04 giallu Exp $ 24 # -------------------------------------------------------- 25 ?> 26 <?php 27 require( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'db_table_names_inc.php' ); 28 29 $upgrades = array(); 30 31 # None of these have descriptions... 32 33 $upgrades[] = new SQLUpgrade( 34 '0.14a-0', 35 '', 36 "ALTER TABLE $t_project_table CHANGE view_state view_state VARCHAR (32) DEFAULT 'public' not null" 37 ); 38 39 $upgrades[] = new SQLUpgrade( 40 '0.14a-1', 41 '', 42 "ALTER TABLE $t_project_table CHANGE status status VARCHAR (32) DEFAULT 'development' not null" 43 ); 44 45 $upgrades[] = new SQLUpgrade( 46 '0.14a-2', 47 '', 48 "ALTER TABLE $t_user_table CHANGE access_level access_level VARCHAR (32) DEFAULT 'viewer' not null" 49 ); 50 51 $upgrades[] = new SQLUpgrade( 52 '0.14a-3', 53 '', 54 "ALTER TABLE $t_bug_table CHANGE eta eta VARCHAR (32) DEFAULT 'none' not null" 55 ); 56 57 $upgrades[] = new SQLUpgrade( 58 '0.14a-4', 59 '', 60 "ALTER TABLE $t_bug_table CHANGE projection projection VARCHAR (32) DEFAULT 'none' not null" 61 ); 62 63 $upgrades[] = new SQLUpgrade( 64 '0.14a-5', 65 '', 66 "ALTER TABLE $t_bug_table CHANGE resolution resolution VARCHAR (32) DEFAULT 'open' not null" 67 ); 68 69 $upgrades[] = new SQLUpgrade( 70 '0.14a-6', 71 '', 72 "ALTER TABLE $t_bug_table CHANGE priority priority VARCHAR (32) DEFAULT 'none' not null" 73 ); 74 75 $upgrades[] = new SQLUpgrade( 76 '0.14a-7', 77 '', 78 "ALTER TABLE $t_bug_table CHANGE status status VARCHAR (32) DEFAULT 'new' not null" 79 ); 80 81 $upgrades[] = new SQLUpgrade( 82 '0.14a-8', 83 '', 84 "ALTER TABLE $t_bug_table CHANGE severity severity VARCHAR (32) DEFAULT 'minor' not null" 85 ); 86 87 $upgrades[] = new SQLUpgrade( 88 '0.14a-9', 89 '', 90 "ALTER TABLE $t_bug_table CHANGE reproducibility reproducibility VARCHAR (32) DEFAULT 'always' not null" 91 ); 92 93 # Change some of the TIMESTAMP fields to DATETIME 94 95 $upgrades[] = new SQLUpgrade( 96 '0.14-0', 97 'Change some of the TIMESTAMP fields to DATETIME', 98 "ALTER TABLE $t_bug_table CHANGE date_submitted date_submitted DATETIME" 99 ); 100 $upgrades[] = new SQLUpgrade( 101 '0.14-1', 102 'Change some of the TIMESTAMP fields to DATETIME', 103 "ALTER TABLE $t_bugnote_table CHANGE date_submitted date_submitted DATETIME" 104 ); 105 106 $upgrades[] = new SQLUpgrade( 107 '0.14-2', 108 'Change some of the TIMESTAMP fields to DATETIME', 109 "ALTER TABLE $t_news_table CHANGE date_posted date_posted DATETIME" 110 ); 111 112 $upgrades[] = new SQLUpgrade( 113 '0.14-3', 114 'Change some of the TIMESTAMP fields to DATETIME', 115 "ALTER TABLE $t_user_table CHANGE date_created date_created DATETIME" 116 ); 117 118 # INT(1) Updates (Before ALTERation) 119 120 121 $upgrades[] = new SQLUpgrade( 122 '0.14-4', 123 'INT(1) Updates (Before ALTERation)', 124 "UPDATE $t_project_table SET enabled='0' WHERE enabled=''" 125 ); 126 127 $upgrades[] = new SQLUpgrade( 128 '0.14-5', 129 'INT(1) Updates (Before ALTERation)', 130 "UPDATE $t_project_table SET enabled='1' WHERE enabled='on'" 131 ); 132 133 134 $upgrades[] = new SQLUpgrade( 135 '0.14-6', 136 'INT(1) Updates (Before ALTERation)', 137 "UPDATE $t_user_pref_table SET advanced_report='0' WHERE advanced_report=''" 138 ); 139 140 $upgrades[] = new SQLUpgrade( 141 '0.14-7', 142 'INT(1) Updates (Before ALTERation)', 143 "UPDATE $t_user_pref_table SET advanced_report='1' WHERE advanced_report='on'" 144 ); 145 146 147 $upgrades[] = new SQLUpgrade( 148 '0.14-8', 149 'INT(1) Updates (Before ALTERation)', 150 "UPDATE $t_user_pref_table SET advanced_view='0' WHERE advanced_view=''" 151 ); 152 153 $upgrades[] = new SQLUpgrade( 154 '0.14-9', 155 'INT(1) Updates (Before ALTERation)', 156 "UPDATE $t_user_pref_table SET advanced_view='1' WHERE advanced_view='on'" 157 ); 158 159 160 $upgrades[] = new SQLUpgrade( 161 '0.14-10', 162 'INT(1) Updates (Before ALTERation)', 163 "UPDATE $t_user_profile_table SET default_profile='0' WHERE default_profile=''" 164 ); 165 166 $upgrades[] = new SQLUpgrade( 167 '0.14-11', 168 'INT(1) Updates (Before ALTERation)', 169 "UPDATE $t_user_profile_table SET default_profile='1' WHERE default_profile='on'" 170 ); 171 172 173 $upgrades[] = new SQLUpgrade( 174 '0.14-12', 175 'INT(1) Updates (Before ALTERation)', 176 "UPDATE $t_user_table SET enabled='0' WHERE enabled=''" 177 ); 178 179 $upgrades[] = new SQLUpgrade( 180 '0.14-13', 181 'INT(1) Updates (Before ALTERation)', 182 "UPDATE $t_user_table SET enabled='1' WHERE enabled='on'" 183 ); 184 185 186 $upgrades[] = new SQLUpgrade( 187 '0.14-14', 188 'INT(1) Updates (Before ALTERation)', 189 "UPDATE $t_user_table SET protected='0' WHERE protected=''" 190 ); 191 192 $upgrades[] = new SQLUpgrade( 193 '0.14-15', 194 'INT(1) Updates (Before ALTERation)', 195 "UPDATE $t_user_table SET protected='1' WHERE protected='on'" 196 ); 197 198 # Change CHAR(3) to INT(1) 199 200 201 $upgrades[] = new SQLUpgrade( 202 '0.14-16', 203 'Change CHAR(3) to INT(1)', 204 "ALTER TABLE $t_project_table CHANGE enabled enabled INT (1) not null" 205 ); 206 207 $upgrades[] = new SQLUpgrade( 208 '0.14-17', 209 'Change CHAR(3) to INT(1)', 210 "ALTER TABLE $t_user_pref_table CHANGE advanced_report advanced_report INT (1) not null" 211 ); 212 213 $upgrades[] = new SQLUpgrade( 214 '0.14-18', 215 'Change CHAR(3) to INT(1)', 216 "ALTER TABLE $t_user_pref_table CHANGE advanced_view advanced_view INT (1) not null" 217 ); 218 219 $upgrades[] = new SQLUpgrade( 220 '0.14-19', 221 'Change CHAR(3) to INT(1)', 222 "ALTER TABLE $t_user_profile_table CHANGE default_profile default_profile INT (1) not null" 223 ); 224 225 $upgrades[] = new SQLUpgrade( 226 '0.14-20', 227 'Change CHAR(3) to INT(1)', 228 "ALTER TABLE $t_user_table CHANGE enabled enabled INT (1) DEFAULT '1' not null" 229 ); 230 231 $upgrades[] = new SQLUpgrade( 232 '0.14-21', 233 'Change CHAR(3) to INT(1)', 234 "ALTER TABLE $t_user_table CHANGE protected protected INT (1) not null" 235 ); 236 237 # ENUM Updates (Before ALTERation) 238 239 240 $upgrades[] = new SQLUpgrade( 241 '0.14-22', 242 'ENUM Updates (Before ALTERation)', 243 "UPDATE $t_project_table SET view_state='10' WHERE view_state='public'" 244 ); 245 246 $upgrades[] = new SQLUpgrade( 247 '0.14-23', 248 'ENUM Updates (Before ALTERation)', 249 "UPDATE $t_project_table SET view_state='50' WHERE view_state='private'" 250 ); 251 252 253 $upgrades[] = new SQLUpgrade( 254 '0.14-24', 255 'ENUM Updates (Before ALTERation)', 256 "UPDATE $t_project_table SET status='10' WHERE status='development'" 257 ); 258 259 $upgrades[] = new SQLUpgrade( 260 '0.14-25', 261 'ENUM Updates (Before ALTERation)', 262 "UPDATE $t_project_table SET status='30' WHERE status='release'" 263 ); 264 265 $upgrades[] = new SQLUpgrade( 266 '0.14-26', 267 'ENUM Updates (Before ALTERation)', 268 "UPDATE $t_project_table SET status='50' WHERE status='stable'" 269 ); 270 271 $upgrades[] = new SQLUpgrade( 272 '0.14-27', 273 'ENUM Updates (Before ALTERation)', 274 "UPDATE $t_project_table SET status='70' WHERE status='obsolete'" 275 ); 276 277 278 $upgrades[] = new SQLUpgrade( 279 '0.14-28', 280 'ENUM Updates (Before ALTERation)', 281 "UPDATE $t_user_table SET access_level='10' WHERE access_level='viewer'" 282 ); 283 284 $upgrades[] = new SQLUpgrade( 285 '0.14-29', 286 'ENUM Updates (Before ALTERation)', 287 "UPDATE $t_user_table SET access_level='25' WHERE access_level='reporter'" 288 ); 289 290 $upgrades[] = new SQLUpgrade( 291 '0.14-30', 292 'ENUM Updates (Before ALTERation)', 293 "UPDATE $t_user_table SET access_level='40' WHERE access_level='updater'" 294 ); 295 296 $upgrades[] = new SQLUpgrade( 297 '0.14-31', 298 'ENUM Updates (Before ALTERation)', 299 "UPDATE $t_user_table SET access_level='55' WHERE access_level='developer'" 300 ); 301 302 $upgrades[] = new SQLUpgrade( 303 '0.14-32', 304 'ENUM Updates (Before ALTERation)', 305 "UPDATE $t_user_table SET access_level='70' WHERE access_level='manager'" 306 ); 307 308 $upgrades[] = new SQLUpgrade( 309 '0.14-33', 310 'ENUM Updates (Before ALTERation)', 311 "UPDATE $t_user_table SET access_level='90' WHERE access_level='administrator'" 312 ); 313 314 315 $upgrades[] = new SQLUpgrade( 316 '0.14-34', 317 'ENUM Updates (Before ALTERation)', 318 "UPDATE $t_bug_table SET eta='10' WHERE eta='none'" 319 ); 320 321 $upgrades[] = new SQLUpgrade( 322 '0.14-35', 323 'ENUM Updates (Before ALTERation)', 324 "UPDATE $t_bug_table SET eta='20' WHERE eta='< 1 day'" 325 ); 326 327 $upgrades[] = new SQLUpgrade( 328 '0.14-36', 329 'ENUM Updates (Before ALTERation)', 330 "UPDATE $t_bug_table SET eta='30' WHERE eta='2-3 days'" 331 ); 332 333 $upgrades[] = new SQLUpgrade( 334 '0.14-37', 335 'ENUM Updates (Before ALTERation)', 336 "UPDATE $t_bug_table SET eta='40' WHERE eta='< 1 week'" 337 ); 338 339 $upgrades[] = new SQLUpgrade( 340 '0.14-38', 341 'ENUM Updates (Before ALTERation)', 342 "UPDATE $t_bug_table SET eta='50' WHERE eta='< 1 month'" 343 ); 344 345 $upgrades[] = new SQLUpgrade( 346 '0.14-39', 347 'ENUM Updates (Before ALTERation)', 348 "UPDATE $t_bug_table SET eta='60' WHERE eta='> 1 month'" 349 ); 350 351 352 $upgrades[] = new SQLUpgrade( 353 '0.14-40', 354 'ENUM Updates (Before ALTERation)', 355 "UPDATE $t_bug_table SET projection='10' WHERE projection='none'" 356 ); 357 358 $upgrades[] = new SQLUpgrade( 359 '0.14-41', 360 'ENUM Updates (Before ALTERation)', 361 "UPDATE $t_bug_table SET projection='30' WHERE projection='tweak'" 362 ); 363 364 $upgrades[] = new SQLUpgrade( 365 '0.14-42', 366 'ENUM Updates (Before ALTERation)', 367 "UPDATE $t_bug_table SET projection='50' WHERE projection='minor fix'" 368 ); 369 370 $upgrades[] = new SQLUpgrade( 371 '0.14-43', 372 'ENUM Updates (Before ALTERation)', 373 "UPDATE $t_bug_table SET projection='70' WHERE projection='major rework'" 374 ); 375 376 $upgrades[] = new SQLUpgrade( 377 '0.14-44', 378 'ENUM Updates (Before ALTERation)', 379 "UPDATE $t_bug_table SET projection='90' WHERE projection='redesign'" 380 ); 381 382 383 $upgrades[] = new SQLUpgrade( 384 '0.14-45', 385 'ENUM Updates (Before ALTERation)', 386 "UPDATE $t_bug_table SET resolution='10' WHERE resolution='open'" 387 ); 388 389 $upgrades[] = new SQLUpgrade( 390 '0.14-46', 391 'ENUM Updates (Before ALTERation)', 392 "UPDATE $t_bug_table SET resolution='20' WHERE resolution='fixed'" 393 ); 394 395 $upgrades[] = new SQLUpgrade( 396 '0.14-47', 397 'ENUM Updates (Before ALTERation)', 398 "UPDATE $t_bug_table SET resolution='30' WHERE resolution='reopened'" 399 ); 400 401 $upgrades[] = new SQLUpgrade( 402 '0.14-48', 403 'ENUM Updates (Before ALTERation)', 404 "UPDATE $t_bug_table SET resolution='40' WHERE resolution='unable to duplicate'" 405 ); 406 407 $upgrades[] = new SQLUpgrade( 408 '0.14-49', 409 'ENUM Updates (Before ALTERation)', 410 "UPDATE $t_bug_table SET resolution='50' WHERE resolution='not fixable'" 411 ); 412 413 $upgrades[] = new SQLUpgrade( 414 '0.14-50', 415 'ENUM Updates (Before ALTERation)', 416 "UPDATE $t_bug_table SET resolution='60' WHERE resolution='duplicate'" 417 ); 418 419 $upgrades[] = new SQLUpgrade( 420 '0.14-51', 421 'ENUM Updates (Before ALTERation)', 422 "UPDATE $t_bug_table SET resolution='70' WHERE resolution='not a bug'" 423 ); 424 425 $upgrades[] = new SQLUpgrade( 426 '0.14-52', 427 'ENUM Updates (Before ALTERation)', 428 "UPDATE $t_bug_table SET resolution='80' WHERE resolution='suspended'" 429 ); 430 431 432 $upgrades[] = new SQLUpgrade( 433 '0.14-53', 434 'ENUM Updates (Before ALTERation)', 435 "UPDATE $t_bug_table SET priority='10' WHERE priority='none'" 436 ); 437 438 $upgrades[] = new SQLUpgrade( 439 '0.14-54', 440 'ENUM Updates (Before ALTERation)', 441 "UPDATE $t_bug_table SET priority='20' WHERE priority='low'" 442 ); 443 444 $upgrades[] = new SQLUpgrade( 445 '0.14-55', 446 'ENUM Updates (Before ALTERation)', 447 "UPDATE $t_bug_table SET priority='30' WHERE priority='normal'" 448 ); 449 450 $upgrades[] = new SQLUpgrade( 451 '0.14-56', 452 'ENUM Updates (Before ALTERation)', 453 "UPDATE $t_bug_table SET priority='40' WHERE priority='high'" 454 ); 455 456 $upgrades[] = new SQLUpgrade( 457 '0.14-57', 458 'ENUM Updates (Before ALTERation)', 459 "UPDATE $t_bug_table SET priority='50' WHERE priority='urgent'" 460 ); 461 462 $upgrades[] = new SQLUpgrade( 463 '0.14-58', 464 'ENUM Updates (Before ALTERation)', 465 "UPDATE $t_bug_table SET priority='60' WHERE priority='immediate'" 466 ); 467 468 469 $upgrades[] = new SQLUpgrade( 470 '0.14-59', 471 'ENUM Updates (Before ALTERation)', 472 "UPDATE $t_bug_table SET status='10' WHERE status='new'" 473 ); 474 475 $upgrades[] = new SQLUpgrade( 476 '0.14-60', 477 'ENUM Updates (Before ALTERation)', 478 "UPDATE $t_bug_table SET status='20' WHERE status='feedback'" 479 ); 480 481 $upgrades[] = new SQLUpgrade( 482 '0.14-61', 483 'ENUM Updates (Before ALTERation)', 484 "UPDATE $t_bug_table SET status='30' WHERE status='acknowledged'" 485 ); 486 487 $upgrades[] = new SQLUpgrade( 488 '0.14-62', 489 'ENUM Updates (Before ALTERation)', 490 "UPDATE $t_bug_table SET status='40' WHERE status='confirmed'" 491 ); 492 493 $upgrades[] = new SQLUpgrade( 494 '0.14-63', 495 'ENUM Updates (Before ALTERation)', 496 "UPDATE $t_bug_table SET status='50' WHERE status='assigned'" 497 ); 498 499 $upgrades[] = new SQLUpgrade( 500 '0.14-64', 501 'ENUM Updates (Before ALTERation)', 502 "UPDATE $t_bug_table SET status='90' WHERE status='resolved'" 503 ); 504 505 $upgrades[] = new SQLUpgrade( 506 '0.14-65', 507 'ENUM Updates (Before ALTERation)', 508 "UPDATE $t_bug_table SET status='90' WHERE status='closed'" 509 ); 510 511 512 $upgrades[] = new SQLUpgrade( 513 '0.14-66', 514 'ENUM Updates (Before ALTERation)', 515 "UPDATE $t_bug_table SET severity='10' WHERE severity='feature'" 516 ); 517 518 $upgrades[] = new SQLUpgrade( 519 '0.14-67', 520 'ENUM Updates (Before ALTERation)', 521 "UPDATE $t_bug_table SET severity='20' WHERE severity='trivial'" 522 ); 523 524 $upgrades[] = new SQLUpgrade( 525 '0.14-68', 526 'ENUM Updates (Before ALTERation)', 527 "UPDATE $t_bug_table SET severity='30' WHERE severity='text'" 528 ); 529 530 $upgrades[] = new SQLUpgrade( 531 '0.14-69', 532 'ENUM Updates (Before ALTERation)', 533 "UPDATE $t_bug_table SET severity='40' WHERE severity='tweak'" 534 ); 535 536 $upgrades[] = new SQLUpgrade( 537 '0.14-70', 538 'ENUM Updates (Before ALTERation)', 539 "UPDATE $t_bug_table SET severity='50' WHERE severity='minor'" 540 ); 541 542 $upgrades[] = new SQLUpgrade( 543 '0.14-71', 544 'ENUM Updates (Before ALTERation)', 545 "UPDATE $t_bug_table SET severity='60' WHERE severity='major'" 546 ); 547 548 $upgrades[] = new SQLUpgrade( 549 '0.14-72', 550 'ENUM Updates (Before ALTERation)', 551 "UPDATE $t_bug_table SET severity='70' WHERE severity='crash'" 552 ); 553 554 $upgrades[] = new SQLUpgrade( 555 '0.14-73', 556 'ENUM Updates (Before ALTERation)', 557 "UPDATE $t_bug_table SET severity='80' WHERE severity='block'" 558 ); 559 560 $upgrades[] = new SQLUpgrade( 561 '0.14-74', 562 'ENUM Updates (Before ALTERation)', 563 "UPDATE $t_bug_table SET reproducibility='10' WHERE reproducibility='always'" 564 ); 565 566 $upgrades[] = new SQLUpgrade( 567 '0.14-75', 568 'ENUM Updates (Before ALTERation)', 569 "UPDATE $t_bug_table SET reproducibility='30' WHERE reproducibility='sometimes'" 570 ); 571 572 $upgrades[] = new SQLUpgrade( 573 '0.14-76', 574 'ENUM Updates (Before ALTERation)', 575 "UPDATE $t_bug_table SET reproducibility='50' WHERE reproducibility='random'" 576 ); 577 578 $upgrades[] = new SQLUpgrade( 579 '0.14-77', 580 'ENUM Updates (Before ALTERation)', 581 "UPDATE $t_bug_table SET reproducibility='70' WHERE reproducibility='have not tried'" 582 ); 583 584 $upgrades[] = new SQLUpgrade( 585 '0.14-78', 586 'ENUM Updates (Before ALTERation)', 587 "UPDATE $t_bug_table SET reproducibility='90' WHERE reproducibility='unable to duplicate'" 588 ); 589 590 # Change ENUM to INT 591 592 593 $upgrades[] = new SQLUpgrade( 594 '0.14-79', 595 'Change ENUM to INT', 596 "ALTER TABLE $t_project_table CHANGE view_state view_state INT (2) DEFAULT '10' not null" 597 ); 598 599 $upgrades[] = new SQLUpgrade( 600 '0.14-80', 601 'Change ENUM to INT', 602 "ALTER TABLE $t_project_table CHANGE status status INT (2) DEFAULT '10' not null" 603 ); 604 605 $upgrades[] = new SQLUpgrade( 606 '0.14-81', 607 'Change ENUM to INT', 608 "ALTER TABLE $t_user_table CHANGE access_level access_level INT (2) DEFAULT '10' not null" 609 ); 610 611 $upgrades[] = new SQLUpgrade( 612 '0.14-82', 613 'Change ENUM to INT', 614 "ALTER TABLE $t_bug_table CHANGE eta eta INT (2) DEFAULT '10' not null" 615 ); 616 617 $upgrades[] = new SQLUpgrade( 618 '0.14-83', 619 'Change ENUM to INT', 620 "ALTER TABLE $t_bug_table CHANGE projection projection INT (2) DEFAULT '10' not null" 621 ); 622 623 $upgrades[] = new SQLUpgrade( 624 '0.14-84', 625 'Change ENUM to INT', 626 "ALTER TABLE $t_bug_table CHANGE resolution resolution INT (2) DEFAULT '10' not null" 627 ); 628 629 $upgrades[] = new SQLUpgrade( 630 '0.14-85', 631 'Change ENUM to INT', 632 "ALTER TABLE $t_bug_table CHANGE priority priority INT (2) DEFAULT '30' not null" 633 ); 634 635 $upgrades[] = new SQLUpgrade( 636 '0.14-86', 637 'Change ENUM to INT', 638 "ALTER TABLE $t_bug_table CHANGE status status INT (2) DEFAULT '10' not null" 639 ); 640 641 # Update dates to be legal 642 643 $upgrades[] = new SQLUpgrade( 644 '0.14-87', 645 'Update dates to be legal', 646 "UPDATE $t_user_table SET date_created='1970-01-01 00:00:01' WHERE date_created='0000-00-00 00:00:00'" 647 ); 648 649 $upgrades[] = new SQLUpgrade( 650 '0.14-88', 651 'Update dates to be legal', 652 "UPDATE $t_bug_table SET date_submitted='1970-01-01 00:00:01' WHERE date_submitted='0000-00-00 00:00:00'" 653 ); 654 655 $upgrades[] = new SQLUpgrade( 656 '0.14-89', 657 'Update dates to be legal', 658 "UPDATE $t_news_table SET date_posted='1970-01-01 00:00:01' WHERE date_posted='0000-00-00 00:00:00'" 659 ); 660 661 # Shorten cookie string to 64 characters 662 663 664 $upgrades[] = new SQLUpgrade( 665 '0.14-90', 666 'Shorten cookie string to 64 characters', 667 "ALTER TABLE $t_user_table CHANGE cookie_string cookie_string VARCHAR (64) not null" 668 ); 669 670 # Add file_path to projects, also min access 671 672 $upgrades[] = new SQLUpgrade( 673 '0.14-91', 674 'Add file_path to projects', 675 "ALTER TABLE $t_project_table ADD file_path VARCHAR (250) not null" 676 ); 677 678 $upgrades[] = new SQLUpgrade( 679 '0.14-92', 680 'Add access_min to projects', 681 "ALTER TABLE $t_project_table ADD access_min INT (2) DEFAULT '10' not null" 682 ); 683 684 # Add new user prefs 685 686 $upgrades[] = new SQLUpgrade( 687 '0.14-93', 688 'Add new user prefs', 689 "ALTER TABLE $t_user_pref_table ADD refresh_delay INT (4) not null" 690 ); 691 692 $upgrades[] = new SQLUpgrade( 693 '0.14-94', 694 'Add new user prefs', 695 "ALTER TABLE $t_user_pref_table ADD language VARCHAR (16)DEFAULT 'english' not null" 696 ); 697 698 $upgrades[] = new SQLUpgrade( 699 '0.14-95', 700 'Add new user prefs', 701 "ALTER TABLE $t_user_pref_table ADD email_on_new INT (1) not null" 702 ); 703 704 $upgrades[] = new SQLUpgrade( 705 '0.14-96', 706 'Add new user prefs', 707 "ALTER TABLE $t_user_pref_table ADD email_on_assigned INT (1) not null" 708 ); 709 710 $upgrades[] = new SQLUpgrade( 711 '0.14-97', 712 'Add new user prefs', 713 "ALTER TABLE $t_user_pref_table ADD email_on_feedback INT (1) not null" 714 ); 715 716 $upgrades[] = new SQLUpgrade( 717 '0.14-98', 718 'Add new user prefs', 719 "ALTER TABLE $t_user_pref_table ADD email_on_resolved INT (1) not null" 720 ); 721 722 $upgrades[] = new SQLUpgrade( 723 '0.14-99', 724 'Add new user prefs', 725 "ALTER TABLE $t_user_pref_table ADD email_on_closed INT (1) not null" 726 ); 727 728 $upgrades[] = new SQLUpgrade( 729 '0.14-100', 730 'Add new user prefs', 731 "ALTER TABLE $t_user_pref_table ADD email_on_reopened INT (1) not null" 732 ); 733 734 $upgrades[] = new SQLUpgrade( 735 '0.14-101', 736 'Add new user prefs', 737 "ALTER TABLE $t_user_pref_table ADD email_on_bugnote INT (1) not null" 738 ); 739 740 $upgrades[] = new SQLUpgrade( 741 '0.14-102', 742 'Add new user prefs', 743 "ALTER TABLE $t_user_pref_table ADD email_on_status INT (1) not null" 744 ); 745 746 $upgrades[] = new SQLUpgrade( 747 '0.14-103', 748 'Add new user prefs', 749 "ALTER TABLE $t_user_pref_table ADD redirect_delay INT (1) not null" 750 ); 751 752 $upgrades[] = new SQLUpgrade( 753 '0.14-104', 754 'Add new user prefs', 755 "ALTER TABLE $t_user_pref_table ADD email_on_priority INT (1) not null" 756 ); 757 758 $upgrades[] = new SQLUpgrade( 759 '0.14-105', 760 'Add new user prefs', 761 "ALTER TABLE $t_user_pref_table ADD advanced_update INT (1) not null" 762 ); 763 764 $upgrades[] = new SQLUpgrade( 765 '0.14-106', 766 'Add new user prefs', 767 "ALTER TABLE $t_user_pref_table ADD default_profile INT (7) UNSIGNED ZEROFILL DEFAULT '0' not null" 768 ); 769 770 $upgrades[] = new SQLUpgrade( 771 '0.14-107', 772 'Add new user prefs', 773 "ALTER TABLE $t_user_pref_table ADD default_project INT (7) UNSIGNED ZEROFILL not null" 774 ); 775 776 $upgrades[] = new SQLUpgrade( 777 '0.14-108', 778 'Add new user prefs', 779 "ALTER TABLE $t_user_profile_table DROP default_profile" 780 ); 781 782 783 # Make new project level user access table 784 785 786 $upgrades[] = new SQLUpgrade( 787 '0.14-109', 788 'Make new project level user access table', 789 "CREATE TABLE $t_project_user_list_table ( 790 project_id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL, 791 user_id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL, 792 access_level int(2) DEFAULT '10' NOT NULL)" 793 ); 794 795 # Make new project file table 796 797 $upgrades[] = new SQLUpgrade( 798 '0.14-110', 799 'Make new project file table', 800 "CREATE TABLE IF NOT EXISTS $t_project_file_table ( 801 id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL auto_increment, 802 project_id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL, 803 title varchar(250) NOT NULL, 804 description varchar(250) NOT NULL, 805 diskfile varchar(250) NOT NULL, 806 filename varchar(250) NOT NULL, 807 folder varchar(250) NOT NULL, 808 filesize int(11) DEFAULT '0' NOT NULL, 809 date_added datetime DEFAULT '1970-01-01 00:00:01' NOT NULL, 810 content blob NOT NULL, 811 PRIMARY KEY (id))" 812 ); 813 814 # Make new bug file table 815 816 $upgrades[] = new SQLUpgrade( 817 '0.14-111', 818 'Make new bug file table', 819 "CREATE TABLE IF NOT EXISTS $t_bug_file_table ( 820 id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL auto_increment, 821 bug_id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL, 822 title varchar(250) NOT NULL, 823 description varchar(250) NOT NULL, 824 diskfile varchar(250) NOT NULL, 825 filename varchar(250) NOT NULL, 826 folder varchar(250) NOT NULL, 827 filesize int(11) DEFAULT '0' NOT NULL, 828 date_added datetime DEFAULT '1970-01-01 00:00:01' NOT NULL, 829 content blob NOT NULL, 830 PRIMARY KEY (id))" 831 ); 832 833 # more varchar to enum conversions 834 835 $upgrades[] = new SQLUpgrade( 836 '0.14-112', 837 'more varchar to enum conversions', 838 "ALTER TABLE $t_bug_table CHANGE severity severity INT (2) DEFAULT '50' not null" 839 ); 840 841 $upgrades[] = new SQLUpgrade( 842 '0.14-113', 843 'more varchar to enum conversions', 844 "ALTER TABLE $t_bug_table CHANGE reproducibility reproducibility INT (2) DEFAULT '10' not null" 845 ); 846 847 # Need this entry for the project listing to work 848 849 $upgrades[] = new SQLUpgrade( 850 '0.14-114', 851 'Need this entry for the project listing to work', 852 "INSERT INTO $t_project_user_list_table (project_id, user_id, access_level) VALUES ('0000000','0000000','00')" 853 ); 854 855 # Add ordering field for versions 856 857 $upgrades[] = new SQLUpgrade( 858 '0.14-115', 859 'Add ordering field for versions', 860 "ALTER TABLE $t_project_version_table ADD ver_order INT (7) not null" 861 ); 862 863 # Make the cookie string unique 864 865 $upgrades[] = new SQLUpgrade( 866 '0.14-116', 867 'Make the cookie string unique', 868 "ALTER IGNORE TABLE $t_user_table ADD UNIQUE(cookie_string)" 869 ); 870 871 872 return $upgrades; 873 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 09:42:17 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |