Files
marechai/Marechai.Database/Schemas/Sql/V9.cs

97 lines
4.7 KiB
C#
Raw Normal View History

/******************************************************************************
2020-02-10 01:52:56 +00:00
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Filename : V8.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
2018-08-07 20:06:44 +01:00
// 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/>.
//
// ----------------------------------------------------------------------------
2020-02-10 03:05:39 +00:00
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
2020-02-10 02:10:18 +00:00
namespace Marechai.Database.Schemas.Sql
{
public static class V9
{
public static readonly string Admins = V8.Admins;
public static readonly string BrowserTests = V8.BrowserTests;
2020-02-10 02:50:38 +00:00
public static readonly string MarechaiDb = "CREATE TABLE `marechai_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" +
2020-02-10 02:50:38 +00:00
"INSERT INTO marechai_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" +
")";
}
}