Code re-style.

This commit is contained in:
2020-08-05 21:00:35 +01:00
parent 6f728047c3
commit 569eaa09f6
142 changed files with 5327 additions and 2877 deletions

View File

@@ -40,48 +40,46 @@ namespace Marechai.Database.Schemas.Sql
public static readonly string Companies = V14.Companies;
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
"`model` char(50) NOT NULL DEFAULT '',;\n" +
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
"`gpu` int(11) DEFAULT NULL,;\n" +
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
"`res` char(10) NOT NULL DEFAULT '',;\n" +
"`sound_synth` int(11) NOT NULL DEFAULT '0',;\n" +
"`music_synth` int(11) NOT NULL DEFAULT '0',;\n" +
"`sound_channels` int(11) NOT NULL DEFAULT '0',;\n" +
"`music_channels` int(11) NOT NULL DEFAULT '0',;\n" +
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
"`hdd2` int(11) DEFAULT NULL,;\n" +
"`hdd3` int(11) DEFAULT NULL,;\n" +
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
"`disk2` int(11) DEFAULT NULL,;\n" +
"`cap2` char(25) DEFAULT NULL,;\n" +
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
"PRIMARY KEY (`id`),;\n" +
"KEY `idx_machines_company` (`company`),;\n" +
"KEY `idx_machines_year` (`year`),;\n" +
"KEY `idx_machines_model` (`model`),;\n" +
"KEY `idx_machines_ram` (`ram`),;\n" +
"KEY `idx_machines_rom` (`rom`),;\n" +
"KEY `idx_machines_gpu` (`gpu`),;\n" +
"KEY `idx_machines_vram` (`vram`),;\n" +
"KEY `idx_machines_colors` (`colors`),;\n" +
"KEY `idx_machines_res` (`res`),;\n" +
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
"`model` char(50) NOT NULL DEFAULT '',;\n" +
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
"`gpu` int(11) DEFAULT NULL,;\n" +
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
"`res` char(10) NOT NULL DEFAULT '',;\n" +
"`sound_synth` int(11) NOT NULL DEFAULT '0',;\n" +
"`music_synth` int(11) NOT NULL DEFAULT '0',;\n" +
"`sound_channels` int(11) NOT NULL DEFAULT '0',;\n" +
"`music_channels` int(11) NOT NULL DEFAULT '0',;\n" +
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
"`hdd2` int(11) DEFAULT NULL,;\n" + "`hdd3` int(11) DEFAULT NULL,;\n" +
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
"`disk2` int(11) DEFAULT NULL,;\n" +
"`cap2` char(25) DEFAULT NULL,;\n" +
"`type` int(11) NOT NULL DEFAULT '0',;\n" + "PRIMARY KEY (`id`),;\n" +
"KEY `idx_machines_company` (`company`),;\n" +
"KEY `idx_machines_year` (`year`),;\n" +
"KEY `idx_machines_model` (`model`),;\n" +
"KEY `idx_machines_ram` (`ram`),;\n" +
"KEY `idx_machines_rom` (`rom`),;\n" +
"KEY `idx_machines_gpu` (`gpu`),;\n" +
"KEY `idx_machines_vram` (`vram`),;\n" +
"KEY `idx_machines_colors` (`colors`),;\n" +
"KEY `idx_machines_res` (`res`),;\n" +
"KEY `idx_machines_sound_synth` (`sound_synth`),;\n" +
"KEY `idx_machines_music_synth` (`music_synth`),;\n" +
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
"KEY `idx_machines_disk1` (`disk1`),;\n" +
"KEY `idx_machines_disk2` (`disk2`),;\n" +
"KEY `idx_machines_cap1` (`cap1`),;\n" +
"KEY `idx_machines_cap2` (`cap2`),;\n" +
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
"KEY `idx_machines_disk1` (`disk1`),;\n" +
"KEY `idx_machines_disk2` (`disk2`),;\n" +
"KEY `idx_machines_cap1` (`cap1`),;\n" +
"KEY `idx_machines_cap2` (`cap2`),;\n" +
"KEY `idx_machines_type` (`type`));";
public static readonly string DiskFormats = V14.DiskFormats;
@@ -105,13 +103,13 @@ namespace Marechai.Database.Schemas.Sql
public static readonly string SoundSynths = V14.SoundSynths;
public static readonly string MachinesForeignKeys =
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_gpu` (gpu) REFERENCES `gpus` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_gpu` (gpu) REFERENCES `gpus` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_music_synth` (music_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;\n" +
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_sound_synth` (sound_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;";
@@ -131,15 +129,14 @@ namespace Marechai.Database.Schemas.Sql
public static readonly string InstructionSetExtensionsByProcessor = V14.InstructionSetExtensionsByProcessor;
public static readonly string ProcessorsByMachine =
"CREATE TABLE `processors_by_machine` (\n" +
"`processor` INT NOT NULL, \n" +
"`machine` INT NOT NULL,\n" +
"`speed` FLOAT DEFAULT NULL, \n" +
"KEY `idx_processors_by_machine_processor` (`processor`),\n" +
"KEY `idx_processors_by_machine_machine` (`machine`),\n" +
"KEY `idx_processors_by_machine_speed` (`speed`),\n" +
"CONSTRAINT `fk_processors_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
"CONSTRAINT `fk_processors_by_machine_processor` FOREIGN KEY (`processor`) REFERENCES `processors` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
public static readonly string ProcessorsByMachine = "CREATE TABLE `processors_by_machine` (\n" +
"`processor` INT NOT NULL, \n" +
"`machine` INT NOT NULL,\n" +
"`speed` FLOAT DEFAULT NULL, \n" +
"KEY `idx_processors_by_machine_processor` (`processor`),\n" +
"KEY `idx_processors_by_machine_machine` (`machine`),\n" +
"KEY `idx_processors_by_machine_speed` (`speed`),\n" +
"CONSTRAINT `fk_processors_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
"CONSTRAINT `fk_processors_by_machine_processor` FOREIGN KEY (`processor`) REFERENCES `processors` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
}
}