NC5_UPDATE_DB2.sql 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --
  2. -- Licensed Materials - Property of IBM
  3. --
  4. -- BI and PM: JSM
  5. --
  6. -- (c) Copyright IBM Corp. 2003, 2010.
  7. --
  8. -- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. --
  10. -------------------------------------------------------------------------------
  11. --NC4_UPDATE_DB2.SQL * DO NOT EDIT * Data Store Version: 5
  12. -------------------------------------------------------------------------------
  13. -------------------------------------------------------------------------------
  14. --$100-- backup create begin
  15. -------------------------------------------------------------------------------
  16. -------------------------------------------------------------------------------
  17. --$110-- backup inserts begin
  18. -------------------------------------------------------------------------------
  19. -------------------------------------------------------------------------------
  20. --$120-- foreign keys drop begin
  21. -------------------------------------------------------------------------------
  22. -------------------------------------------------------------------------------
  23. --$130-- views drop begin
  24. -------------------------------------------------------------------------------
  25. -------------------------------------------------------------------------------
  26. --$140-- tables drop begin
  27. -------------------------------------------------------------------------------
  28. -------------------------------------------------------------------------------
  29. --$200-- recreate tables begin
  30. -------------------------------------------------------------------------------
  31. CREATE TABLE NC_TASKSCHEDULE_CANCELLED_RUNS (
  32. FK_TASKSCHEDULE_ID INTEGER NOT NULL,
  33. CANCELLED_DATE NUMERIC(14) NOT NULL
  34. );
  35. -------------------------------------------------------------------------------
  36. --$201-- indices create begin
  37. -------------------------------------------------------------------------------
  38. CREATE INDEX I1N_CANCELLED_DATE ON NC_TASKSCHEDULE_CANCELLED_RUNS (
  39. FK_TASKSCHEDULE_ID);
  40. -------------------------------------------------------------------------------
  41. --$202-- primary keys add begin
  42. -------------------------------------------------------------------------------
  43. ALTER TABLE NC_TASKSCHEDULE_CANCELLED_RUNS
  44. ADD CONSTRAINT PN_CANCELLED_DATES PRIMARY KEY (FK_TASKSCHEDULE_ID,CANCELLED_DATE));
  45. -------------------------------------------------------------------------------
  46. --$203-- alter tables begin
  47. -------------------------------------------------------------------------------
  48. -------------------------------------------------------------------------------
  49. --$210-- views create begin
  50. -------------------------------------------------------------------------------
  51. -------------------------------------------------------------------------------
  52. --$220-- server data inserts begin
  53. -------------------------------------------------------------------------------
  54. INSERT INTO NC_DB_VERSION (DB_VERSION_ID,BUILD) VALUES (5,'build no.');
  55. -------------------------------------------------------------------------------
  56. --$230-- restore inserts begin
  57. -------------------------------------------------------------------------------
  58. -------------------------------------------------------------------------------
  59. --$240-- foreign keys add begin
  60. -------------------------------------------------------------------------------
  61. -------------------------------------------------------------------------------
  62. --$250-- backup drop begin
  63. -------------------------------------------------------------------------------
  64. -------------------------------------------------------------------------------
  65. --$260-- end sql by function
  66. -------------------------------------------------------------------------------
  67. --END NC5_UPDATE_DB2.SQL * DO NOT EDIT * COMMIT
  68. -------------------------------------------------------------------------------