home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 132 / dpcs0299.iso / Business / Talk / Win32 / modify.sq_ < prev    next >
Encoding:
Text File  |  1998-09-17  |  3.3 KB  |  74 lines

  1. if (exists (select * from sys.systable where table_name = 'RcvdRecipients')) then
  2.     alter table "RcvdRecipients" rename "Forwarded_From" TO "Forwarded From";
  3.     alter table "RcvdRecipients" delete primary key;
  4.     alter table "RcvdRecipients" modify "ID" default autoincrement;
  5.     create unique index "KeyIndex" on "RcvdRecipients" ("ID" ASC);
  6. end if;
  7.  
  8. if (exists (select * from sys.systable where table_name = 'RcvdMessages')) then
  9.     alter table "RcvdMessages" rename "Send_Time" TO "Send Time";
  10.     alter table "RcvdMessages" delete primary key;
  11.     alter table "RcvdMessages" modify "ID" default autoincrement;
  12.     create unique index "KeyIndex" on "RcvdMessages" ("ID" ASC);
  13. end if;
  14.  
  15. if (exists (select * from sys.systable where table_name = 'RcvdAttachments')) then
  16.     alter table "RcvdAttachments" rename "Display_Name" TO "Display Name";
  17.     alter table "RcvdAttachments" delete primary key;
  18.     alter table "RcvdAttachments" modify "ID" default autoincrement;
  19.     create unique index "KeyIndex" on "RcvdAttachments" ("ID" ASC);
  20. end if;
  21.  
  22. if (exists (select * from sys.systable where table_name = 'SentRecipients')) then
  23.     alter table "SentRecipients" rename "Forwarded_From" TO "Forwarded From";
  24.     alter table "SentRecipients" delete primary key;
  25.     alter table "SentRecipients" modify "ID" default autoincrement;
  26.     create unique index "KeyIndex" on "SentRecipients" ("ID" ASC);
  27. end if;
  28.  
  29. if (exists (select * from sys.systable where table_name = 'SentAttachments')) then
  30.     alter table "SentAttachments" rename "Display_Name" TO "Display Name";
  31.     alter table "SentAttachments" delete primary key;
  32.     alter table "SentAttachments" modify "ID" default autoincrement;
  33.     create unique index "KeyIndex" on "SentAttachments" ("ID" ASC);
  34. end if;
  35.  
  36. if (exists (select * from sys.systable where table_name = 'SentMessages')) then
  37.     alter table "SentMessages" rename "Send_Time" TO "Send Time";
  38.     alter table "SentMessages" delete primary key;
  39.     alter table "SentMessages" modify "ID" default autoincrement;
  40.     create unique index "KeyIndex" on "SentMessages" ("ID" ASC);
  41. end if;
  42.  
  43. if (exists (select * from sys.systable where table_name = 'EventLog')) then
  44.     alter table "EventLog" rename "Event_Type" TO "Event Type";
  45.     alter table "EventLog" rename "Operation_Type" TO "Operation Type";
  46.     alter table "EventLog" delete primary key;
  47.     alter table "EventLog" modify "ID" default autoincrement;
  48.     create unique index "KeyIndex" on "EventLog" ("ID" ASC);
  49. end if;
  50.  
  51. if (exists (select * from sys.systable where table_name = 'ChngItems')) then
  52.     alter table "ChngItems" delete primary key;
  53.     alter table "ChngItems" modify "ID" default autoincrement;
  54. end if;
  55.  
  56. if (exists (select * from sys.systable where table_name = 'RcvdData')) then
  57.     alter table "RcvdData" delete primary key;
  58.     alter table "RcvdData" modify "ID" default autoincrement;
  59.     create unique index "KeyIndex" on "RcvdData" ("ID" ASC);
  60. end if;
  61.  
  62. if (exists (select * from sys.systable where table_name = 'SentData')) then
  63.     alter table "SentData" delete primary key;
  64.     alter table "SentData" modify "ID" default autoincrement;
  65.     create unique index "KeyIndex" on "SentData" ("ID" ASC);
  66. end if;
  67.  
  68. if (exists (select * from sys.systable where table_name = 'BinItems')) then
  69.     alter table "BinItems" modify "ID" not null;
  70.     alter table "BinItems" modify "ID" default autoincrement;
  71. end if;
  72.  
  73. commit; 
  74.