mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add EntityFramework models.
This commit is contained in:
953
Cicm.Database/Migrations/20180805214952_InitialMigration.cs
Normal file
953
Cicm.Database/Migrations/20180805214952_InitialMigration.cs
Normal file
@@ -0,0 +1,953 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
public partial class InitialMigration : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("admins",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
user =
|
||||
table.Column<string>("char(50)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
password = table.Column<string>("char(50)", nullable: false,
|
||||
defaultValueSql: "''")
|
||||
}, constraints: table => { table.PrimaryKey("PK_admins", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("browser_tests",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
user_agent =
|
||||
table.Column<string>("varchar(128)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
browser =
|
||||
table.Column<string>("varchar(64)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
version =
|
||||
table.Column<string>("varchar(16)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
os =
|
||||
table.Column<string>("varchar(32)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
platform =
|
||||
table.Column<string>("varchar(8)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
gif87 =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
gif89 =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
jpeg =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
png =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
pngt =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
agif =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
table =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
colors =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
js =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
frames =
|
||||
table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
flash = table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'")
|
||||
}, constraints: table => { table.PrimaryKey("PK_browser_tests", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("cicm_db",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
version = table.Column<int>("int(11)", nullable: false),
|
||||
updated = table.Column<DateTime>("datetime", nullable: true,
|
||||
defaultValueSql: "'CURRENT_TIMESTAMP'")
|
||||
}, constraints: table => { table.PrimaryKey("PK_cicm_db", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("forbidden",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
browser =
|
||||
table.Column<string>("char(128)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
date =
|
||||
table.Column<string>("char(20)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
ip = table.Column<string>("char(16)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
referer = table.Column<string>("char(255)", nullable: false,
|
||||
defaultValueSql: "''")
|
||||
}, constraints: table => { table.PrimaryKey("PK_forbidden", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("instruction_set_extensions",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
extension = table.Column<string>("varchar(45)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_instruction_set_extensions", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("instruction_sets",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
instruction_set = table.Column<string>("varchar(45)", nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_instruction_sets", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("iso3166_1_numeric",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<short>("smallint(3)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
name = table.Column<string>("varchar(64)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_iso3166_1_numeric", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("log",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
browser =
|
||||
table.Column<string>("char(128)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
ip =
|
||||
table.Column<string>("char(16)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
date =
|
||||
table.Column<string>("char(20)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
referer = table.Column<string>("char(255)", nullable: false,
|
||||
defaultValueSql: "''")
|
||||
}, constraints: table => { table.PrimaryKey("PK_log", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("money_donations",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
donator =
|
||||
table.Column<string>("char(128)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
quantity = table.Column<decimal>("decimal(11,2)", nullable: false,
|
||||
defaultValueSql: "'0.00'")
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_money_donations", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("news",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
date =
|
||||
table.Column<string>("char(20)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
type =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
added_id = table.Column<int>("int(11)", nullable: false,
|
||||
defaultValueSql: "'0'")
|
||||
}, constraints: table => { table.PrimaryKey("PK_news", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("owned_computers",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
db_id =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
date =
|
||||
table.Column<string>("varchar(20)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
status =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
trade =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
boxed =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
manuals =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
cpu1 =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
mhz1 =
|
||||
table.Column<decimal>("decimal(10,0)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
cpu2 =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
mhz2 =
|
||||
table.Column<decimal>("decimal(10,0)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
ram =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
vram =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
rigid =
|
||||
table.Column<string>("varchar(64)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
disk1 =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
cap1 =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
disk2 =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
cap2 = table.Column<int>("int(11)", nullable: false,
|
||||
defaultValueSql: "'0'")
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_owned_computers", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("owned_consoles",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
db_id =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
date =
|
||||
table.Column<string>("char(20)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
status =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
trade =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
boxed =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
manuals = table.Column<int>("int(11)", nullable: false,
|
||||
defaultValueSql: "'0'")
|
||||
}, constraints: table => { table.PrimaryKey("PK_owned_consoles", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("resolutions",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
width =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
height =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
colors = table.Column<long>("bigint(20)", nullable: true),
|
||||
palette = table.Column<long>("bigint(20)", nullable: true),
|
||||
chars = table.Column<sbyte>("tinyint(1)", nullable: false,
|
||||
defaultValueSql: "'0'")
|
||||
}, constraints: table => { table.PrimaryKey("PK_resolutions", x => x.id); });
|
||||
|
||||
migrationBuilder.CreateTable("companies",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
name =
|
||||
table.Column<string>("varchar(128)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
founded = table.Column<DateTime>("datetime", nullable: true),
|
||||
website = table.Column<string>("varchar(255)", nullable: true),
|
||||
twitter = table.Column<string>("varchar(45)", nullable: true),
|
||||
facebook = table.Column<string>("varchar(45)", nullable: true),
|
||||
sold = table.Column<DateTime>("datetime", nullable: true),
|
||||
sold_to = table.Column<int>("int(11)", nullable: true),
|
||||
address = table.Column<string>("varchar(80)", nullable: true),
|
||||
city = table.Column<string>("varchar(80)", nullable: true),
|
||||
province = table.Column<string>("varchar(80)", nullable: true),
|
||||
postal_code = table.Column<string>("varchar(25)", nullable: true),
|
||||
country = table.Column<short>("smallint(3)", nullable: true),
|
||||
status = table.Column<int>("int(11)", nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_companies", x => x.id);
|
||||
table.ForeignKey("fk_companies_country", x => x.country,
|
||||
"iso3166_1_numeric", "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("fk_companies_sold_to", x => x.sold_to, "companies", "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("company_descriptions",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company_id = table.Column<int>("int(11)", nullable: false),
|
||||
text = table.Column<string>("text", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_company_descriptions", x => x.id);
|
||||
table.ForeignKey("fk_company_id", x => x.id, "companies", "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("company_logos",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company_id = table.Column<int>("int(11)", nullable: false),
|
||||
year = table.Column<int>("int(4)", nullable: true),
|
||||
logo_guid = table.Column<string>("char(36)", nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_company_logos",
|
||||
x => new {x.id, x.company_id, x.logo_guid});
|
||||
table.ForeignKey("fk_company_logos_company1", x => x.company_id,
|
||||
"companies", "id", onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("gpus",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
name =
|
||||
table.Column<string>("char(128)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
company = table.Column<int>("int(11)", nullable: true),
|
||||
model_code = table.Column<string>("varchar(45)", nullable: true),
|
||||
introduced = table.Column<DateTime>("datetime", nullable: true),
|
||||
package = table.Column<string>("varchar(45)", nullable: true),
|
||||
process = table.Column<string>("varchar(45)", nullable: true),
|
||||
process_nm = table.Column<float>(nullable: true),
|
||||
die_size = table.Column<float>(nullable: true),
|
||||
transistors = table.Column<long>("bigint(20)", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_gpus", x => x.id);
|
||||
table.ForeignKey("fk_gpus_company", x => x.company, "companies", "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("machine_families",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company = table.Column<int>("int(11)", nullable: false),
|
||||
name = table.Column<string>("varchar(255)", nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_machine_families", x => x.id);
|
||||
table.ForeignKey("fk_machine_families_company", x => x.company,
|
||||
"companies", "id", onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("processors",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
name =
|
||||
table.Column<string>("char(50)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
company = table.Column<int>("int(11)", nullable: true),
|
||||
model_code = table.Column<string>("varchar(45)", nullable: true),
|
||||
introduced = table.Column<DateTime>("datetime", nullable: true),
|
||||
instruction_set = table.Column<int>("int(11)", nullable: true),
|
||||
speed = table.Column<double>(nullable: true),
|
||||
package = table.Column<string>("varchar(45)", nullable: true),
|
||||
GPRs = table.Column<int>("int(11)", nullable: true),
|
||||
GPR_size = table.Column<int>("int(11)", nullable: true),
|
||||
FPRs = table.Column<int>("int(11)", nullable: true),
|
||||
FPR_size = table.Column<int>("int(11)", nullable: true),
|
||||
cores = table.Column<int>("int(11)", nullable: true),
|
||||
threads_per_core = table.Column<int>("int(11)", nullable: true),
|
||||
process = table.Column<string>("varchar(45)", nullable: true),
|
||||
process_nm = table.Column<float>(nullable: true),
|
||||
die_size = table.Column<float>(nullable: true),
|
||||
transistors = table.Column<long>("bigint(20)", nullable: true),
|
||||
data_bus = table.Column<int>("int(11)", nullable: true),
|
||||
addr_bus = table.Column<int>("int(11)", nullable: true),
|
||||
SIMD_registers = table.Column<int>("int(11)", nullable: true),
|
||||
SIMD_size = table.Column<int>("int(11)", nullable: true),
|
||||
L1_instruction = table.Column<float>(nullable: true),
|
||||
L1_data = table.Column<float>(nullable: true),
|
||||
L2 = table.Column<float>(nullable: true),
|
||||
L3 = table.Column<float>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_processors", x => x.id);
|
||||
table.ForeignKey("fk_processors_company", x => x.company, "companies",
|
||||
"id", onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("fk_processors_instruction_set", x => x.instruction_set,
|
||||
"instruction_sets", "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("sound_synths",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
name =
|
||||
table.Column<string>("char(50)", nullable: false,
|
||||
defaultValueSql: "''"),
|
||||
company = table.Column<int>("int(11)", nullable: true),
|
||||
model_code = table.Column<string>("varchar(45)", nullable: true),
|
||||
introduced = table.Column<DateTime>("datetime", nullable: true),
|
||||
voices = table.Column<int>("int(11)", nullable: true),
|
||||
frequency = table.Column<double>(nullable: true),
|
||||
depth = table.Column<int>("int(11)", nullable: true),
|
||||
square_wave = table.Column<int>("int(11)", nullable: true),
|
||||
white_noise = table.Column<int>("int(11)", nullable: true),
|
||||
type = table.Column<int>("int(11)", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_sound_synths", x => x.id);
|
||||
table.ForeignKey("fk_sound_synths_company", x => x.company, "companies",
|
||||
"id", onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("resolutions_by_gpu",
|
||||
table => new
|
||||
{
|
||||
gpu = table.Column<int>("int(11)", nullable: false),
|
||||
resolution = table.Column<int>("int(11)", nullable: false),
|
||||
id = table.Column<long>("bigint(20)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_resolutions_by_gpu", x => x.id);
|
||||
table.ForeignKey("fk_resolutions_by_gpu_gpu", x => x.gpu, "gpus", "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey("fk_resolutions_by_gpu_resolution", x => x.resolution,
|
||||
"resolutions", "id", onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("machines",
|
||||
table => new
|
||||
{
|
||||
id =
|
||||
table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
name = table.Column<string>("varchar(255)", nullable: false),
|
||||
type =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
introduced = table.Column<DateTime>("datetime", nullable: true),
|
||||
family = table.Column<int>("int(11)", nullable: true),
|
||||
model = table.Column<string>("varchar(50)", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_machines", x => x.id);
|
||||
table.ForeignKey("fk_machines_company", x => x.company, "companies", "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("fk_machines_family", x => x.family, "machine_families",
|
||||
"id", onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("instruction_set_extensions_by_processor",
|
||||
table => new
|
||||
{
|
||||
id = table.Column<int>("int(11)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn),
|
||||
processor_id = table.Column<int>("int(11)", nullable: false),
|
||||
extension_id = table.Column<int>("int(11)", nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_instruction_set_extensions_by_processor",
|
||||
x => new {x.id, x.processor_id, x.extension_id});
|
||||
table.ForeignKey("fk_extension_extension_id", x => x.extension_id,
|
||||
"instruction_set_extensions", "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("fk_extension_processor_id", x => x.processor_id,
|
||||
"processors", "id", onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("gpus_by_machine",
|
||||
table => new
|
||||
{
|
||||
gpu = table.Column<int>("int(11)", nullable: false),
|
||||
machine = table.Column<int>("int(11)", nullable: false),
|
||||
id = table.Column<long>("bigint(20)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_gpus_by_machine", x => x.id);
|
||||
table.ForeignKey("fk_gpus_by_machine_gpu", x => x.gpu, "gpus", "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey("fk_gpus_by_machine_machine", x => x.machine, "machines",
|
||||
"id", onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("memory_by_machine",
|
||||
table => new
|
||||
{
|
||||
machine = table.Column<int>("int(11)", nullable: false),
|
||||
type =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
usage =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
size = table.Column<long>("bigint(20)", nullable: true),
|
||||
speed = table.Column<double>(nullable: true),
|
||||
id = table.Column<long>("bigint(20)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_memory_by_machine", x => x.id);
|
||||
table.ForeignKey("fk_memory_by_machine_machine", x => x.machine,
|
||||
"machines", "id", onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("processors_by_machine",
|
||||
table => new
|
||||
{
|
||||
processor = table.Column<int>("int(11)", nullable: false),
|
||||
machine = table.Column<int>("int(11)", nullable: false),
|
||||
speed = table.Column<float>(nullable: true),
|
||||
id = table.Column<long>("bigint(20)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_processors_by_machine", x => x.id);
|
||||
table.ForeignKey("fk_processors_by_machine_machine", x => x.machine,
|
||||
"machines", "id", onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey("fk_processors_by_machine_processor", x => x.processor,
|
||||
"processors", "id", onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("sound_by_machine",
|
||||
table => new
|
||||
{
|
||||
sound_synth = table.Column<int>("int(11)", nullable: false),
|
||||
machine = table.Column<int>("int(11)", nullable: false),
|
||||
id = table.Column<long>("bigint(20)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_sound_by_machine", x => x.id);
|
||||
table.ForeignKey("fk_sound_by_machine_machine", x => x.machine, "machines",
|
||||
"id", onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey("fk_sound_by_machine_sound_synth", x => x.sound_synth,
|
||||
"sound_synths", "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("storage_by_machine",
|
||||
table => new
|
||||
{
|
||||
machine = table.Column<int>("int(11)", nullable: false),
|
||||
type =
|
||||
table.Column<int>("int(11)", nullable: false, defaultValueSql: "'0'"),
|
||||
@interface =
|
||||
table.Column<int>(name: "interface", type: "int(11)", nullable: false,
|
||||
defaultValueSql: "'0'"),
|
||||
capacity = table.Column<long>("bigint(20)", nullable: true),
|
||||
id = table.Column<long>("bigint(20)", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.IdentityColumn)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_storage_by_machine", x => x.id);
|
||||
table.ForeignKey("fk_storage_by_machine_machine", x => x.machine,
|
||||
"machines", "id", onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex("idx_admins_user", "admins", "user");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_browser_tests_browser", "browser_tests", "browser");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_browser_tests_os", "browser_tests", "os");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_browser_tests_platform", "browser_tests", "platform");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_browser_tests_user_agent", "browser_tests", "user_agent");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_browser_tests_version", "browser_tests", "version");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_address", "companies", "address");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_city", "companies", "city");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_country", "companies", "country");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_facebook", "companies", "facebook");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_founded", "companies", "founded");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_name", "companies", "name");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_postal_code", "companies", "postal_code");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_province", "companies", "province");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_sold", "companies", "sold");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_sold_to", "companies", "sold_to");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_status", "companies", "status");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_twitter", "companies", "twitter");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_companies_website", "companies", "website");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_company_id", "company_descriptions", "company_id");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_text", "company_descriptions", "text");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_company_id", "company_logos", "company_id");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_id", "company_logos", "id", unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex("idx_guid", "company_logos", "logo_guid");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_forbidden_browser", "forbidden", "browser");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_forbidden_date", "forbidden", "date");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_forbidden_ip", "forbidden", "ip");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_forbidden_referer", "forbidden", "referer");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_company", "gpus", "company");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_die_size", "gpus", "die_size");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_introduced", "gpus", "introduced");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_model_code", "gpus", "model_code");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_name", "gpus", "name");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_package", "gpus", "package");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_process", "gpus", "process");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_process_nm", "gpus", "process_nm");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_transistors", "gpus", "transistors");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_by_machine_gpus", "gpus_by_machine", "gpu");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_gpus_by_machine_machine", "gpus_by_machine", "machine");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_setextension_extension", "instruction_set_extensions_by_processor",
|
||||
"extension_id");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_setextension_processor", "instruction_set_extensions_by_processor",
|
||||
"processor_id");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_name", "iso3166_1_numeric", "name");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_log_browser", "log", "browser");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_log_date", "log", "date");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_log_ip", "log", "ip");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_log_referer", "log", "referer");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_machine_families_company", "machine_families", "company");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_machine_families_name", "machine_families", "name");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_machines_company", "machines", "company");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_machines_family", "machines", "family");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_machines_introduced", "machines", "introduced");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_machines_model", "machines", "model");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_machines_name", "machines", "name");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_machines_type", "machines", "type");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_memory_by_machine_machine", "memory_by_machine", "machine");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_memory_by_machine_size", "memory_by_machine", "size");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_memory_by_machine_speed", "memory_by_machine", "speed");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_memory_by_machine_type", "memory_by_machine", "type");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_memory_by_machine_usage", "memory_by_machine", "usage");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_money_donations_donator", "money_donations", "donator");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_money_donations_quantity", "money_donations", "quantity");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_news_ip", "news", "added_id");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_news_date", "news", "date");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_news_type", "news", "type");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_boxed", "owned_computers", "boxed");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_cap1", "owned_computers", "cap1");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_cap2", "owned_computers", "cap2");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_cpu1", "owned_computers", "cpu1");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_cpu2", "owned_computers", "cpu2");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_date", "owned_computers", "date");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_db_id", "owned_computers", "db_id");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_disk1", "owned_computers", "disk1");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_disk2", "owned_computers", "disk2");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_manuals", "owned_computers", "manuals");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_mhz1", "owned_computers", "mhz1");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_mhz2", "owned_computers", "mhz2");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_ram", "owned_computers", "ram");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_rigid", "owned_computers", "rigid");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_status", "owned_computers", "status");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_trade", "owned_computers", "trade");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_computers_vram", "owned_computers", "vram");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_consoles_boxed", "owned_consoles", "boxed");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_consoles_date", "owned_consoles", "date");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_consoles_db_id", "owned_consoles", "db_id");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_consoles_manuals", "owned_consoles", "manuals");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_consoles_status", "owned_consoles", "status");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_owned_consoles_trade", "owned_consoles", "trade");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_addr_bus", "processors", "addr_bus");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_company", "processors", "company");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_cores", "processors", "cores");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_data_bus", "processors", "data_bus");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_die_size", "processors", "die_size");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_FPR_size", "processors", "FPR_size");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_FPRs", "processors", "FPRs");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_GPR_size", "processors", "GPR_size");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_GPRs", "processors", "GPRs");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_instruction_set", "processors", "instruction_set");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_introduced", "processors", "introduced");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_L1_data", "processors", "L1_data");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_L1_instruction", "processors", "L1_instruction");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_L2", "processors", "L2");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_L3", "processors", "L3");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_model_code", "processors", "model_code");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_name", "processors", "name");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_package", "processors", "package");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_process", "processors", "process");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_process_nm", "processors", "process_nm");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_SIMD_registers", "processors", "SIMD_registers");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_SIMD_size", "processors", "SIMD_size");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_speed", "processors", "speed");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_threads_per_core", "processors", "threads_per_core");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_transistors", "processors", "transistors");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_by_machine_machine", "processors_by_machine", "machine");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_by_machine_processor", "processors_by_machine", "processor");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_processors_by_machine_speed", "processors_by_machine", "speed");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_resolutions_colors", "resolutions", "colors");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_resolutions_height", "resolutions", "height");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_resolutions_palette", "resolutions", "palette");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_resolutions_width", "resolutions", "width");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_resolutions_resolution", "resolutions", new[] {"width", "height"});
|
||||
|
||||
migrationBuilder.CreateIndex("idx_resolutions_resolution_with_color", "resolutions",
|
||||
new[] {"width", "height", "colors"});
|
||||
|
||||
migrationBuilder.CreateIndex("idx_resolutions_resolution_with_color_and_palette", "resolutions",
|
||||
new[] {"width", "height", "colors", "palette"});
|
||||
|
||||
migrationBuilder.CreateIndex("idx_resolutions_by_gpu_gpu", "resolutions_by_gpu", "gpu");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_resolutions_by_gpu_resolution", "resolutions_by_gpu", "resolution");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_by_machine_machine", "sound_by_machine", "machine");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_by_machine_sound_synth", "sound_by_machine", "sound_synth");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_company", "sound_synths", "company");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_depth", "sound_synths", "depth");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_frequency", "sound_synths", "frequency");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_introduced", "sound_synths", "introduced");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_model_code", "sound_synths", "model_code");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_name", "sound_synths", "name");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_square_wave", "sound_synths", "square_wave");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_type", "sound_synths", "type");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_voices", "sound_synths", "voices");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_sound_synths_white_noise", "sound_synths", "white_noise");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_storage_capacity", "storage_by_machine", "capacity");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_storage_interface", "storage_by_machine", "interface");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_storage_machine", "storage_by_machine", "machine");
|
||||
|
||||
migrationBuilder.CreateIndex("idx_storage_type", "storage_by_machine", "type");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("admins");
|
||||
|
||||
migrationBuilder.DropTable("browser_tests");
|
||||
|
||||
migrationBuilder.DropTable("cicm_db");
|
||||
|
||||
migrationBuilder.DropTable("company_descriptions");
|
||||
|
||||
migrationBuilder.DropTable("company_logos");
|
||||
|
||||
migrationBuilder.DropTable("forbidden");
|
||||
|
||||
migrationBuilder.DropTable("gpus_by_machine");
|
||||
|
||||
migrationBuilder.DropTable("instruction_set_extensions_by_processor");
|
||||
|
||||
migrationBuilder.DropTable("log");
|
||||
|
||||
migrationBuilder.DropTable("memory_by_machine");
|
||||
|
||||
migrationBuilder.DropTable("money_donations");
|
||||
|
||||
migrationBuilder.DropTable("news");
|
||||
|
||||
migrationBuilder.DropTable("owned_computers");
|
||||
|
||||
migrationBuilder.DropTable("owned_consoles");
|
||||
|
||||
migrationBuilder.DropTable("processors_by_machine");
|
||||
|
||||
migrationBuilder.DropTable("resolutions_by_gpu");
|
||||
|
||||
migrationBuilder.DropTable("sound_by_machine");
|
||||
|
||||
migrationBuilder.DropTable("storage_by_machine");
|
||||
|
||||
migrationBuilder.DropTable("instruction_set_extensions");
|
||||
|
||||
migrationBuilder.DropTable("processors");
|
||||
|
||||
migrationBuilder.DropTable("gpus");
|
||||
|
||||
migrationBuilder.DropTable("resolutions");
|
||||
|
||||
migrationBuilder.DropTable("sound_synths");
|
||||
|
||||
migrationBuilder.DropTable("machines");
|
||||
|
||||
migrationBuilder.DropTable("instruction_sets");
|
||||
|
||||
migrationBuilder.DropTable("machine_families");
|
||||
|
||||
migrationBuilder.DropTable("companies");
|
||||
|
||||
migrationBuilder.DropTable("iso3166_1_numeric");
|
||||
}
|
||||
}
|
||||
}
|
||||
1066
Cicm.Database/Migrations/cicmContextModelSnapshot.cs
Normal file
1066
Cicm.Database/Migrations/cicmContextModelSnapshot.cs
Normal file
File diff suppressed because it is too large
Load Diff
9
Cicm.Database/Models/Admins.cs
Normal file
9
Cicm.Database/Models/Admins.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class Admins
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string User { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
23
Cicm.Database/Models/BrowserTests.cs
Normal file
23
Cicm.Database/Models/BrowserTests.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class BrowserTests
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string UserAgent { get; set; }
|
||||
public string Browser { get; set; }
|
||||
public string Version { get; set; }
|
||||
public string Os { get; set; }
|
||||
public string Platform { get; set; }
|
||||
public sbyte Gif87 { get; set; }
|
||||
public sbyte Gif89 { get; set; }
|
||||
public sbyte Jpeg { get; set; }
|
||||
public sbyte Png { get; set; }
|
||||
public sbyte Pngt { get; set; }
|
||||
public sbyte Agif { get; set; }
|
||||
public sbyte Table { get; set; }
|
||||
public sbyte Colors { get; set; }
|
||||
public sbyte Js { get; set; }
|
||||
public sbyte Frames { get; set; }
|
||||
public sbyte Flash { get; set; }
|
||||
}
|
||||
}
|
||||
11
Cicm.Database/Models/CicmDb.cs
Normal file
11
Cicm.Database/Models/CicmDb.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class CicmDb
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Version { get; set; }
|
||||
public DateTime? Updated { get; set; }
|
||||
}
|
||||
}
|
||||
45
Cicm.Database/Models/Companies.cs
Normal file
45
Cicm.Database/Models/Companies.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class Companies
|
||||
{
|
||||
public Companies()
|
||||
{
|
||||
CompanyLogos = new HashSet<CompanyLogos>();
|
||||
Gpus = new HashSet<Gpus>();
|
||||
InverseSoldToNavigation = new HashSet<Companies>();
|
||||
MachineFamilies = new HashSet<MachineFamilies>();
|
||||
Machines = new HashSet<Machines>();
|
||||
Processors = new HashSet<Processors>();
|
||||
SoundSynths = new HashSet<SoundSynths>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public DateTime? Founded { get; set; }
|
||||
public string Website { get; set; }
|
||||
public string Twitter { get; set; }
|
||||
public string Facebook { get; set; }
|
||||
public DateTime? Sold { get; set; }
|
||||
public int? SoldTo { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string City { get; set; }
|
||||
public string Province { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public short? Country { get; set; }
|
||||
public int Status { get; set; }
|
||||
|
||||
public Iso31661Numeric CountryNavigation { get; set; }
|
||||
public Companies SoldToNavigation { get; set; }
|
||||
public CompanyDescriptions CompanyDescriptions { get; set; }
|
||||
public ICollection<CompanyLogos> CompanyLogos { get; set; }
|
||||
public ICollection<Gpus> Gpus { get; set; }
|
||||
public ICollection<Companies> InverseSoldToNavigation { get; set; }
|
||||
public ICollection<MachineFamilies> MachineFamilies { get; set; }
|
||||
public ICollection<Machines> Machines { get; set; }
|
||||
public ICollection<Processors> Processors { get; set; }
|
||||
public ICollection<SoundSynths> SoundSynths { get; set; }
|
||||
}
|
||||
}
|
||||
11
Cicm.Database/Models/CompanyDescriptions.cs
Normal file
11
Cicm.Database/Models/CompanyDescriptions.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class CompanyDescriptions
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public string Text { get; set; }
|
||||
|
||||
public Companies IdNavigation { get; set; }
|
||||
}
|
||||
}
|
||||
12
Cicm.Database/Models/CompanyLogos.cs
Normal file
12
Cicm.Database/Models/CompanyLogos.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class CompanyLogos
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
public int? Year { get; set; }
|
||||
public string LogoGuid { get; set; }
|
||||
|
||||
public Companies Company { get; set; }
|
||||
}
|
||||
}
|
||||
11
Cicm.Database/Models/Forbidden.cs
Normal file
11
Cicm.Database/Models/Forbidden.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class Forbidden
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Browser { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string Ip { get; set; }
|
||||
public string Referer { get; set; }
|
||||
}
|
||||
}
|
||||
29
Cicm.Database/Models/Gpus.cs
Normal file
29
Cicm.Database/Models/Gpus.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class Gpus
|
||||
{
|
||||
public Gpus()
|
||||
{
|
||||
GpusByMachine = new HashSet<GpusByMachine>();
|
||||
ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int? Company { get; set; }
|
||||
public string ModelCode { get; set; }
|
||||
public DateTime? Introduced { get; set; }
|
||||
public string Package { get; set; }
|
||||
public string Process { get; set; }
|
||||
public float? ProcessNm { get; set; }
|
||||
public float? DieSize { get; set; }
|
||||
public long? Transistors { get; set; }
|
||||
|
||||
public Companies CompanyNavigation { get; set; }
|
||||
public ICollection<GpusByMachine> GpusByMachine { get; set; }
|
||||
public ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
|
||||
}
|
||||
}
|
||||
12
Cicm.Database/Models/GpusByMachine.cs
Normal file
12
Cicm.Database/Models/GpusByMachine.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class GpusByMachine
|
||||
{
|
||||
public int Gpu { get; set; }
|
||||
public int Machine { get; set; }
|
||||
public long Id { get; set; }
|
||||
|
||||
public Gpus GpuNavigation { get; set; }
|
||||
public Machines MachineNavigation { get; set; }
|
||||
}
|
||||
}
|
||||
17
Cicm.Database/Models/InstructionSetExtensions.cs
Normal file
17
Cicm.Database/Models/InstructionSetExtensions.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class InstructionSetExtensions
|
||||
{
|
||||
public InstructionSetExtensions()
|
||||
{
|
||||
InstructionSetExtensionsByProcessor = new HashSet<InstructionSetExtensionsByProcessor>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Extension { get; set; }
|
||||
|
||||
public ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensionsByProcessor { get; set; }
|
||||
}
|
||||
}
|
||||
12
Cicm.Database/Models/InstructionSetExtensionsByProcessor.cs
Normal file
12
Cicm.Database/Models/InstructionSetExtensionsByProcessor.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class InstructionSetExtensionsByProcessor
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ProcessorId { get; set; }
|
||||
public int ExtensionId { get; set; }
|
||||
|
||||
public InstructionSetExtensions Extension { get; set; }
|
||||
public Processors Processor { get; set; }
|
||||
}
|
||||
}
|
||||
17
Cicm.Database/Models/InstructionSets.cs
Normal file
17
Cicm.Database/Models/InstructionSets.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class InstructionSets
|
||||
{
|
||||
public InstructionSets()
|
||||
{
|
||||
Processors = new HashSet<Processors>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public string InstructionSet { get; set; }
|
||||
|
||||
public ICollection<Processors> Processors { get; set; }
|
||||
}
|
||||
}
|
||||
17
Cicm.Database/Models/Iso31661Numeric.cs
Normal file
17
Cicm.Database/Models/Iso31661Numeric.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class Iso31661Numeric
|
||||
{
|
||||
public Iso31661Numeric()
|
||||
{
|
||||
Companies = new HashSet<Companies>();
|
||||
}
|
||||
|
||||
public short Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public ICollection<Companies> Companies { get; set; }
|
||||
}
|
||||
}
|
||||
11
Cicm.Database/Models/Log.cs
Normal file
11
Cicm.Database/Models/Log.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class Log
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Browser { get; set; }
|
||||
public string Ip { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string Referer { get; set; }
|
||||
}
|
||||
}
|
||||
19
Cicm.Database/Models/MachineFamilies.cs
Normal file
19
Cicm.Database/Models/MachineFamilies.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class MachineFamilies
|
||||
{
|
||||
public MachineFamilies()
|
||||
{
|
||||
Machines = new HashSet<Machines>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public int Company { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public Companies CompanyNavigation { get; set; }
|
||||
public ICollection<Machines> Machines { get; set; }
|
||||
}
|
||||
}
|
||||
33
Cicm.Database/Models/Machines.cs
Normal file
33
Cicm.Database/Models/Machines.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class Machines
|
||||
{
|
||||
public Machines()
|
||||
{
|
||||
GpusByMachine = new HashSet<GpusByMachine>();
|
||||
MemoryByMachine = new HashSet<MemoryByMachine>();
|
||||
ProcessorsByMachine = new HashSet<ProcessorsByMachine>();
|
||||
SoundByMachine = new HashSet<SoundByMachine>();
|
||||
StorageByMachine = new HashSet<StorageByMachine>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public int Company { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int Type { get; set; }
|
||||
public DateTime? Introduced { get; set; }
|
||||
public int? Family { get; set; }
|
||||
public string Model { get; set; }
|
||||
|
||||
public Companies CompanyNavigation { get; set; }
|
||||
public MachineFamilies FamilyNavigation { get; set; }
|
||||
public ICollection<GpusByMachine> GpusByMachine { get; set; }
|
||||
public ICollection<MemoryByMachine> MemoryByMachine { get; set; }
|
||||
public ICollection<ProcessorsByMachine> ProcessorsByMachine { get; set; }
|
||||
public ICollection<SoundByMachine> SoundByMachine { get; set; }
|
||||
public ICollection<StorageByMachine> StorageByMachine { get; set; }
|
||||
}
|
||||
}
|
||||
14
Cicm.Database/Models/MemoryByMachine.cs
Normal file
14
Cicm.Database/Models/MemoryByMachine.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class MemoryByMachine
|
||||
{
|
||||
public int Machine { get; set; }
|
||||
public int Type { get; set; }
|
||||
public int Usage { get; set; }
|
||||
public long? Size { get; set; }
|
||||
public double? Speed { get; set; }
|
||||
public long Id { get; set; }
|
||||
|
||||
public Machines MachineNavigation { get; set; }
|
||||
}
|
||||
}
|
||||
9
Cicm.Database/Models/MoneyDonations.cs
Normal file
9
Cicm.Database/Models/MoneyDonations.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class MoneyDonations
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Donator { get; set; }
|
||||
public decimal Quantity { get; set; }
|
||||
}
|
||||
}
|
||||
10
Cicm.Database/Models/News.cs
Normal file
10
Cicm.Database/Models/News.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class News
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Date { get; set; }
|
||||
public int Type { get; set; }
|
||||
public int AddedId { get; set; }
|
||||
}
|
||||
}
|
||||
24
Cicm.Database/Models/OwnedComputers.cs
Normal file
24
Cicm.Database/Models/OwnedComputers.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class OwnedComputers
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int DbId { get; set; }
|
||||
public string Date { get; set; }
|
||||
public int Status { get; set; }
|
||||
public int Trade { get; set; }
|
||||
public int Boxed { get; set; }
|
||||
public int Manuals { get; set; }
|
||||
public int Cpu1 { get; set; }
|
||||
public decimal Mhz1 { get; set; }
|
||||
public int Cpu2 { get; set; }
|
||||
public decimal Mhz2 { get; set; }
|
||||
public int Ram { get; set; }
|
||||
public int Vram { get; set; }
|
||||
public string Rigid { get; set; }
|
||||
public int Disk1 { get; set; }
|
||||
public int Cap1 { get; set; }
|
||||
public int Disk2 { get; set; }
|
||||
public int Cap2 { get; set; }
|
||||
}
|
||||
}
|
||||
13
Cicm.Database/Models/OwnedConsoles.cs
Normal file
13
Cicm.Database/Models/OwnedConsoles.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class OwnedConsoles
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int DbId { get; set; }
|
||||
public string Date { get; set; }
|
||||
public int Status { get; set; }
|
||||
public int Trade { get; set; }
|
||||
public int Boxed { get; set; }
|
||||
public int Manuals { get; set; }
|
||||
}
|
||||
}
|
||||
46
Cicm.Database/Models/Processors.cs
Normal file
46
Cicm.Database/Models/Processors.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class Processors
|
||||
{
|
||||
public Processors()
|
||||
{
|
||||
InstructionSetExtensionsByProcessor = new HashSet<InstructionSetExtensionsByProcessor>();
|
||||
ProcessorsByMachine = new HashSet<ProcessorsByMachine>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int? Company { get; set; }
|
||||
public string ModelCode { get; set; }
|
||||
public DateTime? Introduced { get; set; }
|
||||
public int? InstructionSet { get; set; }
|
||||
public double? Speed { get; set; }
|
||||
public string Package { get; set; }
|
||||
public int? Gprs { get; set; }
|
||||
public int? GprSize { get; set; }
|
||||
public int? Fprs { get; set; }
|
||||
public int? FprSize { get; set; }
|
||||
public int? Cores { get; set; }
|
||||
public int? ThreadsPerCore { get; set; }
|
||||
public string Process { get; set; }
|
||||
public float? ProcessNm { get; set; }
|
||||
public float? DieSize { get; set; }
|
||||
public long? Transistors { get; set; }
|
||||
public int? DataBus { get; set; }
|
||||
public int? AddrBus { get; set; }
|
||||
public int? SimdRegisters { get; set; }
|
||||
public int? SimdSize { get; set; }
|
||||
public float? L1Instruction { get; set; }
|
||||
public float? L1Data { get; set; }
|
||||
public float? L2 { get; set; }
|
||||
public float? L3 { get; set; }
|
||||
|
||||
public Companies CompanyNavigation { get; set; }
|
||||
public InstructionSets InstructionSetNavigation { get; set; }
|
||||
public ICollection<InstructionSetExtensionsByProcessor> InstructionSetExtensionsByProcessor { get; set; }
|
||||
public ICollection<ProcessorsByMachine> ProcessorsByMachine { get; set; }
|
||||
}
|
||||
}
|
||||
13
Cicm.Database/Models/ProcessorsByMachine.cs
Normal file
13
Cicm.Database/Models/ProcessorsByMachine.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class ProcessorsByMachine
|
||||
{
|
||||
public int Processor { get; set; }
|
||||
public int Machine { get; set; }
|
||||
public float? Speed { get; set; }
|
||||
public long Id { get; set; }
|
||||
|
||||
public Machines MachineNavigation { get; set; }
|
||||
public Processors ProcessorNavigation { get; set; }
|
||||
}
|
||||
}
|
||||
21
Cicm.Database/Models/Resolutions.cs
Normal file
21
Cicm.Database/Models/Resolutions.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class Resolutions
|
||||
{
|
||||
public Resolutions()
|
||||
{
|
||||
ResolutionsByGpu = new HashSet<ResolutionsByGpu>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
public long? Colors { get; set; }
|
||||
public long? Palette { get; set; }
|
||||
public sbyte Chars { get; set; }
|
||||
|
||||
public ICollection<ResolutionsByGpu> ResolutionsByGpu { get; set; }
|
||||
}
|
||||
}
|
||||
12
Cicm.Database/Models/ResolutionsByGpu.cs
Normal file
12
Cicm.Database/Models/ResolutionsByGpu.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class ResolutionsByGpu
|
||||
{
|
||||
public int Gpu { get; set; }
|
||||
public int Resolution { get; set; }
|
||||
public long Id { get; set; }
|
||||
|
||||
public Gpus GpuNavigation { get; set; }
|
||||
public Resolutions ResolutionNavigation { get; set; }
|
||||
}
|
||||
}
|
||||
12
Cicm.Database/Models/SoundByMachine.cs
Normal file
12
Cicm.Database/Models/SoundByMachine.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class SoundByMachine
|
||||
{
|
||||
public int SoundSynth { get; set; }
|
||||
public int Machine { get; set; }
|
||||
public long Id { get; set; }
|
||||
|
||||
public Machines MachineNavigation { get; set; }
|
||||
public SoundSynths SoundSynthNavigation { get; set; }
|
||||
}
|
||||
}
|
||||
28
Cicm.Database/Models/SoundSynths.cs
Normal file
28
Cicm.Database/Models/SoundSynths.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class SoundSynths
|
||||
{
|
||||
public SoundSynths()
|
||||
{
|
||||
SoundByMachine = new HashSet<SoundByMachine>();
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int? Company { get; set; }
|
||||
public string ModelCode { get; set; }
|
||||
public DateTime? Introduced { get; set; }
|
||||
public int? Voices { get; set; }
|
||||
public double? Frequency { get; set; }
|
||||
public int? Depth { get; set; }
|
||||
public int? SquareWave { get; set; }
|
||||
public int? WhiteNoise { get; set; }
|
||||
public int? Type { get; set; }
|
||||
|
||||
public Companies CompanyNavigation { get; set; }
|
||||
public ICollection<SoundByMachine> SoundByMachine { get; set; }
|
||||
}
|
||||
}
|
||||
13
Cicm.Database/Models/StorageByMachine.cs
Normal file
13
Cicm.Database/Models/StorageByMachine.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class StorageByMachine
|
||||
{
|
||||
public int Machine { get; set; }
|
||||
public int Type { get; set; }
|
||||
public int Interface { get; set; }
|
||||
public long? Capacity { get; set; }
|
||||
public long Id { get; set; }
|
||||
|
||||
public Machines MachineNavigation { get; set; }
|
||||
}
|
||||
}
|
||||
956
Cicm.Database/Models/cicmContext.cs
Normal file
956
Cicm.Database/Models/cicmContext.cs
Normal file
@@ -0,0 +1,956 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class cicmContext : DbContext
|
||||
{
|
||||
public cicmContext() { }
|
||||
|
||||
public cicmContext(DbContextOptions<cicmContext> options) : base(options) { }
|
||||
|
||||
public virtual DbSet<Admins> Admins { get; set; }
|
||||
public virtual DbSet<BrowserTests> BrowserTests { get; set; }
|
||||
public virtual DbSet<CicmDb> CicmDb { get; set; }
|
||||
public virtual DbSet<Companies> Companies { get; set; }
|
||||
public virtual DbSet<CompanyDescriptions> CompanyDescriptions { get; set; }
|
||||
public virtual DbSet<CompanyLogos> CompanyLogos { get; set; }
|
||||
public virtual DbSet<Forbidden> Forbidden { get; set; }
|
||||
public virtual DbSet<Gpus> Gpus { get; set; }
|
||||
public virtual DbSet<GpusByMachine> GpusByMachine { get; set; }
|
||||
public virtual DbSet<InstructionSetExtensions> InstructionSetExtensions { get; set; }
|
||||
public virtual DbSet<InstructionSetExtensionsByProcessor> InstructionSetExtensionsByProcessor { get; set; }
|
||||
public virtual DbSet<InstructionSets> InstructionSets { get; set; }
|
||||
public virtual DbSet<Iso31661Numeric> Iso31661Numeric { get; set; }
|
||||
public virtual DbSet<Log> Log { get; set; }
|
||||
public virtual DbSet<MachineFamilies> MachineFamilies { get; set; }
|
||||
public virtual DbSet<Machines> Machines { get; set; }
|
||||
public virtual DbSet<MemoryByMachine> MemoryByMachine { get; set; }
|
||||
public virtual DbSet<MoneyDonations> MoneyDonations { get; set; }
|
||||
public virtual DbSet<News> News { get; set; }
|
||||
public virtual DbSet<OwnedComputers> OwnedComputers { get; set; }
|
||||
public virtual DbSet<OwnedConsoles> OwnedConsoles { get; set; }
|
||||
public virtual DbSet<Processors> Processors { get; set; }
|
||||
public virtual DbSet<ProcessorsByMachine> ProcessorsByMachine { get; set; }
|
||||
public virtual DbSet<Resolutions> Resolutions { get; set; }
|
||||
public virtual DbSet<ResolutionsByGpu> ResolutionsByGpu { get; set; }
|
||||
public virtual DbSet<SoundByMachine> SoundByMachine { get; set; }
|
||||
public virtual DbSet<SoundSynths> SoundSynths { get; set; }
|
||||
public virtual DbSet<StorageByMachine> StorageByMachine { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if(!optionsBuilder.IsConfigured)
|
||||
{
|
||||
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
|
||||
optionsBuilder.UseMySql("server=localhost;port=3306;user=cicm;password=cicmpass;database=cicm");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Admins>(entity =>
|
||||
{
|
||||
entity.ToTable("admins");
|
||||
|
||||
entity.HasIndex(e => e.User).HasName("idx_admins_user");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Password).IsRequired().HasColumnName("password").HasColumnType("char(50)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.User).IsRequired().HasColumnName("user").HasColumnType("char(50)")
|
||||
.HasDefaultValueSql("''");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<BrowserTests>(entity =>
|
||||
{
|
||||
entity.ToTable("browser_tests");
|
||||
|
||||
entity.HasIndex(e => e.Browser).HasName("idx_browser_tests_browser");
|
||||
|
||||
entity.HasIndex(e => e.Os).HasName("idx_browser_tests_os");
|
||||
|
||||
entity.HasIndex(e => e.Platform).HasName("idx_browser_tests_platform");
|
||||
|
||||
entity.HasIndex(e => e.UserAgent).HasName("idx_browser_tests_user_agent");
|
||||
|
||||
entity.HasIndex(e => e.Version).HasName("idx_browser_tests_version");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Agif).HasColumnName("agif").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Browser).IsRequired().HasColumnName("browser").HasColumnType("varchar(64)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Colors).HasColumnName("colors").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Flash).HasColumnName("flash").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Frames).HasColumnName("frames").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Gif87).HasColumnName("gif87").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Gif89).HasColumnName("gif89").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Jpeg).HasColumnName("jpeg").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Js).HasColumnName("js").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Os).IsRequired().HasColumnName("os").HasColumnType("varchar(32)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Platform).IsRequired().HasColumnName("platform").HasColumnType("varchar(8)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Png).HasColumnName("png").HasColumnType("tinyint(1)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Pngt).HasColumnName("pngt").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Table).HasColumnName("table").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.UserAgent).IsRequired().HasColumnName("user_agent").HasColumnType("varchar(128)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Version).IsRequired().HasColumnName("version").HasColumnType("varchar(16)")
|
||||
.HasDefaultValueSql("''");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<CicmDb>(entity =>
|
||||
{
|
||||
entity.ToTable("cicm_db");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Updated).HasColumnName("updated").HasColumnType("datetime")
|
||||
.HasDefaultValueSql("'CURRENT_TIMESTAMP'");
|
||||
|
||||
entity.Property(e => e.Version).HasColumnName("version").HasColumnType("int(11)");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Companies>(entity =>
|
||||
{
|
||||
entity.ToTable("companies");
|
||||
|
||||
entity.HasIndex(e => e.Address).HasName("idx_companies_address");
|
||||
|
||||
entity.HasIndex(e => e.City).HasName("idx_companies_city");
|
||||
|
||||
entity.HasIndex(e => e.Country).HasName("idx_companies_country");
|
||||
|
||||
entity.HasIndex(e => e.Facebook).HasName("idx_companies_facebook");
|
||||
|
||||
entity.HasIndex(e => e.Founded).HasName("idx_companies_founded");
|
||||
|
||||
entity.HasIndex(e => e.Name).HasName("idx_companies_name");
|
||||
|
||||
entity.HasIndex(e => e.PostalCode).HasName("idx_companies_postal_code");
|
||||
|
||||
entity.HasIndex(e => e.Province).HasName("idx_companies_province");
|
||||
|
||||
entity.HasIndex(e => e.Sold).HasName("idx_companies_sold");
|
||||
|
||||
entity.HasIndex(e => e.SoldTo).HasName("idx_companies_sold_to");
|
||||
|
||||
entity.HasIndex(e => e.Status).HasName("idx_companies_status");
|
||||
|
||||
entity.HasIndex(e => e.Twitter).HasName("idx_companies_twitter");
|
||||
|
||||
entity.HasIndex(e => e.Website).HasName("idx_companies_website");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Address).HasColumnName("address").HasColumnType("varchar(80)");
|
||||
|
||||
entity.Property(e => e.City).HasColumnName("city").HasColumnType("varchar(80)");
|
||||
|
||||
entity.Property(e => e.Country).HasColumnName("country").HasColumnType("smallint(3)");
|
||||
|
||||
entity.Property(e => e.Facebook).HasColumnName("facebook").HasColumnType("varchar(45)");
|
||||
|
||||
entity.Property(e => e.Founded).HasColumnName("founded").HasColumnType("datetime");
|
||||
|
||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(128)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.PostalCode).HasColumnName("postal_code").HasColumnType("varchar(25)");
|
||||
|
||||
entity.Property(e => e.Province).HasColumnName("province").HasColumnType("varchar(80)");
|
||||
|
||||
entity.Property(e => e.Sold).HasColumnName("sold").HasColumnType("datetime");
|
||||
|
||||
entity.Property(e => e.SoldTo).HasColumnName("sold_to").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Status).HasColumnName("status").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Twitter).HasColumnName("twitter").HasColumnType("varchar(45)");
|
||||
|
||||
entity.Property(e => e.Website).HasColumnName("website").HasColumnType("varchar(255)");
|
||||
|
||||
entity.HasOne(d => d.CountryNavigation).WithMany(p => p.Companies).HasForeignKey(d => d.Country)
|
||||
.HasConstraintName("fk_companies_country");
|
||||
|
||||
entity.HasOne(d => d.SoldToNavigation).WithMany(p => p.InverseSoldToNavigation)
|
||||
.HasForeignKey(d => d.SoldTo).HasConstraintName("fk_companies_sold_to");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<CompanyDescriptions>(entity =>
|
||||
{
|
||||
entity.ToTable("company_descriptions");
|
||||
|
||||
entity.HasIndex(e => e.CompanyId).HasName("idx_company_id");
|
||||
|
||||
entity.HasIndex(e => e.Text).HasName("idx_text");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd();
|
||||
|
||||
entity.Property(e => e.CompanyId).HasColumnName("company_id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Text).HasColumnName("text").HasColumnType("text");
|
||||
|
||||
entity.HasOne(d => d.IdNavigation).WithOne(p => p.CompanyDescriptions)
|
||||
.HasForeignKey<CompanyDescriptions>(d => d.Id).HasConstraintName("fk_company_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<CompanyLogos>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new {e.Id, e.CompanyId, e.LogoGuid});
|
||||
|
||||
entity.ToTable("company_logos");
|
||||
|
||||
entity.HasIndex(e => e.CompanyId).HasName("idx_company_id");
|
||||
|
||||
entity.HasIndex(e => e.Id).HasName("idx_id").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.LogoGuid).HasName("idx_guid");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd();
|
||||
|
||||
entity.Property(e => e.CompanyId).HasColumnName("company_id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.LogoGuid).HasColumnName("logo_guid").HasColumnType("char(36)");
|
||||
|
||||
entity.Property(e => e.Year).HasColumnName("year").HasColumnType("int(4)");
|
||||
|
||||
entity.HasOne(d => d.Company).WithMany(p => p.CompanyLogos).HasForeignKey(d => d.CompanyId)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("fk_company_logos_company1");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Forbidden>(entity =>
|
||||
{
|
||||
entity.ToTable("forbidden");
|
||||
|
||||
entity.HasIndex(e => e.Browser).HasName("idx_forbidden_browser");
|
||||
|
||||
entity.HasIndex(e => e.Date).HasName("idx_forbidden_date");
|
||||
|
||||
entity.HasIndex(e => e.Ip).HasName("idx_forbidden_ip");
|
||||
|
||||
entity.HasIndex(e => e.Referer).HasName("idx_forbidden_referer");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Browser).IsRequired().HasColumnName("browser").HasColumnType("char(128)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Ip).IsRequired().HasColumnName("ip").HasColumnType("char(16)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Referer).IsRequired().HasColumnName("referer").HasColumnType("char(255)")
|
||||
.HasDefaultValueSql("''");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Gpus>(entity =>
|
||||
{
|
||||
entity.ToTable("gpus");
|
||||
|
||||
entity.HasIndex(e => e.Company).HasName("idx_gpus_company");
|
||||
|
||||
entity.HasIndex(e => e.DieSize).HasName("idx_gpus_die_size");
|
||||
|
||||
entity.HasIndex(e => e.Introduced).HasName("idx_gpus_introduced");
|
||||
|
||||
entity.HasIndex(e => e.ModelCode).HasName("idx_gpus_model_code");
|
||||
|
||||
entity.HasIndex(e => e.Name).HasName("idx_gpus_name");
|
||||
|
||||
entity.HasIndex(e => e.Package).HasName("idx_gpus_package");
|
||||
|
||||
entity.HasIndex(e => e.Process).HasName("idx_gpus_process");
|
||||
|
||||
entity.HasIndex(e => e.ProcessNm).HasName("idx_gpus_process_nm");
|
||||
|
||||
entity.HasIndex(e => e.Transistors).HasName("idx_gpus_transistors");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.DieSize).HasColumnName("die_size");
|
||||
|
||||
entity.Property(e => e.Introduced).HasColumnName("introduced").HasColumnType("datetime");
|
||||
|
||||
entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)");
|
||||
|
||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("char(128)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Package).HasColumnName("package").HasColumnType("varchar(45)");
|
||||
|
||||
entity.Property(e => e.Process).HasColumnName("process").HasColumnType("varchar(45)");
|
||||
|
||||
entity.Property(e => e.ProcessNm).HasColumnName("process_nm");
|
||||
|
||||
entity.Property(e => e.Transistors).HasColumnName("transistors").HasColumnType("bigint(20)");
|
||||
|
||||
entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.Gpus).HasForeignKey(d => d.Company)
|
||||
.HasConstraintName("fk_gpus_company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<GpusByMachine>(entity =>
|
||||
{
|
||||
entity.ToTable("gpus_by_machine");
|
||||
|
||||
entity.HasIndex(e => e.Gpu).HasName("idx_gpus_by_machine_gpus");
|
||||
|
||||
entity.HasIndex(e => e.Machine).HasName("idx_gpus_by_machine_machine");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Gpu).HasColumnName("gpu").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)");
|
||||
|
||||
entity.HasOne(d => d.GpuNavigation).WithMany(p => p.GpusByMachine).HasForeignKey(d => d.Gpu)
|
||||
.HasConstraintName("fk_gpus_by_machine_gpu");
|
||||
|
||||
entity.HasOne(d => d.MachineNavigation).WithMany(p => p.GpusByMachine).HasForeignKey(d => d.Machine)
|
||||
.HasConstraintName("fk_gpus_by_machine_machine");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<InstructionSetExtensions>(entity =>
|
||||
{
|
||||
entity.ToTable("instruction_set_extensions");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Extension).IsRequired().HasColumnName("extension").HasColumnType("varchar(45)");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<InstructionSetExtensionsByProcessor>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new {e.Id, e.ProcessorId, e.ExtensionId});
|
||||
|
||||
entity.ToTable("instruction_set_extensions_by_processor");
|
||||
|
||||
entity.HasIndex(e => e.ExtensionId).HasName("idx_setextension_extension");
|
||||
|
||||
entity.HasIndex(e => e.ProcessorId).HasName("idx_setextension_processor");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)").ValueGeneratedOnAdd();
|
||||
|
||||
entity.Property(e => e.ProcessorId).HasColumnName("processor_id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.ExtensionId).HasColumnName("extension_id").HasColumnType("int(11)");
|
||||
|
||||
entity.HasOne(d => d.Extension).WithMany(p => p.InstructionSetExtensionsByProcessor)
|
||||
.HasForeignKey(d => d.ExtensionId).OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("fk_extension_extension_id");
|
||||
|
||||
entity.HasOne(d => d.Processor).WithMany(p => p.InstructionSetExtensionsByProcessor)
|
||||
.HasForeignKey(d => d.ProcessorId).OnDelete(DeleteBehavior.ClientSetNull)
|
||||
.HasConstraintName("fk_extension_processor_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<InstructionSets>(entity =>
|
||||
{
|
||||
entity.ToTable("instruction_sets");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.InstructionSet).IsRequired().HasColumnName("instruction_set")
|
||||
.HasColumnType("varchar(45)");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Iso31661Numeric>(entity =>
|
||||
{
|
||||
entity.ToTable("iso3166_1_numeric");
|
||||
|
||||
entity.HasIndex(e => e.Name).HasName("idx_name");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("smallint(3)");
|
||||
|
||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(64)");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Log>(entity =>
|
||||
{
|
||||
entity.ToTable("log");
|
||||
|
||||
entity.HasIndex(e => e.Browser).HasName("idx_log_browser");
|
||||
|
||||
entity.HasIndex(e => e.Date).HasName("idx_log_date");
|
||||
|
||||
entity.HasIndex(e => e.Ip).HasName("idx_log_ip");
|
||||
|
||||
entity.HasIndex(e => e.Referer).HasName("idx_log_referer");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Browser).IsRequired().HasColumnName("browser").HasColumnType("char(128)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Ip).IsRequired().HasColumnName("ip").HasColumnType("char(16)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Referer).IsRequired().HasColumnName("referer").HasColumnType("char(255)")
|
||||
.HasDefaultValueSql("''");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<MachineFamilies>(entity =>
|
||||
{
|
||||
entity.ToTable("machine_families");
|
||||
|
||||
entity.HasIndex(e => e.Company).HasName("idx_machine_families_company");
|
||||
|
||||
entity.HasIndex(e => e.Name).HasName("idx_machine_families_name");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(255)");
|
||||
|
||||
entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.MachineFamilies).HasForeignKey(d => d.Company)
|
||||
.HasConstraintName("fk_machine_families_company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Machines>(entity =>
|
||||
{
|
||||
entity.ToTable("machines");
|
||||
|
||||
entity.HasIndex(e => e.Company).HasName("idx_machines_company");
|
||||
|
||||
entity.HasIndex(e => e.Family).HasName("idx_machines_family");
|
||||
|
||||
entity.HasIndex(e => e.Introduced).HasName("idx_machines_introduced");
|
||||
|
||||
entity.HasIndex(e => e.Model).HasName("idx_machines_model");
|
||||
|
||||
entity.HasIndex(e => e.Name).HasName("idx_machines_name");
|
||||
|
||||
entity.HasIndex(e => e.Type).HasName("idx_machines_type");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Family).HasColumnName("family").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Introduced).HasColumnName("introduced").HasColumnType("datetime");
|
||||
|
||||
entity.Property(e => e.Model).HasColumnName("model").HasColumnType("varchar(50)");
|
||||
|
||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("varchar(255)");
|
||||
|
||||
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.Machines).HasForeignKey(d => d.Company)
|
||||
.OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("fk_machines_company");
|
||||
|
||||
entity.HasOne(d => d.FamilyNavigation).WithMany(p => p.Machines).HasForeignKey(d => d.Family)
|
||||
.HasConstraintName("fk_machines_family");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<MemoryByMachine>(entity =>
|
||||
{
|
||||
entity.ToTable("memory_by_machine");
|
||||
|
||||
entity.HasIndex(e => e.Machine).HasName("idx_memory_by_machine_machine");
|
||||
|
||||
entity.HasIndex(e => e.Size).HasName("idx_memory_by_machine_size");
|
||||
|
||||
entity.HasIndex(e => e.Speed).HasName("idx_memory_by_machine_speed");
|
||||
|
||||
entity.HasIndex(e => e.Type).HasName("idx_memory_by_machine_type");
|
||||
|
||||
entity.HasIndex(e => e.Usage).HasName("idx_memory_by_machine_usage");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Size).HasColumnName("size").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Speed).HasColumnName("speed");
|
||||
|
||||
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Usage).HasColumnName("usage").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.HasOne(d => d.MachineNavigation).WithMany(p => p.MemoryByMachine).HasForeignKey(d => d.Machine)
|
||||
.HasConstraintName("fk_memory_by_machine_machine");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<MoneyDonations>(entity =>
|
||||
{
|
||||
entity.ToTable("money_donations");
|
||||
|
||||
entity.HasIndex(e => e.Donator).HasName("idx_money_donations_donator");
|
||||
|
||||
entity.HasIndex(e => e.Quantity).HasName("idx_money_donations_quantity");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Donator).IsRequired().HasColumnName("donator").HasColumnType("char(128)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Quantity).HasColumnName("quantity").HasColumnType("decimal(11,2)")
|
||||
.HasDefaultValueSql("'0.00'");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<News>(entity =>
|
||||
{
|
||||
entity.ToTable("news");
|
||||
|
||||
entity.HasIndex(e => e.AddedId).HasName("idx_news_ip");
|
||||
|
||||
entity.HasIndex(e => e.Date).HasName("idx_news_date");
|
||||
|
||||
entity.HasIndex(e => e.Type).HasName("idx_news_type");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.AddedId).HasColumnName("added_id").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<OwnedComputers>(entity =>
|
||||
{
|
||||
entity.ToTable("owned_computers");
|
||||
|
||||
entity.HasIndex(e => e.Boxed).HasName("idx_owned_computers_boxed");
|
||||
|
||||
entity.HasIndex(e => e.Cap1).HasName("idx_owned_computers_cap1");
|
||||
|
||||
entity.HasIndex(e => e.Cap2).HasName("idx_owned_computers_cap2");
|
||||
|
||||
entity.HasIndex(e => e.Cpu1).HasName("idx_owned_computers_cpu1");
|
||||
|
||||
entity.HasIndex(e => e.Cpu2).HasName("idx_owned_computers_cpu2");
|
||||
|
||||
entity.HasIndex(e => e.Date).HasName("idx_owned_computers_date");
|
||||
|
||||
entity.HasIndex(e => e.DbId).HasName("idx_owned_computers_db_id");
|
||||
|
||||
entity.HasIndex(e => e.Disk1).HasName("idx_owned_computers_disk1");
|
||||
|
||||
entity.HasIndex(e => e.Disk2).HasName("idx_owned_computers_disk2");
|
||||
|
||||
entity.HasIndex(e => e.Manuals).HasName("idx_owned_computers_manuals");
|
||||
|
||||
entity.HasIndex(e => e.Mhz1).HasName("idx_owned_computers_mhz1");
|
||||
|
||||
entity.HasIndex(e => e.Mhz2).HasName("idx_owned_computers_mhz2");
|
||||
|
||||
entity.HasIndex(e => e.Ram).HasName("idx_owned_computers_ram");
|
||||
|
||||
entity.HasIndex(e => e.Rigid).HasName("idx_owned_computers_rigid");
|
||||
|
||||
entity.HasIndex(e => e.Status).HasName("idx_owned_computers_status");
|
||||
|
||||
entity.HasIndex(e => e.Trade).HasName("idx_owned_computers_trade");
|
||||
|
||||
entity.HasIndex(e => e.Vram).HasName("idx_owned_computers_vram");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Boxed).HasColumnName("boxed").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Cap1).HasColumnName("cap1").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Cap2).HasColumnName("cap2").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Cpu1).HasColumnName("cpu1").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Cpu2).HasColumnName("cpu2").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("varchar(20)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.DbId).HasColumnName("db_id").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Disk1).HasColumnName("disk1").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Disk2).HasColumnName("disk2").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Manuals).HasColumnName("manuals").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Mhz1).HasColumnName("mhz1").HasColumnType("decimal(10,0)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Mhz2).HasColumnName("mhz2").HasColumnType("decimal(10,0)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Ram).HasColumnName("ram").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Rigid).IsRequired().HasColumnName("rigid").HasColumnType("varchar(64)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Status).HasColumnName("status").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Trade).HasColumnName("trade").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Vram).HasColumnName("vram").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<OwnedConsoles>(entity =>
|
||||
{
|
||||
entity.ToTable("owned_consoles");
|
||||
|
||||
entity.HasIndex(e => e.Boxed).HasName("idx_owned_consoles_boxed");
|
||||
|
||||
entity.HasIndex(e => e.Date).HasName("idx_owned_consoles_date");
|
||||
|
||||
entity.HasIndex(e => e.DbId).HasName("idx_owned_consoles_db_id");
|
||||
|
||||
entity.HasIndex(e => e.Manuals).HasName("idx_owned_consoles_manuals");
|
||||
|
||||
entity.HasIndex(e => e.Status).HasName("idx_owned_consoles_status");
|
||||
|
||||
entity.HasIndex(e => e.Trade).HasName("idx_owned_consoles_trade");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Boxed).HasColumnName("boxed").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.DbId).HasColumnName("db_id").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Manuals).HasColumnName("manuals").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Status).HasColumnName("status").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Trade).HasColumnName("trade").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Processors>(entity =>
|
||||
{
|
||||
entity.ToTable("processors");
|
||||
|
||||
entity.HasIndex(e => e.AddrBus).HasName("idx_processors_addr_bus");
|
||||
|
||||
entity.HasIndex(e => e.Company).HasName("idx_processors_company");
|
||||
|
||||
entity.HasIndex(e => e.Cores).HasName("idx_processors_cores");
|
||||
|
||||
entity.HasIndex(e => e.DataBus).HasName("idx_processors_data_bus");
|
||||
|
||||
entity.HasIndex(e => e.DieSize).HasName("idx_processors_die_size");
|
||||
|
||||
entity.HasIndex(e => e.FprSize).HasName("idx_processors_FPR_size");
|
||||
|
||||
entity.HasIndex(e => e.Fprs).HasName("idx_processors_FPRs");
|
||||
|
||||
entity.HasIndex(e => e.GprSize).HasName("idx_processors_GPR_size");
|
||||
|
||||
entity.HasIndex(e => e.Gprs).HasName("idx_processors_GPRs");
|
||||
|
||||
entity.HasIndex(e => e.InstructionSet).HasName("idx_processors_instruction_set");
|
||||
|
||||
entity.HasIndex(e => e.Introduced).HasName("idx_processors_introduced");
|
||||
|
||||
entity.HasIndex(e => e.L1Data).HasName("idx_processors_L1_data");
|
||||
|
||||
entity.HasIndex(e => e.L1Instruction).HasName("idx_processors_L1_instruction");
|
||||
|
||||
entity.HasIndex(e => e.L2).HasName("idx_processors_L2");
|
||||
|
||||
entity.HasIndex(e => e.L3).HasName("idx_processors_L3");
|
||||
|
||||
entity.HasIndex(e => e.ModelCode).HasName("idx_processors_model_code");
|
||||
|
||||
entity.HasIndex(e => e.Name).HasName("idx_processors_name");
|
||||
|
||||
entity.HasIndex(e => e.Package).HasName("idx_processors_package");
|
||||
|
||||
entity.HasIndex(e => e.Process).HasName("idx_processors_process");
|
||||
|
||||
entity.HasIndex(e => e.ProcessNm).HasName("idx_processors_process_nm");
|
||||
|
||||
entity.HasIndex(e => e.SimdRegisters).HasName("idx_processors_SIMD_registers");
|
||||
|
||||
entity.HasIndex(e => e.SimdSize).HasName("idx_processors_SIMD_size");
|
||||
|
||||
entity.HasIndex(e => e.Speed).HasName("idx_processors_speed");
|
||||
|
||||
entity.HasIndex(e => e.ThreadsPerCore).HasName("idx_processors_threads_per_core");
|
||||
|
||||
entity.HasIndex(e => e.Transistors).HasName("idx_processors_transistors");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.AddrBus).HasColumnName("addr_bus").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Cores).HasColumnName("cores").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.DataBus).HasColumnName("data_bus").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.DieSize).HasColumnName("die_size");
|
||||
|
||||
entity.Property(e => e.FprSize).HasColumnName("FPR_size").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Fprs).HasColumnName("FPRs").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.GprSize).HasColumnName("GPR_size").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Gprs).HasColumnName("GPRs").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.InstructionSet).HasColumnName("instruction_set").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Introduced).HasColumnName("introduced").HasColumnType("datetime");
|
||||
|
||||
entity.Property(e => e.L1Data).HasColumnName("L1_data");
|
||||
|
||||
entity.Property(e => e.L1Instruction).HasColumnName("L1_instruction");
|
||||
|
||||
entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)");
|
||||
|
||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("char(50)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.Package).HasColumnName("package").HasColumnType("varchar(45)");
|
||||
|
||||
entity.Property(e => e.Process).HasColumnName("process").HasColumnType("varchar(45)");
|
||||
|
||||
entity.Property(e => e.ProcessNm).HasColumnName("process_nm");
|
||||
|
||||
entity.Property(e => e.SimdRegisters).HasColumnName("SIMD_registers").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.SimdSize).HasColumnName("SIMD_size").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Speed).HasColumnName("speed");
|
||||
|
||||
entity.Property(e => e.ThreadsPerCore).HasColumnName("threads_per_core").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Transistors).HasColumnName("transistors").HasColumnType("bigint(20)");
|
||||
|
||||
entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.Processors).HasForeignKey(d => d.Company)
|
||||
.HasConstraintName("fk_processors_company");
|
||||
|
||||
entity.HasOne(d => d.InstructionSetNavigation).WithMany(p => p.Processors)
|
||||
.HasForeignKey(d => d.InstructionSet).HasConstraintName("fk_processors_instruction_set");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ProcessorsByMachine>(entity =>
|
||||
{
|
||||
entity.ToTable("processors_by_machine");
|
||||
|
||||
entity.HasIndex(e => e.Machine).HasName("idx_processors_by_machine_machine");
|
||||
|
||||
entity.HasIndex(e => e.Processor).HasName("idx_processors_by_machine_processor");
|
||||
|
||||
entity.HasIndex(e => e.Speed).HasName("idx_processors_by_machine_speed");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Processor).HasColumnName("processor").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Speed).HasColumnName("speed");
|
||||
|
||||
entity.HasOne(d => d.MachineNavigation).WithMany(p => p.ProcessorsByMachine)
|
||||
.HasForeignKey(d => d.Machine).HasConstraintName("fk_processors_by_machine_machine");
|
||||
|
||||
entity.HasOne(d => d.ProcessorNavigation).WithMany(p => p.ProcessorsByMachine)
|
||||
.HasForeignKey(d => d.Processor).HasConstraintName("fk_processors_by_machine_processor");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Resolutions>(entity =>
|
||||
{
|
||||
entity.ToTable("resolutions");
|
||||
|
||||
entity.HasIndex(e => e.Colors).HasName("idx_resolutions_colors");
|
||||
|
||||
entity.HasIndex(e => e.Height).HasName("idx_resolutions_height");
|
||||
|
||||
entity.HasIndex(e => e.Palette).HasName("idx_resolutions_palette");
|
||||
|
||||
entity.HasIndex(e => e.Width).HasName("idx_resolutions_width");
|
||||
|
||||
entity.HasIndex(e => new {e.Width, e.Height}).HasName("idx_resolutions_resolution");
|
||||
|
||||
entity.HasIndex(e => new {e.Width, e.Height, e.Colors})
|
||||
.HasName("idx_resolutions_resolution_with_color");
|
||||
|
||||
entity.HasIndex(e => new {e.Width, e.Height, e.Colors, e.Palette})
|
||||
.HasName("idx_resolutions_resolution_with_color_and_palette");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Chars).HasColumnName("chars").HasColumnType("tinyint(1)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Colors).HasColumnName("colors").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Height).HasColumnName("height").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Palette).HasColumnName("palette").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Width).HasColumnName("width").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ResolutionsByGpu>(entity =>
|
||||
{
|
||||
entity.ToTable("resolutions_by_gpu");
|
||||
|
||||
entity.HasIndex(e => e.Gpu).HasName("idx_resolutions_by_gpu_gpu");
|
||||
|
||||
entity.HasIndex(e => e.Resolution).HasName("idx_resolutions_by_gpu_resolution");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Gpu).HasColumnName("gpu").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Resolution).HasColumnName("resolution").HasColumnType("int(11)");
|
||||
|
||||
entity.HasOne(d => d.GpuNavigation).WithMany(p => p.ResolutionsByGpu).HasForeignKey(d => d.Gpu)
|
||||
.HasConstraintName("fk_resolutions_by_gpu_gpu");
|
||||
|
||||
entity.HasOne(d => d.ResolutionNavigation).WithMany(p => p.ResolutionsByGpu)
|
||||
.HasForeignKey(d => d.Resolution).HasConstraintName("fk_resolutions_by_gpu_resolution");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<SoundByMachine>(entity =>
|
||||
{
|
||||
entity.ToTable("sound_by_machine");
|
||||
|
||||
entity.HasIndex(e => e.Machine).HasName("idx_sound_by_machine_machine");
|
||||
|
||||
entity.HasIndex(e => e.SoundSynth).HasName("idx_sound_by_machine_sound_synth");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.SoundSynth).HasColumnName("sound_synth").HasColumnType("int(11)");
|
||||
|
||||
entity.HasOne(d => d.MachineNavigation).WithMany(p => p.SoundByMachine).HasForeignKey(d => d.Machine)
|
||||
.HasConstraintName("fk_sound_by_machine_machine");
|
||||
|
||||
entity.HasOne(d => d.SoundSynthNavigation).WithMany(p => p.SoundByMachine)
|
||||
.HasForeignKey(d => d.SoundSynth).HasConstraintName("fk_sound_by_machine_sound_synth");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<SoundSynths>(entity =>
|
||||
{
|
||||
entity.ToTable("sound_synths");
|
||||
|
||||
entity.HasIndex(e => e.Company).HasName("idx_sound_synths_company");
|
||||
|
||||
entity.HasIndex(e => e.Depth).HasName("idx_sound_synths_depth");
|
||||
|
||||
entity.HasIndex(e => e.Frequency).HasName("idx_sound_synths_frequency");
|
||||
|
||||
entity.HasIndex(e => e.Introduced).HasName("idx_sound_synths_introduced");
|
||||
|
||||
entity.HasIndex(e => e.ModelCode).HasName("idx_sound_synths_model_code");
|
||||
|
||||
entity.HasIndex(e => e.Name).HasName("idx_sound_synths_name");
|
||||
|
||||
entity.HasIndex(e => e.SquareWave).HasName("idx_sound_synths_square_wave");
|
||||
|
||||
entity.HasIndex(e => e.Type).HasName("idx_sound_synths_type");
|
||||
|
||||
entity.HasIndex(e => e.Voices).HasName("idx_sound_synths_voices");
|
||||
|
||||
entity.HasIndex(e => e.WhiteNoise).HasName("idx_sound_synths_white_noise");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Company).HasColumnName("company").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Depth).HasColumnName("depth").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Frequency).HasColumnName("frequency");
|
||||
|
||||
entity.Property(e => e.Introduced).HasColumnName("introduced").HasColumnType("datetime");
|
||||
|
||||
entity.Property(e => e.ModelCode).HasColumnName("model_code").HasColumnType("varchar(45)");
|
||||
|
||||
entity.Property(e => e.Name).IsRequired().HasColumnName("name").HasColumnType("char(50)")
|
||||
.HasDefaultValueSql("''");
|
||||
|
||||
entity.Property(e => e.SquareWave).HasColumnName("square_wave").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Voices).HasColumnName("voices").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.WhiteNoise).HasColumnName("white_noise").HasColumnType("int(11)");
|
||||
|
||||
entity.HasOne(d => d.CompanyNavigation).WithMany(p => p.SoundSynths).HasForeignKey(d => d.Company)
|
||||
.HasConstraintName("fk_sound_synths_company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<StorageByMachine>(entity =>
|
||||
{
|
||||
entity.ToTable("storage_by_machine");
|
||||
|
||||
entity.HasIndex(e => e.Capacity).HasName("idx_storage_capacity");
|
||||
|
||||
entity.HasIndex(e => e.Interface).HasName("idx_storage_interface");
|
||||
|
||||
entity.HasIndex(e => e.Machine).HasName("idx_storage_machine");
|
||||
|
||||
entity.HasIndex(e => e.Type).HasName("idx_storage_type");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Capacity).HasColumnName("capacity").HasColumnType("bigint(20)");
|
||||
|
||||
entity.Property(e => e.Interface).HasColumnName("interface").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Machine).HasColumnName("machine").HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
|
||||
entity.HasOne(d => d.MachineNavigation).WithMany(p => p.StorageByMachine).HasForeignKey(d => d.Machine)
|
||||
.HasConstraintName("fk_storage_by_machine_machine");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user