1 | ALTER TABLE `Task` ENGINE = InnoDB;
|
---|
2 | ALTER TABLE `Backup` ENGINE = InnoDB;
|
---|
3 | ALTER TABLE `Database` ENGINE = InnoDB;
|
---|
4 | ALTER TABLE `Client` ENGINE = InnoDB;
|
---|
5 | ALTER TABLE `Debug` ENGINE = InnoDB;
|
---|
6 | ALTER TABLE `Emulator` ENGINE = InnoDB;
|
---|
7 | ALTER TABLE `History` ENGINE = InnoDB;
|
---|
8 | ALTER TABLE `Log` ENGINE = InnoDB;
|
---|
9 | ALTER TABLE `User` ENGINE = InnoDB;
|
---|
10 | ALTER TABLE `UserOnline` ENGINE = InnoDB;
|
---|
11 | ALTER TABLE `News` ENGINE = InnoDB;
|
---|
12 | ALTER TABLE `Server` ENGINE = InnoDB;
|
---|
13 |
|
---|
14 | ALTER TABLE `Emulator` ADD INDEX ( `Client` ) ;
|
---|
15 | ALTER TABLE `Emulator` ADD FOREIGN KEY ( `Client` ) REFERENCES `Client` (`Id`);
|
---|
16 |
|
---|
17 | ALTER TABLE `Debug` ADD INDEX ( `Server` ) ;
|
---|
18 | ALTER TABLE `Debug` ADD FOREIGN KEY ( `Server` ) REFERENCES `Server` (`Id`);
|
---|
19 |
|
---|
20 | ALTER TABLE `Backup` ADD INDEX ( `Server` ) ;
|
---|
21 | ALTER TABLE `Backup` ADD INDEX ( `Database` ) ;
|
---|
22 |
|
---|
23 | ALTER TABLE `UserOnline` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
|
---|
24 |
|
---|
25 | ALTER TABLE `Task` CHANGE `User` `User` INT( 11 ) NULL ;
|
---|
26 | UPDATE `Task` SET `User` = NULL WHERE `User` = 0;
|
---|
27 | ALTER TABLE `Task` ADD INDEX ( `User` ) ;
|
---|
28 | ALTER TABLE `Task` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
|
---|
29 |
|
---|
30 | ALTER TABLE `Server` ADD INDEX ( `User` ) ;
|
---|
31 | ALTER TABLE `Server` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
|
---|
32 | ALTER TABLE `Server` ADD INDEX ( `Database` ) ;
|
---|
33 | ALTER TABLE `Server` ADD FOREIGN KEY ( `Database` ) REFERENCES `Database` (`Id`);
|
---|
34 |
|
---|
35 | ALTER TABLE `News` ADD INDEX ( `User` ) ;
|
---|
36 | ALTER TABLE `News` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
|
---|
37 |
|
---|
38 | ALTER TABLE `Log` ADD INDEX ( `User` ) ;
|
---|
39 | ALTER TABLE `Log` ADD FOREIGN KEY ( `User` ) REFERENCES `User` (`Id`);
|
---|
40 |
|
---|
41 | ALTER TABLE `History` ADD FOREIGN KEY ( `Server` ) REFERENCES `Server` (`Id`);
|
---|
42 |
|
---|
43 | ALTER TABLE `Database` ADD INDEX ( `Emulator` ) ;
|
---|
44 | ALTER TABLE `Database` CHANGE `Emulator` `Emulator` INT( 11 ) NULL ;
|
---|
45 | UPDATE `Database` SET `Emulator` = NULL WHERE `Emulator` = 0;
|
---|
46 | ALTER TABLE `Database` ADD FOREIGN KEY ( `Emulator` ) REFERENCES `Emulator` (`Id`);
|
---|
47 |
|
---|