source: trunk/www/SQL/Updates/48.sql

Last change on this file was 69, checked in by george, 15 years ago
  • Rozpracovaná verze.
  • Přeorganizována struktura souborů projektu.
  • Názvy přepány na stejné s prvním velkým písmenem.
  • Uživatelské podsložky přesunuty do podsložky Application, systémové do podsložky Base.
  • Použití koncepce Model-View-Controller.
File size: 1.9 KB
Line 
1ALTER TABLE `Task` ENGINE = InnoDB;
2ALTER TABLE `Backup` ENGINE = InnoDB;
3ALTER TABLE `Database` ENGINE = InnoDB;
4ALTER TABLE `Client` ENGINE = InnoDB;
5ALTER TABLE `Debug` ENGINE = InnoDB;
6ALTER TABLE `Emulator` ENGINE = InnoDB;
7ALTER TABLE `History` ENGINE = InnoDB;
8ALTER TABLE `Log` ENGINE = InnoDB;
9ALTER TABLE `User` ENGINE = InnoDB;
10ALTER TABLE `UserOnline` ENGINE = InnoDB;
11ALTER TABLE `News` ENGINE = InnoDB;
12ALTER TABLE `Server` ENGINE = InnoDB;
13
14ALTER TABLE `Emulator` ADD INDEX ( `Client` ) ;
15ALTER TABLE `Emulator` ADD FOREIGN KEY ( `Client` ) REFERENCES `Client` (`Id`);
16
17ALTER TABLE `Debug` ADD INDEX ( `Server` ) ;
18ALTER TABLE `Debug` ADD FOREIGN KEY ( `Server` ) REFERENCES `Server` (`Id`);
19
20ALTER TABLE `Backup` ADD INDEX ( `Server` ) ;
21ALTER TABLE `Backup` ADD INDEX ( `Database` ) ;
22
23ALTER TABLE `UserOnline` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
24
25ALTER TABLE `Task` CHANGE `User` `User` INT( 11 ) NULL ;
26UPDATE `Task` SET `User` = NULL WHERE `User` = 0;
27ALTER TABLE `Task` ADD INDEX ( `User` ) ;
28ALTER TABLE `Task` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
29
30ALTER TABLE `Server` ADD INDEX ( `User` ) ;
31ALTER TABLE `Server` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
32ALTER TABLE `Server` ADD INDEX ( `Database` ) ;
33ALTER TABLE `Server` ADD FOREIGN KEY ( `Database` ) REFERENCES `Database` (`Id`);
34
35ALTER TABLE `News` ADD INDEX ( `User` ) ;
36ALTER TABLE `News` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
37
38ALTER TABLE `Log` ADD INDEX ( `User` ) ;
39ALTER TABLE `Log` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
40
41ALTER TABLE `History` ADD FOREIGN KEY ( `Server` ) REFERENCES `Server` (`Id`);
42
43ALTER TABLE `Database` ADD INDEX ( `Emulator` ) ;
44ALTER TABLE `Database` CHANGE `Emulator` `Emulator` INT( 11 ) NULL ;
45UPDATE `Database` SET `Emulator` = NULL WHERE `Emulator` = 0;
46ALTER TABLE `Database` ADD FOREIGN KEY ( `Emulator` ) REFERENCES `Emulator` (`Id`);
47
Note: See TracBrowser for help on using the repository browser.