mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Rebrand database project.
This commit is contained in:
168
Marechai.Database/Schemas/Sql/V10.cs
Normal file
168
Marechai.Database/Schemas/Sql/V10.cs
Normal file
@@ -0,0 +1,168 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V10.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 10.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V10
|
||||
{
|
||||
public static readonly string Admins = V9.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V9.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('10');";
|
||||
|
||||
public static readonly string Companies = V9.Companies;
|
||||
|
||||
public static readonly string Computers = V9.Computers;
|
||||
|
||||
public static readonly string Consoles = V9.Consoles;
|
||||
|
||||
public static readonly string DiskFormats = V9.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V9.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V9.Gpus;
|
||||
|
||||
public static readonly string Logs = V9.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V9.MoneyDonations;
|
||||
|
||||
public static readonly string MusicSynths = V9.MusicSynths;
|
||||
|
||||
public static readonly string News = V9.News;
|
||||
|
||||
public static readonly string OwnedComputers = V9.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V9.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors =
|
||||
"CREATE TABLE `processors` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`company` int(11) DEFAULT NULL,\n" +
|
||||
"`model_code` varchar(45) DEFAULT NULL,\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`instruction_set` int(11) DEFAULT NULL,\n" +
|
||||
"`speed` double DEFAULT NULL,\n" +
|
||||
"`package` varchar(45) DEFAULT NULL,\n" +
|
||||
"`GPRs` int(11) DEFAULT NULL,\n" +
|
||||
"`GPR_size` int(11) DEFAULT NULL,\n" +
|
||||
"`FPRs` int(11) DEFAULT NULL,\n" +
|
||||
"`FPR_size` int(11) DEFAULT NULL,\n" +
|
||||
"`cores` int(11) DEFAULT NULL,\n" +
|
||||
"`threads_per_core` int(11) DEFAULT NULL,\n" +
|
||||
"`process` varchar(45) DEFAULT NULL,\n" +
|
||||
"`process_nm` float DEFAULT NULL,\n" +
|
||||
"`die_size` float DEFAULT NULL,\n" +
|
||||
"`transistors` bigint(20) DEFAULT NULL,\n" +
|
||||
"`data_bus` int(11) DEFAULT NULL,\n" +
|
||||
"`addr_bus` int(11) DEFAULT NULL,\n" +
|
||||
"`SIMD_registers` int(11) DEFAULT NULL,\n" +
|
||||
"`SIMD_size` int(11) DEFAULT NULL,\n" +
|
||||
"`L1_instruction` float DEFAULT NULL,\n" +
|
||||
"`L1_data` float DEFAULT NULL,\n" +
|
||||
"`L2` float DEFAULT NULL,\n" +
|
||||
"`L3` float DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_processors_name` (`name`),\n" +
|
||||
"KEY `idx_processors_company` (`company`),\n" +
|
||||
"KEY `idx_processors_model_code` (`model_code`),\n" +
|
||||
"KEY `idx_processors_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_processors_instruction_set` (`instruction_set`),\n" +
|
||||
"KEY `idx_processors_speed` (`speed`),\n" +
|
||||
"KEY `idx_processors_package` (`package`),\n" +
|
||||
"KEY `idx_processors_GPRs` (`GPRs`),\n" +
|
||||
"KEY `idx_processors_GPR_size` (`GPR_size`),\n" +
|
||||
"KEY `idx_processors_FPRs` (`FPRs`),\n" +
|
||||
"KEY `idx_processors_FPR_size` (`FPR_size`),\n" +
|
||||
"KEY `idx_processors_cores` (`cores`),\n" +
|
||||
"KEY `idx_processors_threads_per_core` (`threads_per_core`),\n" +
|
||||
"KEY `idx_processors_process` (`process`),\n" +
|
||||
"KEY `idx_processors_process_nm` (`process_nm`),\n" +
|
||||
"KEY `idx_processors_die_size` (`die_size`),\n" +
|
||||
"KEY `idx_processors_transistors` (`transistors`),\n" +
|
||||
"KEY `idx_processors_data_bus` (`data_bus`),\n" +
|
||||
"KEY `idx_processors_addr_bus` (`addr_bus`),\n" +
|
||||
"KEY `idx_processors_SIMD_registers` (`SIMD_registers`),\n" +
|
||||
"KEY `idx_processors_SIMD_size` (`SIMD_size`),\n" +
|
||||
"KEY `idx_processors_L1_instruction` (`L1_instruction`),\n" +
|
||||
"KEY `idx_processors_L1_data` (`L1_data`),\n" +
|
||||
"KEY `idx_processors_L2` (`L2`),\n" +
|
||||
"KEY `idx_processors_L3` (`L3`),\n" +
|
||||
"CONSTRAINT `fk_processors_company` FOREIGN KEY (`company`) REFERENCES `companies` (`id`) ON UPDATE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_processors_instruction_set` FOREIGN KEY (`instruction_set`) REFERENCES `instruction_sets` (`id`) ON UPDATE CASCADE);";
|
||||
|
||||
public static readonly string SoundSynths = V9.SoundSynths;
|
||||
|
||||
public static readonly string ComputersForeignKeys = V9.ComputersForeignKeys;
|
||||
|
||||
public static readonly string ConsolesForeignKeys = V9.ConsolesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = V9.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V9.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V9.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V9.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V9.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = "CREATE TABLE IF NOT EXISTS `instruction_sets` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`instruction_set` VARCHAR(45) NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`));";
|
||||
|
||||
public static readonly string InstructionSetExtensions =
|
||||
"CREATE TABLE IF NOT EXISTS `instruction_set_extensions` (\n" + "`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`extension` VARCHAR(45) NOT NULL,\n" + "PRIMARY KEY (`id`));";
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor =
|
||||
"CREATE TABLE IF NOT EXISTS `instruction_set_extensions_by_processor` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`processor_id` INT NOT NULL,\n" +
|
||||
"`extension_id` INT NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`, `processor_id`, `extension_id`),\n" +
|
||||
"INDEX `idx_setextension_processor` (`processor_id` ASC),\n" +
|
||||
"INDEX `idx_setextension_extension` (`extension_id` ASC),\n" +
|
||||
"CONSTRAINT `fk_extension_processor_id`\n" +
|
||||
"FOREIGN KEY (`processor_id`)\n" +
|
||||
"REFERENCES `processors` (`id`)\n" + "ON DELETE RESTRICT\n" +
|
||||
"ON UPDATE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_extension_extension_id`\n" + "FOREIGN KEY (`extension_id`)\n" +
|
||||
"REFERENCES `instruction_set_extensions` (`id`)\n" +
|
||||
"ON DELETE RESTRICT\n" + "ON UPDATE CASCADE);";
|
||||
}
|
||||
}
|
||||
114
Marechai.Database/Schemas/Sql/V11.cs
Normal file
114
Marechai.Database/Schemas/Sql/V11.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V11.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 11.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V11
|
||||
{
|
||||
public static readonly string Admins = V10.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V10.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('11');";
|
||||
|
||||
public static readonly string Companies = V10.Companies;
|
||||
|
||||
public static readonly string Computers = V10.Computers;
|
||||
|
||||
public static readonly string Consoles = V10.Consoles;
|
||||
|
||||
public static readonly string DiskFormats = V10.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V10.Forbidden;
|
||||
|
||||
public static readonly string Gpus = "CREATE TABLE `gpus` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` char(128) NOT NULL DEFAULT '',\n" +
|
||||
"`company` int(11) DEFAULT NULL,\n" +
|
||||
"`model_code` varchar(45) DEFAULT NULL,\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`package` varchar(45) DEFAULT NULL,\n" +
|
||||
"`process` varchar(45) DEFAULT NULL,\n" +
|
||||
"`process_nm` float DEFAULT NULL,\n" +
|
||||
"`die_size` float DEFAULT NULL,\n" +
|
||||
"`transistors` bigint(20) DEFAULT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_gpus_name` (`name`),\n" +
|
||||
"KEY `idx_gpus_company` (`company`),\n" +
|
||||
"KEY `idx_gpus_model_code` (`model_code`),\n" +
|
||||
"KEY `idx_gpus_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_gpus_package` (`package`),\n" +
|
||||
"KEY `idx_gpus_process` (`process`),\n" +
|
||||
"KEY `idx_gpus_process_nm` (`process_nm`),\n" +
|
||||
"KEY `idx_gpus_die_size` (`die_size`),\n" +
|
||||
"KEY `idx_gpus_transistors` (`transistors`),\n" +
|
||||
"CONSTRAINT `fk_gpus_company` FOREIGN KEY (`company`) REFERENCES `companies` (`id`) ON UPDATE CASCADE);";
|
||||
|
||||
public static readonly string Logs = V10.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V10.MoneyDonations;
|
||||
|
||||
public static readonly string MusicSynths = V10.MusicSynths;
|
||||
|
||||
public static readonly string News = V10.News;
|
||||
|
||||
public static readonly string OwnedComputers = V10.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V10.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V10.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V10.SoundSynths;
|
||||
|
||||
public static readonly string ComputersForeignKeys = V10.ComputersForeignKeys;
|
||||
|
||||
public static readonly string ConsolesForeignKeys = V10.ConsolesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = V10.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V10.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V10.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V10.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V10.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V10.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V10.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V10.InstructionSetExtensionsByProcessor;
|
||||
}
|
||||
}
|
||||
189
Marechai.Database/Schemas/Sql/V12.cs
Normal file
189
Marechai.Database/Schemas/Sql/V12.cs
Normal file
@@ -0,0 +1,189 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V12.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 12.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V12
|
||||
{
|
||||
public static readonly string Admins = V11.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V11.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('12');";
|
||||
|
||||
public static readonly string Companies = V11.Companies;
|
||||
|
||||
public static readonly string Computers = "CREATE TABLE `computers` (\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" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\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" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_computers_company` (`company`),\n" +
|
||||
"KEY `idx_computers_year` (`year`),\n" +
|
||||
"KEY `idx_computers_model` (`model`),\n" +
|
||||
"KEY `idx_computers_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_computers_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_computers_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_computers_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_computers_bits` (`bits`),\n" +
|
||||
"KEY `idx_computers_ram` (`ram`),\n" +
|
||||
"KEY `idx_computers_rom` (`rom`),\n" +
|
||||
"KEY `idx_computers_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_computers_vram` (`vram`),\n" +
|
||||
"KEY `idx_computers_colors` (`colors`),\n" +
|
||||
"KEY `idx_computers_res` (`res`),\n" +
|
||||
"KEY `idx_computers_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_computers_music_synth` (`music_synth`),\n" +
|
||||
"KEY `idx_computers_hdd1` (`hdd1`),\n" +
|
||||
"KEY `idx_computers_hdd2` (`hdd2`),\n" +
|
||||
"KEY `idx_computers_hdd3` (`hdd3`),\n" +
|
||||
"KEY `idx_computers_disk1` (`disk1`),\n" +
|
||||
"KEY `idx_computers_disk2` (`disk2`),\n" +
|
||||
"KEY `idx_computers_cap1` (`cap1`),\n" +
|
||||
"KEY `idx_computers_cap2` (`cap2`))";
|
||||
|
||||
public static readonly string Consoles = "CREATE TABLE `consoles` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\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" +
|
||||
"`res` char(11) NOT NULL DEFAULT '',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`palette` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`schannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`mchannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`format` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_consoles_company` (`company`),\n" +
|
||||
"KEY `idx_consoles_year` (`year`),\n" +
|
||||
"KEY `idx_consoles_model` (`model`),\n" +
|
||||
"KEY `idx_consoles_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_consoles_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_consoles_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_consoles_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_consoles_bits` (`bits`),\n" +
|
||||
"KEY `idx_consoles_ram` (`ram`),\n" +
|
||||
"KEY `idx_consoles_rom` (`rom`),\n" +
|
||||
"KEY `idx_consoles_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_consoles_vram` (`vram`),\n" +
|
||||
"KEY `idx_consoles_colors` (`colors`),\n" +
|
||||
"KEY `idx_consoles_res` (`res`),\n" +
|
||||
"KEY `idx_consoles_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_consoles_music_synth` (`music_synth`),\n" +
|
||||
"KEY `idx_consoles_palette` (`palette`),\n" +
|
||||
"KEY `idx_consoles_format` (`format`),\n" +
|
||||
"KEY `idx_consoles_cap` (`cap`));";
|
||||
|
||||
public static readonly string DiskFormats = V11.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V11.Forbidden;
|
||||
|
||||
public static readonly string Gpus =
|
||||
V11.Gpus + "\n" +
|
||||
$"INSERT INTO `gpus` (`id`, `name`) VALUES ({Operations.DB_NONE}, `DB_NONE`);\n" +
|
||||
$"INSERT INTO `gpus` (`id`, `name`) VALUES ({Operations.DB_SOFTWARE}, `DB_FRAMEBUFFER`);";
|
||||
|
||||
public static readonly string Logs = V11.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V11.MoneyDonations;
|
||||
|
||||
public static readonly string MusicSynths = V11.MusicSynths;
|
||||
|
||||
public static readonly string News = V11.News;
|
||||
|
||||
public static readonly string OwnedComputers = V11.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V11.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V11.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V11.SoundSynths;
|
||||
|
||||
public static readonly string ComputersForeignKeys = V11.ComputersForeignKeys;
|
||||
|
||||
public static readonly string ConsolesForeignKeys = V11.ConsolesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = V11.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V11.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V11.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V11.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V11.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V11.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V11.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V11.InstructionSetExtensionsByProcessor;
|
||||
}
|
||||
}
|
||||
225
Marechai.Database/Schemas/Sql/V13.cs
Normal file
225
Marechai.Database/Schemas/Sql/V13.cs
Normal file
@@ -0,0 +1,225 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V13.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 13.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V13
|
||||
{
|
||||
public static readonly string Admins = V12.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V12.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('13');";
|
||||
|
||||
public static readonly string Companies = V12.Companies;
|
||||
|
||||
public static readonly string Computers = "CREATE TABLE `computers` (\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" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\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" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_computers_company` (`company`),\n" +
|
||||
"KEY `idx_computers_year` (`year`),\n" +
|
||||
"KEY `idx_computers_model` (`model`),\n" +
|
||||
"KEY `idx_computers_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_computers_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_computers_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_computers_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_computers_bits` (`bits`),\n" +
|
||||
"KEY `idx_computers_ram` (`ram`),\n" +
|
||||
"KEY `idx_computers_rom` (`rom`),\n" +
|
||||
"KEY `idx_computers_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_computers_vram` (`vram`),\n" +
|
||||
"KEY `idx_computers_colors` (`colors`),\n" +
|
||||
"KEY `idx_computers_res` (`res`),\n" +
|
||||
"KEY `idx_computers_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_computers_music_synth` (`music_synth`),\n" +
|
||||
"KEY `idx_computers_hdd1` (`hdd1`),\n" +
|
||||
"KEY `idx_computers_hdd2` (`hdd2`),\n" +
|
||||
"KEY `idx_computers_hdd3` (`hdd3`),\n" +
|
||||
"KEY `idx_computers_disk1` (`disk1`),\n" +
|
||||
"KEY `idx_computers_disk2` (`disk2`),\n" +
|
||||
"KEY `idx_computers_cap1` (`cap1`),\n" +
|
||||
"KEY `idx_computers_cap2` (`cap2`));";
|
||||
|
||||
public static readonly string Consoles = "CREATE TABLE `consoles` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\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" +
|
||||
"`res` char(11) NOT NULL DEFAULT '',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`palette` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`schannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`mchannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`format` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_consoles_company` (`company`),\n" +
|
||||
"KEY `idx_consoles_year` (`year`),\n" +
|
||||
"KEY `idx_consoles_model` (`model`),\n" +
|
||||
"KEY `idx_consoles_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_consoles_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_consoles_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_consoles_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_consoles_bits` (`bits`),\n" +
|
||||
"KEY `idx_consoles_ram` (`ram`),\n" +
|
||||
"KEY `idx_consoles_rom` (`rom`),\n" +
|
||||
"KEY `idx_consoles_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_consoles_vram` (`vram`),\n" +
|
||||
"KEY `idx_consoles_colors` (`colors`),\n" +
|
||||
"KEY `idx_consoles_res` (`res`),\n" +
|
||||
"KEY `idx_consoles_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_consoles_music_synth` (`music_synth`),\n" +
|
||||
"KEY `idx_consoles_palette` (`palette`),\n" +
|
||||
"KEY `idx_consoles_format` (`format`),\n" +
|
||||
"KEY `idx_consoles_cap` (`cap`));";
|
||||
|
||||
public static readonly string DiskFormats = V12.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V12.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V12.Gpus;
|
||||
|
||||
public static readonly string Logs = V12.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V12.MoneyDonations;
|
||||
|
||||
public static readonly string News = V12.News;
|
||||
|
||||
public static readonly string OwnedComputers = V12.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V12.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V12.Processors;
|
||||
|
||||
public static readonly string SoundSynths = "CREATE TABLE `sound_synths` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`company` int(11) DEFAULT NULL,\n" +
|
||||
"`model_code` varchar(45) DEFAULT NULL,\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`voices` int(11) DEFAULT NULL,\n" +
|
||||
"`frequency` double DEFAULT NULL,\n" +
|
||||
"`depth` int(11) DEFAULT NULL,\n" +
|
||||
"`square_wave` int(11) DEFAULT NULL,\n" +
|
||||
"`white_noise` int(11) DEFAULT NULL,\n" +
|
||||
"`type` int(11) DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_sound_synths_name` (`name`),\n" +
|
||||
"KEY `idx_sound_synths_company` (`company`),\n" +
|
||||
"KEY `idx_sound_synths_model_code` (`model_code`),\n" +
|
||||
"KEY `idx_sound_synths_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_sound_synths_voices` (`voices`),\n" +
|
||||
"KEY `idx_sound_synths_frequency` (`frequency`),\n" +
|
||||
"KEY `idx_sound_synths_depth` (`depth`),\n" +
|
||||
"KEY `idx_sound_synths_square_wave` (`square_wave`),\n" +
|
||||
"KEY `idx_sound_synths_white_noise` (`white_noise`),\n" +
|
||||
"KEY `idx_sound_synths_type` (`type`),\n" +
|
||||
"CONSTRAINT `fk_sound_synths_company` FOREIGN KEY (`company`) REFERENCES `companies` (`id`) ON UPDATE CASCADE);";
|
||||
|
||||
public static readonly string ComputersForeignKeys =
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_music_synth (music_synth) REFERENCES sound_synths (id) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd1 (hdd1) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd2 (hdd2) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd3 (hdd3) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_disk1 (disk1) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_disk2 (disk2) REFERENCES disk_formats (id);";
|
||||
|
||||
public static readonly string ConsolesForeignKeys =
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_music_synth (music_synth) REFERENCES sound_synths (id) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_format (format) REFERENCES disk_formats (id);";
|
||||
|
||||
public static readonly string Iso3166Numeric = V12.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V12.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V12.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V12.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V12.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V12.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V12.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V12.InstructionSetExtensionsByProcessor;
|
||||
}
|
||||
}
|
||||
149
Marechai.Database/Schemas/Sql/V14.cs
Normal file
149
Marechai.Database/Schemas/Sql/V14.cs
Normal file
@@ -0,0 +1,149 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V14.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 14.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V14
|
||||
{
|
||||
public static readonly string Admins = V13.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V13.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('14');";
|
||||
|
||||
public static readonly string Companies = V13.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" +
|
||||
"`cpu1` int(11) DEFAULT NULL,;\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,;\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,;\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,;\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_cpu1` (`cpu1`),;\n" +
|
||||
"KEY `idx_machines_cpu2` (`cpu2`),;\n" +
|
||||
"KEY `idx_machines_mhz1` (`mhz1`),;\n" +
|
||||
"KEY `idx_machines_mhz2` (`mhz2`),;\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_type` (`type`));";
|
||||
|
||||
public static readonly string DiskFormats = V13.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V13.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V13.Gpus;
|
||||
|
||||
public static readonly string Logs = V13.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V13.MoneyDonations;
|
||||
|
||||
public static readonly string News = V13.News;
|
||||
|
||||
public static readonly string OwnedComputers = V13.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V13.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V13.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V13.SoundSynths;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V13.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = V13.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V13.Iso3166NumericValues;
|
||||
|
||||
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_cpu1` (cpu1) REFERENCES `processors` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_cpu2` (cpu2) REFERENCES `processors` (`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;";
|
||||
|
||||
public static readonly string CompanyLogos = V13.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V13.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V13.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V13.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V13.InstructionSetExtensionsByProcessor;
|
||||
}
|
||||
}
|
||||
150
Marechai.Database/Schemas/Sql/V15.cs
Normal file
150
Marechai.Database/Schemas/Sql/V15.cs
Normal file
@@ -0,0 +1,150 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V15.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 15.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V15
|
||||
{
|
||||
public static readonly string Admins = V14.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V14.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('15');";
|
||||
|
||||
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" +
|
||||
"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_type` (`type`));";
|
||||
|
||||
public static readonly string DiskFormats = V14.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V14.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V14.Gpus;
|
||||
|
||||
public static readonly string Logs = V14.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V14.MoneyDonations;
|
||||
|
||||
public static readonly string News = V14.News;
|
||||
|
||||
public static readonly string OwnedComputers = V14.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V14.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V14.Processors;
|
||||
|
||||
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_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;";
|
||||
|
||||
public static readonly string Iso3166Numeric = V14.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V14.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V14.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V14.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V14.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V14.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V14.InstructionSetExtensions;
|
||||
|
||||
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);";
|
||||
}
|
||||
}
|
||||
147
Marechai.Database/Schemas/Sql/V16.cs
Normal file
147
Marechai.Database/Schemas/Sql/V16.cs
Normal file
@@ -0,0 +1,147 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V16.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 16.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V16
|
||||
{
|
||||
public static readonly string Admins = V15.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V15.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('16');";
|
||||
|
||||
public static readonly string Companies = V15.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" +
|
||||
"`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_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_type` (`type`));";
|
||||
|
||||
public static readonly string DiskFormats = V15.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V15.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V15.Gpus;
|
||||
|
||||
public static readonly string Logs = V15.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V15.MoneyDonations;
|
||||
|
||||
public static readonly string News = V15.News;
|
||||
|
||||
public static readonly string OwnedComputers = V15.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V15.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V15.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V15.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_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;";
|
||||
|
||||
public static readonly string Iso3166Numeric = V15.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V15.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V15.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V15.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V15.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V15.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V15.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V15.InstructionSetExtensionsByProcessor;
|
||||
|
||||
public static readonly string ProcessorsByMachine = V15.ProcessorsByMachine;
|
||||
|
||||
public static readonly string GpusByMachine =
|
||||
"CREATE TABLE `gpus_by_machine` (\n" +
|
||||
"`gpu` INT NOT NULL, \n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"KEY `idx_gpus_by_machine_gpus` (`gpu`),\n" +
|
||||
"KEY `idx_gpus_by_machine_machine` (`machine`),\n" +
|
||||
"CONSTRAINT `fk_gpus_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_gpus_by_machine_gpu` FOREIGN KEY (`gpu`) REFERENCES `gpus` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
141
Marechai.Database/Schemas/Sql/V17.cs
Normal file
141
Marechai.Database/Schemas/Sql/V17.cs
Normal file
@@ -0,0 +1,141 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V17.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 17.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V17
|
||||
{
|
||||
public static readonly string Admins = V16.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V16.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`));\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('17');";
|
||||
|
||||
public static readonly string Companies = V16.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" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\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_vram` (`vram`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\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 = V16.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V16.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V16.Gpus;
|
||||
|
||||
public static readonly string Logs = V16.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V16.MoneyDonations;
|
||||
|
||||
public static readonly string News = V16.News;
|
||||
|
||||
public static readonly string OwnedComputers = V16.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V16.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V16.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V16.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_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;";
|
||||
|
||||
public static readonly string Iso3166Numeric = V16.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V16.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V16.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V16.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V16.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V16.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V16.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V16.InstructionSetExtensionsByProcessor;
|
||||
|
||||
public static readonly string ProcessorsByMachine = V16.ProcessorsByMachine;
|
||||
|
||||
public static readonly string GpusByMachine = V16.GpusByMachine;
|
||||
|
||||
public static readonly string SoundByMachine =
|
||||
"CREATE TABLE `sound_by_machine` (\n" +
|
||||
"`sound_synth` INT NOT NULL, \n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"KEY `idx_sound_by_machine_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_sound_by_machine_machine` (`machine`),\n" +
|
||||
"CONSTRAINT `fk_sound_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_sound_by_machine_sound_synth` FOREIGN KEY (`sound_synth`) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
135
Marechai.Database/Schemas/Sql/V18.cs
Normal file
135
Marechai.Database/Schemas/Sql/V18.cs
Normal file
@@ -0,0 +1,135 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V18.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 18.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V18
|
||||
{
|
||||
public static readonly string Admins = V17.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V17.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`));\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('18');";
|
||||
|
||||
public static readonly string Companies = V17.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" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\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_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\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 = V17.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V17.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V17.Gpus;
|
||||
|
||||
public static readonly string Logs = V17.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V17.MoneyDonations;
|
||||
|
||||
public static readonly string News = V17.News;
|
||||
|
||||
public static readonly string OwnedComputers = V17.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V17.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V17.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V17.SoundSynths;
|
||||
|
||||
public static readonly string MachinesForeignKeys = V17.MachinesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = V17.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V17.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V17.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V17.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V17.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V17.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V17.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V17.InstructionSetExtensionsByProcessor;
|
||||
|
||||
public static readonly string ProcessorsByMachine = V17.ProcessorsByMachine;
|
||||
|
||||
public static readonly string GpusByMachine = V17.GpusByMachine;
|
||||
|
||||
public static readonly string SoundByMachine = V17.SoundByMachine;
|
||||
|
||||
public static readonly string MemoryByMachine = "CREATE TABLE `memory_by_machine` (\n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"`type` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`usage` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`size` BIGINT DEFAULT NULL,\n" +
|
||||
"`speed` DOUBLE DEFAULT NULL,\n" +
|
||||
"KEY `idx_memory_by_machine_machine` (`machine`),\n" +
|
||||
"KEY `idx_memory_by_machine_type` (`type`),\n" +
|
||||
"KEY `idx_memory_by_machine_usage` (`usage`),\n" +
|
||||
"KEY `idx_memory_by_machine_size` (`size`),\n" +
|
||||
"KEY `idx_memory_by_machine_speed` (`speed`),\n" +
|
||||
"CONSTRAINT `fk_memory_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
145
Marechai.Database/Schemas/Sql/V19.cs
Normal file
145
Marechai.Database/Schemas/Sql/V19.cs
Normal file
@@ -0,0 +1,145 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V19.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 19.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V19
|
||||
{
|
||||
public static readonly string Admins = V18.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V18.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`));\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('19');";
|
||||
|
||||
public static readonly string Companies = V18.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" +
|
||||
"`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_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 = V18.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V18.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V18.Gpus;
|
||||
|
||||
public static readonly string Logs = V18.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V18.MoneyDonations;
|
||||
|
||||
public static readonly string News = V18.News;
|
||||
|
||||
public static readonly string OwnedComputers = V18.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V18.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V18.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V18.SoundSynths;
|
||||
|
||||
public static readonly string MachinesForeignKeys = V18.MachinesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = V18.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V18.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V18.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V18.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V18.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V18.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V18.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V18.InstructionSetExtensionsByProcessor;
|
||||
|
||||
public static readonly string ProcessorsByMachine = V18.ProcessorsByMachine;
|
||||
|
||||
public static readonly string GpusByMachine = V18.GpusByMachine;
|
||||
|
||||
public static readonly string SoundByMachine = V18.SoundByMachine;
|
||||
|
||||
public static readonly string MemoryByMachine = V18.MemoryByMachine;
|
||||
|
||||
public static readonly string Resolutions =
|
||||
"CREATE TABLE `resolutions` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`width` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`height` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`colors` BIGINT DEFAULT NULL,\n" +
|
||||
"`palette` BIGINT DEFAULT NULL,\n" +
|
||||
"`chars` BOOL NOT NULL DEFAULT 0,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_resolutions_width` (`width`),\n" +
|
||||
"KEY `idx_resolutions_height` (`height`),\n" +
|
||||
"KEY `idx_resolutions_colors` (`colors`),\n" +
|
||||
"KEY `idx_resolutions_palette` (`palette`),\n" +
|
||||
"INDEX `idx_resolutions_resolution` (`width`,`height`),\n" +
|
||||
"INDEX `idx_resolutions_resolution_with_color` (`width`,`height`,`colors`),\n" +
|
||||
"INDEX `idx_resolutions_resolution_with_color_and_palette` (`width`,`height`,`colors`,`palette`));";
|
||||
|
||||
public static readonly string ResolutionsByGpu =
|
||||
"CREATE TABLE `resolutions_by_gpu` (\n" +
|
||||
"`gpu` INT NOT NULL,\n" +
|
||||
"`resolution` INT NOT NULL,\n" +
|
||||
"KEY `idx_resolutions_by_gpu_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_resolutions_by_gpu_resolution` (`resolution`),\n" +
|
||||
"CONSTRAINT `fk_resolutions_by_gpu_gpu` FOREIGN KEY (`gpu`) REFERENCES `gpus` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_resolutions_by_gpu_resolution` FOREIGN KEY (`resolution`) REFERENCES `resolutions` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
236
Marechai.Database/Schemas/Sql/V2.cs
Normal file
236
Marechai.Database/Schemas/Sql/V2.cs
Normal file
@@ -0,0 +1,236 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V2.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 2.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V2
|
||||
{
|
||||
public static readonly string Admins = @"CREATE TABLE IF NOT EXISTS `admin` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`user` char(50) NOT NULL DEFAULT '',
|
||||
`password` char(50) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string BrowserTests = @"CREATE TABLE IF NOT EXISTS `browser_test` (
|
||||
`id` smallint(5) unsigned zerofill NOT NULL AUTO_INCREMENT,
|
||||
`idstring` varchar(128) NOT NULL DEFAULT '',
|
||||
`browser` varchar(64) NOT NULL DEFAULT '',
|
||||
`version` varchar(16) NOT NULL DEFAULT '',
|
||||
`os` varchar(32) NOT NULL DEFAULT '',
|
||||
`platform` varchar(8) NOT NULL DEFAULT '',
|
||||
`gif87` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`gif89` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`jpeg` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`png` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`pngt` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`agif` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`table` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`colors` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`js` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`frames` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`flash` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Companies = @"CREATE TABLE IF NOT EXISTS `Companias` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Compania` char(128) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Computers = @"CREATE TABLE IF NOT EXISTS `computers` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`company` int(11) NOT NULL DEFAULT '0',
|
||||
`year` int(11) NOT NULL DEFAULT '0',
|
||||
`model` char(50) NOT NULL DEFAULT '',
|
||||
`cpu1` int(11) NOT NULL DEFAULT '0',
|
||||
`mhz1` decimal(11,2) NOT NULL DEFAULT '0.00',
|
||||
`cpu2` int(11) DEFAULT NULL,
|
||||
`mhz2` decimal(11,2) DEFAULT NULL,
|
||||
`bits` int(11) NOT NULL DEFAULT '0',
|
||||
`ram` int(11) NOT NULL DEFAULT '0',
|
||||
`rom` int(11) NOT NULL DEFAULT '0',
|
||||
`gpu` int(11) NOT NULL DEFAULT '0',
|
||||
`vram` int(11) NOT NULL DEFAULT '0',
|
||||
`colors` int(11) NOT NULL DEFAULT '0',
|
||||
`res` char(10) NOT NULL DEFAULT '',
|
||||
`spu` int(11) NOT NULL DEFAULT '0',
|
||||
`mpu` int(11) NOT NULL DEFAULT '0',
|
||||
`sound_channels` int(11) NOT NULL DEFAULT '0',
|
||||
`music_channels` int(11) NOT NULL DEFAULT '0',
|
||||
`hdd1` int(11) NOT NULL DEFAULT '0',
|
||||
`hdd2` int(11) DEFAULT NULL,
|
||||
`hdd3` int(11) DEFAULT NULL,
|
||||
`disk1` int(11) NOT NULL DEFAULT '0',
|
||||
`cap1` char(25) NOT NULL DEFAULT '0',
|
||||
`disk2` int(11) DEFAULT NULL,
|
||||
`cap2` char(25) DEFAULT NULL,
|
||||
`comment` char(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Consoles = @"CREATE TABLE IF NOT EXISTS `consoles` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`company` int(11) NOT NULL DEFAULT '0',
|
||||
`name` char(50) NOT NULL DEFAULT '',
|
||||
`year` int(11) NOT NULL DEFAULT '0',
|
||||
`cpu1` int(11) NOT NULL DEFAULT '0',
|
||||
`mhz1` decimal(11,2) NOT NULL DEFAULT '0.00',
|
||||
`cpu2` int(11) DEFAULT NULL,
|
||||
`mhz2` decimal(11,2) DEFAULT NULL,
|
||||
`bits` int(11) NOT NULL DEFAULT '0',
|
||||
`ram` int(11) NOT NULL DEFAULT '0',
|
||||
`rom` int(11) NOT NULL DEFAULT '0',
|
||||
`gpu` int(11) NOT NULL DEFAULT '0',
|
||||
`vram` int(11) NOT NULL DEFAULT '0',
|
||||
`res` char(11) NOT NULL DEFAULT '',
|
||||
`colors` int(11) NOT NULL DEFAULT '0',
|
||||
`palette` int(11) NOT NULL DEFAULT '0',
|
||||
`spu` int(11) NOT NULL DEFAULT '0',
|
||||
`schannels` int(11) NOT NULL DEFAULT '0',
|
||||
`mpu` int(11) NOT NULL DEFAULT '0',
|
||||
`mchannels` int(11) NOT NULL DEFAULT '0',
|
||||
`format` int(11) NOT NULL DEFAULT '0',
|
||||
`cap` int(11) NOT NULL DEFAULT '0',
|
||||
`comments` char(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string ConsoleCompanies = @"CREATE TABLE IF NOT EXISTS `console_company` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`company` char(128) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Cpus = @"CREATE TABLE IF NOT EXISTS `cpu` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`cpu` char(50) NOT NULL DEFAULT '',
|
||||
KEY `id` (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Dsps = @"CREATE TABLE IF NOT EXISTS `DSPs` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`DSP` char(50) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Forbidden = @"CREATE TABLE IF NOT EXISTS `forbidden` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`browser` char(128) NOT NULL DEFAULT '',
|
||||
`date` char(20) NOT NULL DEFAULT '',
|
||||
`ip` char(16) NOT NULL DEFAULT '',
|
||||
`referer` char(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string DiskFormats = @"CREATE TABLE IF NOT EXISTS `Formatos_de_disco` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Format` char(50) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Gpus = @"CREATE TABLE IF NOT EXISTS `gpus` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`gpu` char(128) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Logs = @"CREATE TABLE IF NOT EXISTS `log` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`browser` char(128) NOT NULL DEFAULT '',
|
||||
`ip` char(16) NOT NULL DEFAULT '',
|
||||
`date` char(20) NOT NULL DEFAULT '',
|
||||
`referer` char(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string MoneyDonations = @"CREATE TABLE IF NOT EXISTS `money_donation` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`donator` char(128) NOT NULL DEFAULT '',
|
||||
`quantity` decimal(11,2) NOT NULL DEFAULT '0.00',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Mpus = @"CREATE TABLE IF NOT EXISTS `mpus` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`mpu` char(50) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string News = @"CREATE TABLE IF NOT EXISTS `news` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`date` char(20) NOT NULL DEFAULT '',
|
||||
`type` int(11) NOT NULL DEFAULT '0',
|
||||
`added_id` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string OwnComputers = @"CREATE TABLE IF NOT EXISTS `own_computer` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`db_id` int(11) NOT NULL DEFAULT '0',
|
||||
`date` varchar(20) NOT NULL DEFAULT '',
|
||||
`status` int(11) NOT NULL DEFAULT '0',
|
||||
`trade` int(11) NOT NULL DEFAULT '0',
|
||||
`boxed` int(11) NOT NULL DEFAULT '0',
|
||||
`manuals` int(11) NOT NULL DEFAULT '0',
|
||||
`cpu1` int(11) NOT NULL DEFAULT '0',
|
||||
`mhz1` decimal(10,0) NOT NULL DEFAULT '0',
|
||||
`cpu2` int(11) NOT NULL DEFAULT '0',
|
||||
`mhz2` decimal(10,0) NOT NULL DEFAULT '0',
|
||||
`ram` int(11) NOT NULL DEFAULT '0',
|
||||
`vram` int(11) NOT NULL DEFAULT '0',
|
||||
`rigid` varchar(64) NOT NULL DEFAULT '',
|
||||
`disk1` int(11) NOT NULL DEFAULT '0',
|
||||
`cap1` int(11) NOT NULL DEFAULT '0',
|
||||
`disk2` int(11) NOT NULL DEFAULT '0',
|
||||
`cap2` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string OwnConsoles = @"CREATE TABLE IF NOT EXISTS `own_consoles` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`db_id` int(11) NOT NULL DEFAULT '0',
|
||||
`date` char(20) NOT NULL DEFAULT '',
|
||||
`status` int(11) NOT NULL DEFAULT '0',
|
||||
`trade` int(11) NOT NULL DEFAULT '0',
|
||||
`boxed` int(11) NOT NULL DEFAULT '0',
|
||||
`manuals` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string ProcesadoresPrincipales =
|
||||
@"CREATE TABLE IF NOT EXISTS `procesadores_principales` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`CPU` char(50) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
}
|
||||
}
|
||||
120
Marechai.Database/Schemas/Sql/V20.cs
Normal file
120
Marechai.Database/Schemas/Sql/V20.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V20.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 20.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V20
|
||||
{
|
||||
public static readonly string Admins = V19.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V19.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`));\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('20');";
|
||||
|
||||
public static readonly string Companies = V19.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" +
|
||||
"`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_type` (`type`));";
|
||||
|
||||
public static readonly string Forbidden = V19.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V19.Gpus;
|
||||
|
||||
public static readonly string Logs = V19.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V19.MoneyDonations;
|
||||
|
||||
public static readonly string News = V19.News;
|
||||
|
||||
public static readonly string OwnedComputers = V19.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V19.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V19.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V19.SoundSynths;
|
||||
|
||||
public static readonly string MachinesForeignKeys =
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;";
|
||||
|
||||
public static readonly string Iso3166Numeric = V19.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V19.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V19.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V19.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V19.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V19.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V19.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V19.InstructionSetExtensionsByProcessor;
|
||||
|
||||
public static readonly string ProcessorsByMachine = V19.ProcessorsByMachine;
|
||||
|
||||
public static readonly string GpusByMachine = V19.GpusByMachine;
|
||||
|
||||
public static readonly string SoundByMachine = V19.SoundByMachine;
|
||||
|
||||
public static readonly string MemoryByMachine = V19.MemoryByMachine;
|
||||
|
||||
public static readonly string Resolutions = V19.Resolutions;
|
||||
|
||||
public static readonly string ResolutionsByGpu = V19.ResolutionsByGpu;
|
||||
|
||||
public static readonly string StorageByMachine = "CREATE TABLE `storage_by_machine` (\n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"`type` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`interface` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`capacity` BIGINT DEFAULT NULL,\n" +
|
||||
"KEY `idx_storage_machine` (`machine`),\n" +
|
||||
"KEY `idx_storage_type` (`type`),\n" +
|
||||
"KEY `idx_storage_interface` (`interface`),\n" +
|
||||
"KEY `idx_storage_capacity` (`capacity`),\n" +
|
||||
"CONSTRAINT `fk_storage_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
120
Marechai.Database/Schemas/Sql/V21.cs
Normal file
120
Marechai.Database/Schemas/Sql/V21.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V21.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 21.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V21
|
||||
{
|
||||
public static readonly string Admins = V20.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V20.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`));\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('21');";
|
||||
|
||||
public static readonly string Companies = V20.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" +
|
||||
"`introduced` DATETIME NULL,;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_introduced` (`introduced`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_type` (`type`));";
|
||||
|
||||
public static readonly string Forbidden = V20.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V20.Gpus;
|
||||
|
||||
public static readonly string Logs = V20.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V20.MoneyDonations;
|
||||
|
||||
public static readonly string News = V20.News;
|
||||
|
||||
public static readonly string OwnedComputers = V20.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V20.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V20.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V20.SoundSynths;
|
||||
|
||||
public static readonly string MachinesForeignKeys =
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;";
|
||||
|
||||
public static readonly string Iso3166Numeric = V20.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V20.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V20.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V20.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V20.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V20.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V20.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V20.InstructionSetExtensionsByProcessor;
|
||||
|
||||
public static readonly string ProcessorsByMachine = V20.ProcessorsByMachine;
|
||||
|
||||
public static readonly string GpusByMachine = V20.GpusByMachine;
|
||||
|
||||
public static readonly string SoundByMachine = V20.SoundByMachine;
|
||||
|
||||
public static readonly string MemoryByMachine = V20.MemoryByMachine;
|
||||
|
||||
public static readonly string Resolutions = V20.Resolutions;
|
||||
|
||||
public static readonly string ResolutionsByGpu = V20.ResolutionsByGpu;
|
||||
|
||||
public static readonly string StorageByMachine = "CREATE TABLE `storage_by_machine` (\n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"`type` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`interface` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`capacity` BIGINT DEFAULT NULL,\n" +
|
||||
"KEY `idx_storage_machine` (`machine`),\n" +
|
||||
"KEY `idx_storage_type` (`type`),\n" +
|
||||
"KEY `idx_storage_interface` (`interface`),\n" +
|
||||
"KEY `idx_storage_capacity` (`capacity`),\n" +
|
||||
"CONSTRAINT `fk_storage_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
125
Marechai.Database/Schemas/Sql/V22.cs
Normal file
125
Marechai.Database/Schemas/Sql/V22.cs
Normal file
@@ -0,0 +1,125 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V22.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 22.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V22
|
||||
{
|
||||
public static readonly string Admins = V21.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V21.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`));\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('22');";
|
||||
|
||||
public static readonly string Companies = V21.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" +
|
||||
"`name` varchar(255) NOT NULL,\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`family` int(11) DEFAULT NULL,\n" +
|
||||
"`model` varchar(50) DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_machines_company` (`company`),\n" +
|
||||
"KEY `idx_machines_type` (`type`),\n" +
|
||||
"KEY `idx_machines_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_machines_family` (`family`),\n" +
|
||||
"KEY `idx_machines_name` (`name`),\n" +
|
||||
"KEY `idx_machines_model` (`model`));";
|
||||
|
||||
public static readonly string Forbidden = V21.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V21.Gpus;
|
||||
|
||||
public static readonly string Logs = V21.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V21.MoneyDonations;
|
||||
|
||||
public static readonly string News = V21.News;
|
||||
|
||||
public static readonly string OwnedComputers = V21.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V21.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V21.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V21.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_family` (family) REFERENCES `machine_families` (`id`) ON UPDATE CASCADE;";
|
||||
|
||||
public static readonly string Iso3166Numeric = V21.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V21.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V21.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V21.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions = V21.CompanyDescriptions;
|
||||
|
||||
public static readonly string InstructionSets = V21.InstructionSets;
|
||||
|
||||
public static readonly string InstructionSetExtensions = V21.InstructionSetExtensions;
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V21.InstructionSetExtensionsByProcessor;
|
||||
|
||||
public static readonly string ProcessorsByMachine = V21.ProcessorsByMachine;
|
||||
|
||||
public static readonly string GpusByMachine = V21.GpusByMachine;
|
||||
|
||||
public static readonly string SoundByMachine = V21.SoundByMachine;
|
||||
|
||||
public static readonly string MemoryByMachine = V21.MemoryByMachine;
|
||||
|
||||
public static readonly string Resolutions = V21.Resolutions;
|
||||
|
||||
public static readonly string ResolutionsByGpu = V21.ResolutionsByGpu;
|
||||
|
||||
public static readonly string StorageByMachine = V21.StorageByMachine;
|
||||
|
||||
public static readonly string MachineFamilies = "CREATE TABLE `machine_families` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` INT NOT NULL,\n" +
|
||||
"`name` VARCHAR(255) NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_machine_families_company` (`company`),\n" +
|
||||
"KEY `idx_machine_families_name` (`name`),\n" +
|
||||
"CONSTRAINT `fk_machine_families_company` FOREIGN KEY (`company`) REFERENCES `companies` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
231
Marechai.Database/Schemas/Sql/V3.cs
Normal file
231
Marechai.Database/Schemas/Sql/V3.cs
Normal file
@@ -0,0 +1,231 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V3.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 3.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V3
|
||||
{
|
||||
public static readonly string Admins = @"CREATE TABLE `admins` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`user` char(50) NOT NULL DEFAULT '',
|
||||
`password` char(50) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string BrowserTests = @"CREATE TABLE IF NOT EXISTS `browser_tests` (
|
||||
`id` smallint(5) unsigned zerofill NOT NULL AUTO_INCREMENT,
|
||||
`user_agent` varchar(128) NOT NULL DEFAULT '',
|
||||
`browser` varchar(64) NOT NULL DEFAULT '',
|
||||
`version` varchar(16) NOT NULL DEFAULT '',
|
||||
`os` varchar(32) NOT NULL DEFAULT '',
|
||||
`platform` varchar(8) NOT NULL DEFAULT '',
|
||||
`gif87` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`gif89` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`jpeg` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`png` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`pngt` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`agif` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`table` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`colors` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`js` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`frames` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`flash` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string CicmDb = @"CREATE TABLE `cicm_db` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`version` int(11) NOT NULL,
|
||||
`updated` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
INSERT INTO cicm_db (version) VALUES ('3');";
|
||||
|
||||
public static readonly string Companies = @"CREATE TABLE IF NOT EXISTS `companies` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` char(128) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Computers = @"CREATE TABLE IF NOT EXISTS `computers` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`company` int(11) NOT NULL DEFAULT '0',
|
||||
`year` int(11) NOT NULL DEFAULT '0',
|
||||
`model` char(50) NOT NULL DEFAULT '',
|
||||
`cpu1` int(11) NOT NULL DEFAULT '0',
|
||||
`mhz1` decimal(11,2) NOT NULL DEFAULT '0.00',
|
||||
`cpu2` int(11) DEFAULT NULL,
|
||||
`mhz2` decimal(11,2) DEFAULT NULL,
|
||||
`bits` int(11) NOT NULL DEFAULT '0',
|
||||
`ram` int(11) NOT NULL DEFAULT '0',
|
||||
`rom` int(11) NOT NULL DEFAULT '0',
|
||||
`gpu` int(11) NOT NULL DEFAULT '0',
|
||||
`vram` int(11) NOT NULL DEFAULT '0',
|
||||
`colors` int(11) NOT NULL DEFAULT '0',
|
||||
`res` char(10) NOT NULL DEFAULT '',
|
||||
`sound_synth` int(11) NOT NULL DEFAULT '0',
|
||||
`music_synth` int(11) NOT NULL DEFAULT '0',
|
||||
`sound_channels` int(11) NOT NULL DEFAULT '0',
|
||||
`music_channels` int(11) NOT NULL DEFAULT '0',
|
||||
`hdd1` int(11) NOT NULL DEFAULT '0',
|
||||
`hdd2` int(11) DEFAULT NULL,
|
||||
`hdd3` int(11) DEFAULT NULL,
|
||||
`disk1` int(11) NOT NULL DEFAULT '0',
|
||||
`cap1` char(25) NOT NULL DEFAULT '0',
|
||||
`disk2` int(11) DEFAULT NULL,
|
||||
`cap2` char(25) DEFAULT NULL,
|
||||
`comment` char(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Consoles = @"CREATE TABLE IF NOT EXISTS `consoles` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`company` int(11) NOT NULL DEFAULT '0',
|
||||
`model` char(50) NOT NULL DEFAULT '',
|
||||
`year` int(11) NOT NULL DEFAULT '0',
|
||||
`cpu1` int(11) NOT NULL DEFAULT '0',
|
||||
`mhz1` decimal(11,2) NOT NULL DEFAULT '0.00',
|
||||
`cpu2` int(11) DEFAULT NULL,
|
||||
`mhz2` decimal(11,2) DEFAULT NULL,
|
||||
`bits` int(11) NOT NULL DEFAULT '0',
|
||||
`ram` int(11) NOT NULL DEFAULT '0',
|
||||
`rom` int(11) NOT NULL DEFAULT '0',
|
||||
`gpu` int(11) NOT NULL DEFAULT '0',
|
||||
`vram` int(11) NOT NULL DEFAULT '0',
|
||||
`res` char(11) NOT NULL DEFAULT '',
|
||||
`colors` int(11) NOT NULL DEFAULT '0',
|
||||
`palette` int(11) NOT NULL DEFAULT '0',
|
||||
`sound_synth` int(11) NOT NULL DEFAULT '0',
|
||||
`schannels` int(11) NOT NULL DEFAULT '0',
|
||||
`music_channels` int(11) NOT NULL DEFAULT '0',
|
||||
`mchannels` int(11) NOT NULL DEFAULT '0',
|
||||
`format` int(11) NOT NULL DEFAULT '0',
|
||||
`cap` int(11) NOT NULL DEFAULT '0',
|
||||
`comments` char(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string DiskFormats = @"CREATE TABLE IF NOT EXISTS `disk_formats` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`description` char(50) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Forbidden = @"CREATE TABLE IF NOT EXISTS `forbidden` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`browser` char(128) NOT NULL DEFAULT '',
|
||||
`date` char(20) NOT NULL DEFAULT '',
|
||||
`ip` char(16) NOT NULL DEFAULT '',
|
||||
`referer` char(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Gpus = @"CREATE TABLE IF NOT EXISTS `gpus` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` char(128) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Logs = @"CREATE TABLE IF NOT EXISTS `log` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`browser` char(128) NOT NULL DEFAULT '',
|
||||
`ip` char(16) NOT NULL DEFAULT '',
|
||||
`date` char(20) NOT NULL DEFAULT '',
|
||||
`referer` char(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string MoneyDonations = @"CREATE TABLE IF NOT EXISTS `money_donation` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`donator` char(128) NOT NULL DEFAULT '',
|
||||
`quantity` decimal(11,2) NOT NULL DEFAULT '0.00',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string MusicSynths = @"CREATE TABLE IF NOT EXISTS `music_synths` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` char(50) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string News = @"CREATE TABLE IF NOT EXISTS `news` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`date` char(20) NOT NULL DEFAULT '',
|
||||
`type` int(11) NOT NULL DEFAULT '0',
|
||||
`added_id` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string OwnedComputers = @"CREATE TABLE IF NOT EXISTS `owned_computers` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`db_id` int(11) NOT NULL DEFAULT '0',
|
||||
`date` varchar(20) NOT NULL DEFAULT '',
|
||||
`status` int(11) NOT NULL DEFAULT '0',
|
||||
`trade` int(11) NOT NULL DEFAULT '0',
|
||||
`boxed` int(11) NOT NULL DEFAULT '0',
|
||||
`manuals` int(11) NOT NULL DEFAULT '0',
|
||||
`cpu1` int(11) NOT NULL DEFAULT '0',
|
||||
`mhz1` decimal(10,0) NOT NULL DEFAULT '0',
|
||||
`cpu2` int(11) NOT NULL DEFAULT '0',
|
||||
`mhz2` decimal(10,0) NOT NULL DEFAULT '0',
|
||||
`ram` int(11) NOT NULL DEFAULT '0',
|
||||
`vram` int(11) NOT NULL DEFAULT '0',
|
||||
`rigid` varchar(64) NOT NULL DEFAULT '',
|
||||
`disk1` int(11) NOT NULL DEFAULT '0',
|
||||
`cap1` int(11) NOT NULL DEFAULT '0',
|
||||
`disk2` int(11) NOT NULL DEFAULT '0',
|
||||
`cap2` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string OwnedConsoles = @"CREATE TABLE IF NOT EXISTS `owned_consoles` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`db_id` int(11) NOT NULL DEFAULT '0',
|
||||
`date` char(20) NOT NULL DEFAULT '',
|
||||
`status` int(11) NOT NULL DEFAULT '0',
|
||||
`trade` int(11) NOT NULL DEFAULT '0',
|
||||
`boxed` int(11) NOT NULL DEFAULT '0',
|
||||
`manuals` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string Processors = @"CREATE TABLE IF NOT EXISTS `processors` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` char(50) NOT NULL DEFAULT '',
|
||||
KEY `id` (`id`)
|
||||
);";
|
||||
|
||||
public static readonly string SoundSynths = @"CREATE TABLE IF NOT EXISTS `sound_synths` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` char(50) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
);";
|
||||
}
|
||||
}
|
||||
174
Marechai.Database/Schemas/Sql/V4.cs
Normal file
174
Marechai.Database/Schemas/Sql/V4.cs
Normal file
@@ -0,0 +1,174 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V4.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 4.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V4
|
||||
{
|
||||
public static readonly string Admins = V3.Admins + "\n" + "CREATE INDEX idx_admins_user ON admins (user);";
|
||||
|
||||
public static readonly string BrowserTests =
|
||||
V3.BrowserTests + "\n" +
|
||||
"CREATE INDEX idx_browser_tests_user_agent ON browser_tests (user_agent);\n" +
|
||||
"CREATE INDEX idx_browser_tests_browser ON browser_tests (browser);\n" +
|
||||
"CREATE INDEX idx_browser_tests_version ON browser_tests (version);\n" +
|
||||
"CREATE INDEX idx_browser_tests_os ON browser_tests (os);\n" +
|
||||
"CREATE INDEX idx_browser_tests_platform ON browser_tests (platform);";
|
||||
|
||||
public static readonly string CicmDb = @"CREATE TABLE `cicm_db` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`version` int(11) NOT NULL,
|
||||
`updated` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
INSERT INTO cicm_db (version) VALUES ('4');";
|
||||
|
||||
public static readonly string Companies =
|
||||
V3.Companies + "\n" + "CREATE INDEX idx_companies_name ON companies (name);";
|
||||
|
||||
public static readonly string Computers =
|
||||
V3.Computers + "\n" +
|
||||
"CREATE INDEX idx_computers_company ON computers (company);\n" +
|
||||
"CREATE INDEX idx_computers_year ON computers (year);\n" +
|
||||
"CREATE INDEX idx_computers_model ON computers (model);\n" +
|
||||
"CREATE INDEX idx_computers_cpu1 ON computers (cpu1);\n" +
|
||||
"CREATE INDEX idx_computers_cpu2 ON computers (cpu2);\n" +
|
||||
"CREATE INDEX idx_computers_mhz1 ON computers (mhz1);\n" +
|
||||
"CREATE INDEX idx_computers_mhz2 ON computers (mhz2);\n" +
|
||||
"CREATE INDEX idx_computers_bits ON computers (bits);\n" +
|
||||
"CREATE INDEX idx_computers_ram ON computers (ram);\n" +
|
||||
"CREATE INDEX idx_computers_rom ON computers (rom);\n" +
|
||||
"CREATE INDEX idx_computers_gpu ON computers (gpu);\n" +
|
||||
"CREATE INDEX idx_computers_vram ON computers (vram);\n" +
|
||||
"CREATE INDEX idx_computers_colors ON computers (colors);\n" +
|
||||
"CREATE INDEX idx_computers_res ON computers (res);\n" +
|
||||
"CREATE INDEX idx_computers_sound_synth ON computers (sound_synth);\n" +
|
||||
"CREATE INDEX idx_computers_music_synth ON computers (music_synth);\n" +
|
||||
"CREATE INDEX idx_computers_hdd1 ON computers (hdd1);\n" +
|
||||
"CREATE INDEX idx_computers_hdd2 ON computers (hdd2);\n" +
|
||||
"CREATE INDEX idx_computers_hdd3 ON computers (hdd3);\n" +
|
||||
"CREATE INDEX idx_computers_disk1 ON computers (disk1);\n" +
|
||||
"CREATE INDEX idx_computers_disk2 ON computers (disk2);\n" +
|
||||
"CREATE INDEX idx_computers_cap1 ON computers (cap1);\n" +
|
||||
"CREATE INDEX idx_computers_cap2 ON computers (cap2);";
|
||||
|
||||
public static readonly string Consoles = V3.Consoles +
|
||||
"\n" +
|
||||
"CREATE INDEX idx_consoles_company ON consoles (company);\n" +
|
||||
"CREATE INDEX idx_consoles_year ON consoles (year);\n" +
|
||||
"CREATE INDEX idx_consoles_model ON consoles (model);\n" +
|
||||
"CREATE INDEX idx_consoles_cpu1 ON consoles (cpu1);\n" +
|
||||
"CREATE INDEX idx_consoles_cpu2 ON consoles (cpu2);\n" +
|
||||
"CREATE INDEX idx_consoles_mhz1 ON consoles (mhz1);\n" +
|
||||
"CREATE INDEX idx_consoles_mhz2 ON consoles (mhz2);\n" +
|
||||
"CREATE INDEX idx_consoles_bits ON consoles (bits);\n" +
|
||||
"CREATE INDEX idx_consoles_ram ON consoles (ram);\n" +
|
||||
"CREATE INDEX idx_consoles_rom ON consoles (rom);\n" +
|
||||
"CREATE INDEX idx_consoles_gpu ON consoles (gpu);\n" +
|
||||
"CREATE INDEX idx_consoles_vram ON consoles (vram);\n" +
|
||||
"CREATE INDEX idx_consoles_colors ON consoles (colors);\n" +
|
||||
"CREATE INDEX idx_consoles_res ON consoles (res);\n" +
|
||||
"CREATE INDEX idx_consoles_sound_synth ON consoles (sound_synth);\n" +
|
||||
"CREATE INDEX idx_consoles_music_synth ON consoles (music_synth);\n" +
|
||||
"CREATE INDEX idx_consoles_palette ON consoles (palette);\n" +
|
||||
"CREATE INDEX idx_consoles_format ON consoles (format);\n" +
|
||||
"CREATE INDEX idx_consoles_cap ON consoles (cap);";
|
||||
|
||||
public static readonly string DiskFormats = V3.DiskFormats + "\n" +
|
||||
"CREATE INDEX idx_disk_formats_description ON disk_formats (description);";
|
||||
|
||||
public static readonly string Forbidden = V3.Forbidden +
|
||||
"\n" +
|
||||
"CREATE INDEX idx_forbidden_browser ON forbidden (browser);\n" +
|
||||
"CREATE INDEX idx_forbidden_date ON forbidden (date);\n" +
|
||||
"CREATE INDEX idx_forbidden_ip ON forbidden (ip);\n" +
|
||||
"CREATE INDEX idx_forbidden_referer ON forbidden (referer);";
|
||||
|
||||
public static readonly string Gpus = V3.Gpus + "\n" + "CREATE INDEX idx_gpus_name ON gpus (name);";
|
||||
|
||||
public static readonly string Logs = V3.Logs + "\n" +
|
||||
"CREATE INDEX idx_log_browser ON log (browser);\n" +
|
||||
"CREATE INDEX idx_log_date ON log (date);\n" +
|
||||
"CREATE INDEX idx_log_ip ON log (ip);\n" +
|
||||
"CREATE INDEX idx_log_referer ON log (referer);";
|
||||
|
||||
public static readonly string MoneyDonations =
|
||||
V3.MoneyDonations + "\n" +
|
||||
"CREATE INDEX idx_money_donations_donator ON money_donations (donator);\n" +
|
||||
"CREATE INDEX idx_money_donations_quantity ON money_donations (quantity);";
|
||||
|
||||
public static readonly string MusicSynths =
|
||||
V3.MusicSynths + "\n" + "CREATE INDEX idx_music_synts_name ON music_synths (name);";
|
||||
|
||||
public static readonly string News = V3.News + "\n" +
|
||||
"CREATE INDEX idx_news_date ON news (date);\n" +
|
||||
"CREATE INDEX idx_news_type ON news (type);\n" +
|
||||
"CREATE INDEX idx_news_ip ON news (added_id);";
|
||||
|
||||
public static readonly string OwnedComputers =
|
||||
V3.OwnedComputers + "\n" +
|
||||
"CREATE INDEX idx_owned_computers_db_id ON owned_computers (db_id);\n" +
|
||||
"CREATE INDEX idx_owned_computers_date ON owned_computers (date);\n" +
|
||||
"CREATE INDEX idx_owned_computers_status ON owned_computers (status);\n" +
|
||||
"CREATE INDEX idx_owned_computers_trade ON owned_computers (trade);\n" +
|
||||
"CREATE INDEX idx_owned_computers_boxed ON owned_computers (boxed);\n" +
|
||||
"CREATE INDEX idx_owned_computers_manuals ON owned_computers (manuals);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cpu1 ON owned_computers (cpu1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cpu2 ON owned_computers (cpu2);\n" +
|
||||
"CREATE INDEX idx_owned_computers_mhz1 ON owned_computers (mhz1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_mhz2 ON owned_computers (mhz2);\n" +
|
||||
"CREATE INDEX idx_owned_computers_ram ON owned_computers (ram);\n" +
|
||||
"CREATE INDEX idx_owned_computers_vram ON owned_computers (vram);\n" +
|
||||
"CREATE INDEX idx_owned_computers_rigid ON owned_computers (rigid);\n" +
|
||||
"CREATE INDEX idx_owned_computers_disk1 ON owned_computers (disk1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_disk2 ON owned_computers (disk2);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cap1 ON owned_computers (cap1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cap2 ON owned_computers (cap2);";
|
||||
|
||||
public static readonly string OwnedConsoles =
|
||||
V3.OwnedConsoles + "\n" +
|
||||
"CREATE INDEX idx_owned_consoles_db_id ON owned_consoles (db_id);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_date ON owned_consoles (date);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_status ON owned_consoles (status);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_trade ON owned_consoles (trade);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_boxed ON owned_consoles (boxed);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_manuals ON owned_consoles (manuals);";
|
||||
|
||||
public static readonly string Processors = @"CREATE TABLE IF NOT EXISTS `processors` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` char(50) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY `id` (`id`)
|
||||
);" + "\n" +
|
||||
"CREATE INDEX idx_processors_name ON processors (name);";
|
||||
|
||||
public static readonly string SoundSynths =
|
||||
V3.SoundSynths + "\n" + "CREATE INDEX idx_sound_synths_name ON sound_synths (name);";
|
||||
}
|
||||
}
|
||||
97
Marechai.Database/Schemas/Sql/V5.cs
Normal file
97
Marechai.Database/Schemas/Sql/V5.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V5.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 5.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V5
|
||||
{
|
||||
public static readonly string Admins = V4.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V4.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = @"CREATE TABLE `cicm_db` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`version` int(11) NOT NULL,
|
||||
`updated` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
INSERT INTO cicm_db (version) VALUES ('5');";
|
||||
|
||||
public static readonly string Companies = V4.Companies;
|
||||
|
||||
public static readonly string Computers = V4.Computers;
|
||||
|
||||
public static readonly string Consoles = V4.Consoles;
|
||||
|
||||
public static readonly string DiskFormats = V4.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V4.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V4.Gpus;
|
||||
|
||||
public static readonly string Logs = V4.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V4.MoneyDonations;
|
||||
|
||||
public static readonly string MusicSynths = V4.MusicSynths;
|
||||
|
||||
public static readonly string News = V4.News;
|
||||
|
||||
public static readonly string OwnedComputers = V4.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V4.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V4.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V4.SoundSynths;
|
||||
|
||||
public static readonly string ComputersForeignKeys =
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_music_synth (music_synth) REFERENCES music_synths (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd1 (hdd1) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd2 (hdd2) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd3 (hdd3) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_disk1 (disk1) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_disk2 (disk2) REFERENCES disk_formats (id);";
|
||||
|
||||
public static readonly string ConsolesForeignKeys =
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_music_synth (music_synth) REFERENCES music_synths (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_format (format) REFERENCES disk_formats (id);";
|
||||
}
|
||||
}
|
||||
177
Marechai.Database/Schemas/Sql/V6.cs
Normal file
177
Marechai.Database/Schemas/Sql/V6.cs
Normal file
@@ -0,0 +1,177 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V6.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 6.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V6
|
||||
{
|
||||
public static readonly string Admins = V5.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V5.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('6');";
|
||||
|
||||
public static readonly string Companies = "CREATE TABLE `companies` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` varchar(128) NOT NULL DEFAULT '',\n" +
|
||||
"`founded` datetime DEFAULT NULL,\n" +
|
||||
"`website` varchar(255) DEFAULT NULL,\n" +
|
||||
"`twitter` varchar(45) DEFAULT NULL,\n" +
|
||||
"`facebook` varchar(45) DEFAULT NULL,\n" +
|
||||
"`sold` datetime DEFAULT NULL,\n" +
|
||||
"`sold_to` int(11) DEFAULT NULL,\n" +
|
||||
"`address` varchar(80) DEFAULT NULL,\n" +
|
||||
"`city` varchar(80) DEFAULT NULL,\n" +
|
||||
"`province` varchar(80) DEFAULT NULL,\n" +
|
||||
"`postal_code` varchar(25) DEFAULT NULL,\n" +
|
||||
"`country` smallint(3) UNSIGNED ZEROFILL DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_companies_name` (`name`),\n" +
|
||||
"KEY `idx_companies_founded` (`founded`),\n" +
|
||||
"KEY `idx_companies_website` (`website`),\n" +
|
||||
"KEY `idx_companies_twitter` (`twitter`),\n" +
|
||||
"KEY `idx_companies_facebook` (`facebook`),\n" +
|
||||
"KEY `idx_companies_sold` (`sold`),\n" +
|
||||
"KEY `idx_companies_sold_to` (`sold_to`),\n" +
|
||||
"KEY `idx_companies_address` (`address`),\n" +
|
||||
"KEY `idx_companies_city` (`city`),\n" +
|
||||
"KEY `idx_companies_province` (`province`),\n" +
|
||||
"KEY `idx_companies_postal_code` (`postal_code`),\n" +
|
||||
"KEY `idx_companies_country` (`country`));";
|
||||
|
||||
public static readonly string Computers = V5.Computers;
|
||||
|
||||
public static readonly string Consoles = V5.Consoles;
|
||||
|
||||
public static readonly string DiskFormats = V5.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V5.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V5.Gpus;
|
||||
|
||||
public static readonly string Logs = V5.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V5.MoneyDonations;
|
||||
|
||||
public static readonly string MusicSynths = V5.MusicSynths;
|
||||
|
||||
public static readonly string News = V5.News;
|
||||
|
||||
public static readonly string OwnedComputers = V5.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V5.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V5.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V5.SoundSynths;
|
||||
|
||||
public static readonly string ComputersForeignKeys = V5.ComputersForeignKeys;
|
||||
|
||||
public static readonly string ConsolesForeignKeys = V5.ConsolesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = "CREATE TABLE `iso3166_1_numeric` (\n" +
|
||||
"`id` SMALLINT(3) UNSIGNED ZEROFILL NOT NULL,\n" +
|
||||
"`name` VARCHAR(64) NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"INDEX `idx_name` (`name` ASC));";
|
||||
|
||||
public static readonly string Iso3166NumericValues =
|
||||
"INSERT INTO `iso3166_1_numeric` VALUES (004,'Afghanistan'),(248,'Åland Islands'),(008,'Albania')," +
|
||||
"(012,'Algeria'),(016,'American Samoa'),(020,'Andorra'),(024,'Angola'),(660,'Anguilla'),(010,'Antarctica')," +
|
||||
"(028,'Antigua and Barbuda'),(032,'Argentina'),(051,'Armenia'),(533,'Aruba'),(036,'Australia')," +
|
||||
"(040,'Austria'),(031,'Azerbaijan'),(044,'Bahamas'),(048,'Bahrain'),(050,'Bangladesh'),(052,'Barbados')," +
|
||||
"(112,'Belarus'),(056,'Belgium'),(084,'Belize'),(204,'Benin'),(060,'Bermuda'),(064,'Bhutan')," +
|
||||
"(862,'Bolivarian Republic of Venezuela'),(535,'Bonaire, Sint Eustatius and Saba')," +
|
||||
"(070,'Bosnia and Herzegovina'),(072,'Botswana'),(074,'Bouvet Island'),(076,'Brazil')," +
|
||||
"(080,'British Antarctic Territory'),(086,'British Indian Ocean Territory'),(092,'British Virgin Islands')," +
|
||||
"(096,'Brunei Darussalam'),(100,'Bulgaria'),(854,'Burkina Faso'),(108,'Burundi'),(132,'Cabo Verde')," +
|
||||
"(116,'Cambodia'),(120,'Cameroon'),(124,'Canada'),(128,'Canton and Enderbury Islands')," +
|
||||
"(136,'Cayman Islands'),(140,'Central African Republic'),(148,'Chad'),(830,'Channel Islands'),(152,'Chile')," +
|
||||
"(156,'China'),(162,'Christmas Island'),(166,'Cocos (Keeling) Islands'),(170,'Colombia'),(174,'Comoros')," +
|
||||
"(178,'Congo'),(184,'Cook Islands'),(188,'Costa Rica'),(384,'Côte d\\'Ivoire'),(191,'Croatia'),(192,'Cuba')," +
|
||||
"(531,'Curaçao'),(196,'Cyprus'),(203,'Czechia'),(200,'Czechoslovakia')," +
|
||||
"(408,'Democratic People\\'s Republic of Korea'),(180,'Democratic Republic of the Congo')," +
|
||||
"(720,'Democratic Yemen'),(208,'Denmark'),(262,'Djibouti'),(212,'Dominica'),(214,'Dominican Republic')," +
|
||||
"(216,'Dronning Maud Land'),(218,'Ecuador'),(818,'Egypt'),(222,'El Salvador'),(226,'Equatorial Guinea')," +
|
||||
"(232,'Eritrea'),(233,'Estonia'),(230,'Ethiopia'),(231,'Ethiopia'),(238,'Falkland Islands (Malvinas)')," +
|
||||
"(234,'Faroe Islands'),(280,'Federal Republic of Germany'),(583,'Federated States of Micronesia')," +
|
||||
"(242,'Fiji'),(246,'Finland'),(250,'France'),(249,'France, Metropolitan'),(254,'French Guiana')," +
|
||||
"(258,'French Polynesia'),(260,'French Southern Territories'),(266,'Gabon'),(270,'Gambia')," +
|
||||
"(274,'Gaza Strip (Palestine)'),(268,'Georgia'),(278,'German Democratic Republic'),(276,'Germany')," +
|
||||
"(288,'Ghana'),(292,'Gibraltar'),(300,'Greece'),(304,'Greenland'),(308,'Grenada'),(312,'Guadeloupe')," +
|
||||
"(316,'Guam'),(320,'Guatemala'),(831,'Guernsey'),(324,'Guinea'),(624,'Guinea-Bissau'),(328,'Guyana')," +
|
||||
"(332,'Haiti'),(334,'Heard Island and McDonald Islands'),(336,'Holy See'),(340,'Honduras')," +
|
||||
"(344,'Hong Kong'),(348,'Hungary'),(352,'Iceland'),(356,'India'),(360,'Indonesia'),(368,'Iraq')," +
|
||||
"(372,'Ireland'),(364,'Islamic Republic of Iran'),(833,'Isle of Man'),(376,'Israel'),(380,'Italy')," +
|
||||
"(388,'Jamaica'),(392,'Japan'),(832,'Jersey'),(396,'Johnston Island'),(400,'Jordan'),(398,'Kazakhstan')," +
|
||||
"(404,'Kenya'),(296,'Kiribati'),(414,'Kuwait'),(417,'Kyrgyzstan'),(418,'Lao People\\'s Democratic Republic')," +
|
||||
"(428,'Latvia'),(422,'Lebanon'),(426,'Lesotho'),(430,'Liberia'),(434,'Libya'),(438,'Liechtenstein')," +
|
||||
"(440,'Lithuania'),(442,'Luxembourg'),(446,'Macao'),(450,'Madagascar'),(454,'Malawi'),(458,'Malaysia')," +
|
||||
"(462,'Maldives'),(466,'Mali'),(470,'Malta'),(584,'Marshall Islands'),(474,'Martinique'),(478,'Mauritania')," +
|
||||
"(480,'Mauritius'),(175,'Mayotte'),(484,'Mexico'),(488,'Midway Islands'),(492,'Monaco'),(496,'Mongolia')," +
|
||||
"(499,'Montenegro'),(500,'Montserrat'),(504,'Morocco'),(508,'Mozambique'),(104,'Myanmar'),(516,'Namibia')," +
|
||||
"(520,'Nauru'),(524,'Nepal'),(528,'Netherlands'),(530,'Netherlands Antilles'),(532,'Netherlands Antilles')," +
|
||||
"(536,'Neutral Zone'),(540,'New Caledonia'),(554,'New Zealand'),(558,'Nicaragua'),(562,'Niger')," +
|
||||
"(566,'Nigeria'),(570,'Niue'),(574,'Norfolk Island'),(580,'Northern Mariana Islands'),(578,'Norway')," +
|
||||
"(512,'Oman'),(586,'Pakistan'),(585,'Palau'),(590,'Panama'),(591,'Panama'),(594,'Panama Canal Zone')," +
|
||||
"(598,'Papua New Guinea'),(600,'Paraguay'),(604,'Peru'),(608,'Philippines'),(612,'Pitcairn')," +
|
||||
"(068,'Plurinational State of Bolivia'),(616,'Poland'),(620,'Portugal'),(630,'Puerto Rico'),(634,'Qatar')," +
|
||||
"(410,'Republic of Korea'),(498,'Republic of Moldova'),(714,'Republic of Viet-Nam'),(638,'Réunion')," +
|
||||
"(642,'Romania'),(643,'Russian Federation'),(646,'Rwanda'),(650,'Ryukyu Islands'),(652,'Saint Barthélemy')," +
|
||||
"(654,'Saint Helena, Ascension and Tristan da Cunha'),(659,'Saint Kitts and Nevis')," +
|
||||
"(658,'Saint Kitts-Nevis-Anguilla'),(662,'Saint Lucia'),(663,'Saint Martin')," +
|
||||
"(666,'Saint Pierre and Miquelon'),(670,'Saint Vincent and the Grenadines'),(882,'Samoa')," +
|
||||
"(674,'San Marino'),(678,'Sao Tome and Principe'),(682,'Saudi Arabia'),(686,'Senegal'),(688,'Serbia')," +
|
||||
"(891,'Serbia and Montenegro'),(690,'Seychelles'),(694,'Sierra Leone'),(698,'Sikkim'),(702,'Singapore')," +
|
||||
"(534,'Sint Marteen'),(703,'Slovakia'),(705,'Slovenia'),(890,'Socialist Federal Republic of Yugoslavia')," +
|
||||
"(090,'Solomon Islands'),(706,'Somalia'),(710,'South Africa')," +
|
||||
"(239,'South Georgia and the South Sandwich Islands'),(728,'South Sudan'),(724,'Spain'),(144,'Sri Lanka')," +
|
||||
"(275,'State of Palestine'),(729,'Sudan'),(736,'Sudan'),(740,'Suriname'),(744,'Svalbard and Jan Mayen')," +
|
||||
"(748,'Swaziland'),(752,'Sweden'),(756,'Switzerland'),(760,'Syrian Arab Republic')," +
|
||||
"(158,'Taiwan, Province of China'),(762,'Tajikistan'),(764,'Thailand')," +
|
||||
"(807,'The former Yugoslav Republic of Macedonia'),(626,'Timor-Leste'),(768,'Togo'),(772,'Tokelau')," +
|
||||
"(776,'Tonga'),(780,'Trinidad and Tobago'),(582,'Trust Territory of the Pacific Islands'),(788,'Tunisia')," +
|
||||
"(792,'Turkey'),(795,'Turkmenistan'),(796,'Turks and Caicos Islands'),(798,'Tuvalu')," +
|
||||
"(849,'U.S. Miscellaneous Pacific Islands'),(800,'Uganda'),(804,'Ukraine'),(784,'United Arab Emirates')," +
|
||||
"(826,'United Kingdom'),(834,'United Republic of Tanzania'),(581,'United States Minor Outlying Islands')," +
|
||||
"(840,'United States of America'),(858,'Uruguay'),(810,'USSR'),(860,'Uzbekistan'),(548,'Vanuatu')," +
|
||||
"(704,'Viet-Nam'),(850,'Virgin Islands, U.S.'),(872,'Wake Island'),(876,'Wallis and Futuna')," +
|
||||
"(732,'Western Sahara'),(887,'Yemen'),(886,'Yemen Arab Republic'),(894,'Zambia'),(716,'Zimbabwe');";
|
||||
|
||||
public static readonly string CompaniesForeignKeys =
|
||||
"ALTER TABLE `companies` ADD FOREIGN KEY `fk_companies_sold_to` (sold_to) REFERENCES `companies` (`id`);\n" +
|
||||
"ALTER TABLE `companies` ADD FOREIGN KEY `fk_companies_country` (country) REFERENCES `iso3166_1_numeric` (`id`);";
|
||||
}
|
||||
}
|
||||
112
Marechai.Database/Schemas/Sql/V7.cs
Normal file
112
Marechai.Database/Schemas/Sql/V7.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V7.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 7.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V7
|
||||
{
|
||||
public static readonly string Admins = V6.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V6.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('7');";
|
||||
|
||||
public static readonly string Companies = "CREATE TABLE `companies` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` varchar(128) NOT NULL DEFAULT '',\n" +
|
||||
"`founded` datetime DEFAULT NULL,\n" +
|
||||
"`website` varchar(255) DEFAULT NULL,\n" +
|
||||
"`twitter` varchar(45) DEFAULT NULL,\n" +
|
||||
"`facebook` varchar(45) DEFAULT NULL,\n" +
|
||||
"`sold` datetime DEFAULT NULL,\n" +
|
||||
"`sold_to` int(11) DEFAULT NULL,\n" +
|
||||
"`address` varchar(80) DEFAULT NULL,\n" +
|
||||
"`city` varchar(80) DEFAULT NULL,\n" +
|
||||
"`province` varchar(80) DEFAULT NULL,\n" +
|
||||
"`postal_code` varchar(25) DEFAULT NULL,\n" +
|
||||
"`country` smallint(3) UNSIGNED ZEROFILL DEFAULT NULL,\n" +
|
||||
"`status` int NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_companies_name` (`name`),\n" +
|
||||
"KEY `idx_companies_founded` (`founded`),\n" +
|
||||
"KEY `idx_companies_website` (`website`),\n" +
|
||||
"KEY `idx_companies_twitter` (`twitter`),\n" +
|
||||
"KEY `idx_companies_facebook` (`facebook`),\n" +
|
||||
"KEY `idx_companies_sold` (`sold`),\n" +
|
||||
"KEY `idx_companies_sold_to` (`sold_to`),\n" +
|
||||
"KEY `idx_companies_address` (`address`),\n" +
|
||||
"KEY `idx_companies_city` (`city`),\n" +
|
||||
"KEY `idx_companies_province` (`province`),\n" +
|
||||
"KEY `idx_companies_postal_code` (`postal_code`),\n" +
|
||||
"KEY `idx_companies_status` (`status`),\n" +
|
||||
"KEY `idx_companies_country` (`country`));";
|
||||
|
||||
public static readonly string Computers = V6.Computers;
|
||||
|
||||
public static readonly string Consoles = V6.Consoles;
|
||||
|
||||
public static readonly string DiskFormats = V6.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V6.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V6.Gpus;
|
||||
|
||||
public static readonly string Logs = V6.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V6.MoneyDonations;
|
||||
|
||||
public static readonly string MusicSynths = V6.MusicSynths;
|
||||
|
||||
public static readonly string News = V6.News;
|
||||
|
||||
public static readonly string OwnedComputers = V6.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V6.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V6.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V6.SoundSynths;
|
||||
|
||||
public static readonly string ComputersForeignKeys = V6.ComputersForeignKeys;
|
||||
|
||||
public static readonly string ConsolesForeignKeys = V6.ConsolesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = V6.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V6.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V6.CompaniesForeignKeys;
|
||||
}
|
||||
}
|
||||
97
Marechai.Database/Schemas/Sql/V8.cs
Normal file
97
Marechai.Database/Schemas/Sql/V8.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V9.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 8.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V8
|
||||
{
|
||||
public static readonly string Admins = V7.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V7.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('8');";
|
||||
|
||||
public static readonly string Companies = V7.Companies;
|
||||
|
||||
public static readonly string Computers = V7.Computers;
|
||||
|
||||
public static readonly string Consoles = V7.Consoles;
|
||||
|
||||
public static readonly string DiskFormats = V7.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V7.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V7.Gpus;
|
||||
|
||||
public static readonly string Logs = V7.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V7.MoneyDonations;
|
||||
|
||||
public static readonly string MusicSynths = V7.MusicSynths;
|
||||
|
||||
public static readonly string News = V7.News;
|
||||
|
||||
public static readonly string OwnedComputers = V7.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V7.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V7.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V7.SoundSynths;
|
||||
|
||||
public static readonly string ComputersForeignKeys = V7.ComputersForeignKeys;
|
||||
|
||||
public static readonly string ConsolesForeignKeys = V7.ConsolesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = V7.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V7.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V7.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = "CREATE TABLE IF NOT EXISTS `company_logos` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company_id` INT(11) NOT NULL,\n" +
|
||||
"`year` INT(4) DEFAULT NULL,\n" +
|
||||
"`logo_guid` CHAR(36) NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`, `company_id`, `logo_guid`),\n" +
|
||||
"UNIQUE INDEX `idx_id` (`id` ASC),\n" +
|
||||
"INDEX `idx_company_id` (`company_id` ASC),\n" +
|
||||
"INDEX `idx_guid` (`logo_guid` ASC),\n" +
|
||||
"CONSTRAINT `fk_company_logos_company1`\n" +
|
||||
"FOREIGN KEY (`company_id`)\n" +
|
||||
"REFERENCES `companies` (`id`))";
|
||||
}
|
||||
}
|
||||
97
Marechai.Database/Schemas/Sql/V9.cs
Normal file
97
Marechai.Database/Schemas/Sql/V9.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : V8.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Contains SQL queries to create the database version 9.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static class V9
|
||||
{
|
||||
public static readonly string Admins = V8.Admins;
|
||||
|
||||
public static readonly string BrowserTests = V8.BrowserTests;
|
||||
|
||||
public static readonly string CicmDb = "CREATE TABLE `cicm_db` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`version` int(11) NOT NULL,\n" +
|
||||
"`updated` datetime DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO cicm_db (version) VALUES ('9');";
|
||||
|
||||
public static readonly string Companies = V8.Companies;
|
||||
|
||||
public static readonly string Computers = V8.Computers;
|
||||
|
||||
public static readonly string Consoles = V8.Consoles;
|
||||
|
||||
public static readonly string DiskFormats = V8.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V8.Forbidden;
|
||||
|
||||
public static readonly string Gpus = V8.Gpus;
|
||||
|
||||
public static readonly string Logs = V8.Logs;
|
||||
|
||||
public static readonly string MoneyDonations = V8.MoneyDonations;
|
||||
|
||||
public static readonly string MusicSynths = V8.MusicSynths;
|
||||
|
||||
public static readonly string News = V8.News;
|
||||
|
||||
public static readonly string OwnedComputers = V8.OwnedComputers;
|
||||
|
||||
public static readonly string OwnedConsoles = V8.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors = V8.Processors;
|
||||
|
||||
public static readonly string SoundSynths = V8.SoundSynths;
|
||||
|
||||
public static readonly string ComputersForeignKeys = V8.ComputersForeignKeys;
|
||||
|
||||
public static readonly string ConsolesForeignKeys = V8.ConsolesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = V8.Iso3166Numeric;
|
||||
|
||||
public static readonly string Iso3166NumericValues = V8.Iso3166NumericValues;
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V8.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = V8.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions =
|
||||
"CREATE TABLE `company_descriptions` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company_id` INT NOT NULL,\n" +
|
||||
"`text` text,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"INDEX `idx_company_id` (`company_id` ASC),\n" +
|
||||
"FULLTEXT KEY `idx_text` (`text`),\n" +
|
||||
"CONSTRAINT `fk_company_id` FOREIGN KEY (`id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE\n" +
|
||||
")";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user