mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Code re-style.
This commit is contained in:
@@ -230,7 +230,8 @@ namespace Marechai.Database.Migrations
|
||||
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)")
|
||||
country = table.Column<short>("smallint(3)", nullable: true),
|
||||
status = table.Column<int>("int(11)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_companies", x => x.id);
|
||||
@@ -246,7 +247,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
id = table.Column<int>("int(11)").
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company_id = table.Column<int>("int(11)"), text = table.Column<string>("text", nullable: true)
|
||||
company_id = table.Column<int>("int(11)"),
|
||||
text = table.Column<string>("text", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_company_descriptions", x => x.id);
|
||||
@@ -257,13 +259,16 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
id = table.Column<int>("int(11)").
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company_id = table.Column<int>("int(11)"), year = table.Column<int>("int(4)", nullable: true),
|
||||
company_id = table.Column<int>("int(11)"),
|
||||
year = table.Column<int>("int(4)", nullable: true),
|
||||
logo_guid = table.Column<string>("char(36)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_company_logos", x => new
|
||||
{
|
||||
x.id, x.company_id, x.logo_guid
|
||||
x.id,
|
||||
x.company_id,
|
||||
x.logo_guid
|
||||
});
|
||||
|
||||
table.ForeignKey("fk_company_logos_company1", x => x.company_id, "companies", "id",
|
||||
@@ -280,7 +285,8 @@ namespace Marechai.Database.Migrations
|
||||
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),
|
||||
process_nm = table.Column<float>(nullable: true),
|
||||
die_size = table.Column<float>(nullable: true),
|
||||
transistors = table.Column<long>("bigint(20)", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
@@ -294,7 +300,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
id = table.Column<int>("int(11)").
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company = table.Column<int>("int(11)"), name = table.Column<string>("varchar(255)")
|
||||
company = table.Column<int>("int(11)"),
|
||||
name = table.Column<string>("varchar(255)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_machine_families", x => x.id);
|
||||
@@ -321,14 +328,17 @@ namespace Marechai.Database.Migrations
|
||||
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),
|
||||
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)
|
||||
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);
|
||||
@@ -364,7 +374,8 @@ namespace Marechai.Database.Migrations
|
||||
|
||||
migrationBuilder.CreateTable("resolutions_by_gpu", table => new
|
||||
{
|
||||
gpu = table.Column<int>("int(11)"), resolution = table.Column<int>("int(11)"),
|
||||
gpu = table.Column<int>("int(11)"),
|
||||
resolution = table.Column<int>("int(11)"),
|
||||
id = table.Column<long>("bigint(20)").
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
}, constraints: table =>
|
||||
@@ -403,12 +414,15 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
id = table.Column<int>("int(11)").
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
processor_id = table.Column<int>("int(11)"), extension_id = table.Column<int>("int(11)")
|
||||
processor_id = table.Column<int>("int(11)"),
|
||||
extension_id = table.Column<int>("int(11)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_instruction_set_extensions_by_processor", x => new
|
||||
{
|
||||
x.id, x.processor_id, x.extension_id
|
||||
x.id,
|
||||
x.processor_id,
|
||||
x.extension_id
|
||||
});
|
||||
|
||||
table.ForeignKey("fk_extension_extension_id", x => x.extension_id, "instruction_set_extensions", "id",
|
||||
@@ -420,7 +434,8 @@ namespace Marechai.Database.Migrations
|
||||
|
||||
migrationBuilder.CreateTable("gpus_by_machine", table => new
|
||||
{
|
||||
gpu = table.Column<int>("int(11)"), machine = table.Column<int>("int(11)"),
|
||||
gpu = table.Column<int>("int(11)"),
|
||||
machine = table.Column<int>("int(11)"),
|
||||
id = table.Column<long>("bigint(20)").
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
}, constraints: table =>
|
||||
@@ -453,7 +468,8 @@ namespace Marechai.Database.Migrations
|
||||
|
||||
migrationBuilder.CreateTable("processors_by_machine", table => new
|
||||
{
|
||||
processor = table.Column<int>("int(11)"), machine = table.Column<int>("int(11)"),
|
||||
processor = table.Column<int>("int(11)"),
|
||||
machine = table.Column<int>("int(11)"),
|
||||
speed = table.Column<float>(nullable: true),
|
||||
id = table.Column<long>("bigint(20)").
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
@@ -470,7 +486,8 @@ namespace Marechai.Database.Migrations
|
||||
|
||||
migrationBuilder.CreateTable("sound_by_machine", table => new
|
||||
{
|
||||
sound_synth = table.Column<int>("int(11)"), machine = table.Column<int>("int(11)"),
|
||||
sound_synth = table.Column<int>("int(11)"),
|
||||
machine = table.Column<int>("int(11)"),
|
||||
id = table.Column<long>("bigint(20)").
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
|
||||
}, constraints: table =>
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
public partial class UseExistingEnumerations : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Up(MigrationBuilder migrationBuilder) {}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Down(MigrationBuilder migrationBuilder) {}
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
public partial class SingularizeModelNames : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Up(MigrationBuilder migrationBuilder) {}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Down(MigrationBuilder migrationBuilder) {}
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
public partial class BrowserTestFieldsAsBoolean : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Up(MigrationBuilder migrationBuilder) {}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Down(MigrationBuilder migrationBuilder) {}
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
public partial class LogosGuid : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Up(MigrationBuilder migrationBuilder) {}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Down(MigrationBuilder migrationBuilder) {}
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
public partial class CorrectLogosInCompany : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Up(MigrationBuilder migrationBuilder) {}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Down(MigrationBuilder migrationBuilder) {}
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
migrationBuilder.CreateTable("AspNetRoles", table => new
|
||||
{
|
||||
Id = table.Column<string>(), Name = table.Column<string>(maxLength: 256, nullable: true),
|
||||
Id = table.Column<string>(),
|
||||
Name = table.Column<string>(maxLength: 256, nullable: true),
|
||||
NormalizedName = table.Column<string>(maxLength: 256, nullable: true),
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
@@ -45,18 +46,21 @@ namespace Marechai.Database.Migrations
|
||||
|
||||
migrationBuilder.CreateTable("AspNetUsers", table => new
|
||||
{
|
||||
Id = table.Column<string>(),
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: true),
|
||||
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true),
|
||||
Email = table.Column<string>(maxLength: 256, nullable: true),
|
||||
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
|
||||
EmailConfirmed = table.Column<bool>(), PasswordHash = table.Column<string>(nullable: true),
|
||||
SecurityStamp = table.Column<string>(nullable: true),
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true),
|
||||
PhoneNumber = table.Column<string>(nullable: true), PhoneNumberConfirmed = table.Column<bool>(),
|
||||
TwoFactorEnabled = table.Column<bool>(),
|
||||
LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
|
||||
LockoutEnabled = table.Column<bool>(), AccessFailedCount = table.Column<int>()
|
||||
Id = table.Column<string>(),
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: true),
|
||||
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true),
|
||||
Email = table.Column<string>(maxLength: 256, nullable: true),
|
||||
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
|
||||
EmailConfirmed = table.Column<bool>(),
|
||||
PasswordHash = table.Column<string>(nullable: true),
|
||||
SecurityStamp = table.Column<string>(nullable: true),
|
||||
ConcurrencyStamp = table.Column<string>(nullable: true),
|
||||
PhoneNumber = table.Column<string>(nullable: true),
|
||||
PhoneNumberConfirmed = table.Column<bool>(),
|
||||
TwoFactorEnabled = table.Column<bool>(),
|
||||
LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
|
||||
LockoutEnabled = table.Column<bool>(),
|
||||
AccessFailedCount = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUsers", x => x.Id);
|
||||
@@ -66,7 +70,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<int>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
RoleId = table.Column<string>(), ClaimType = table.Column<string>(nullable: true),
|
||||
RoleId = table.Column<string>(),
|
||||
ClaimType = table.Column<string>(nullable: true),
|
||||
ClaimValue = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
@@ -80,7 +85,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<int>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
UserId = table.Column<string>(), ClaimType = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<string>(),
|
||||
ClaimType = table.Column<string>(nullable: true),
|
||||
ClaimValue = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
@@ -94,12 +100,14 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
LoginProvider = table.Column<string>(maxLength: 128),
|
||||
ProviderKey = table.Column<string>(maxLength: 128),
|
||||
ProviderDisplayName = table.Column<string>(nullable: true), UserId = table.Column<string>()
|
||||
ProviderDisplayName = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<string>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserLogins", x => new
|
||||
{
|
||||
x.LoginProvider, x.ProviderKey
|
||||
x.LoginProvider,
|
||||
x.ProviderKey
|
||||
});
|
||||
|
||||
table.ForeignKey("FK_AspNetUserLogins_AspNetUsers_UserId", x => x.UserId, "AspNetUsers", "Id",
|
||||
@@ -108,12 +116,14 @@ namespace Marechai.Database.Migrations
|
||||
|
||||
migrationBuilder.CreateTable("AspNetUserRoles", table => new
|
||||
{
|
||||
UserId = table.Column<string>(), RoleId = table.Column<string>()
|
||||
UserId = table.Column<string>(),
|
||||
RoleId = table.Column<string>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserRoles", x => new
|
||||
{
|
||||
x.UserId, x.RoleId
|
||||
x.UserId,
|
||||
x.RoleId
|
||||
});
|
||||
|
||||
table.ForeignKey("FK_AspNetUserRoles_AspNetRoles_RoleId", x => x.RoleId, "AspNetRoles", "Id",
|
||||
@@ -125,13 +135,17 @@ namespace Marechai.Database.Migrations
|
||||
|
||||
migrationBuilder.CreateTable("AspNetUserTokens", table => new
|
||||
{
|
||||
UserId = table.Column<string>(), LoginProvider = table.Column<string>(maxLength: 128),
|
||||
Name = table.Column<string>(maxLength: 128), Value = table.Column<string>(nullable: true)
|
||||
UserId = table.Column<string>(),
|
||||
LoginProvider = table.Column<string>(maxLength: 128),
|
||||
Name = table.Column<string>(maxLength: 128),
|
||||
Value = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AspNetUserTokens", x => new
|
||||
{
|
||||
x.UserId, x.LoginProvider, x.Name
|
||||
x.UserId,
|
||||
x.LoginProvider,
|
||||
x.Name
|
||||
});
|
||||
|
||||
table.ForeignKey("FK_AspNetUserTokens_AspNetUsers_UserId", x => x.UserId, "AspNetUsers", "Id",
|
||||
|
||||
@@ -14,7 +14,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
id = table.Column<int>("int(11)").
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
company_id = table.Column<int>("int(11)"), text = table.Column<string>("text", nullable: true)
|
||||
company_id = table.Column<int>("int(11)"),
|
||||
text = table.Column<string>("text", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_company_descriptions", x => x.id);
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<int>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CompanyId = table.Column<int>(), Text = table.Column<string>(nullable: true)
|
||||
CompanyId = table.Column<int>(),
|
||||
Text = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CompanyDescriptions", x => x.Id);
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace Marechai.Database.Migrations
|
||||
|
||||
migrationBuilder.CreateTable("MachinePhotos", table => new
|
||||
{
|
||||
Id = table.Column<Guid>(), Author = table.Column<string>(nullable: true),
|
||||
Id = table.Column<Guid>(),
|
||||
Author = table.Column<string>(nullable: true),
|
||||
CameraManufacturer = table.Column<string>(nullable: true),
|
||||
CameraModel = table.Column<string>(nullable: true),
|
||||
ColorSpace = table.Column<string>(nullable: true),
|
||||
|
||||
@@ -11,8 +11,10 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<int>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Name = table.Column<string>(), SPDX = table.Column<string>(nullable: true),
|
||||
FsfApproved = table.Column<bool>(), OsiApproved = table.Column<bool>(),
|
||||
Name = table.Column<string>(),
|
||||
SPDX = table.Column<string>(nullable: true),
|
||||
FsfApproved = table.Column<bool>(),
|
||||
OsiApproved = table.Column<bool>(),
|
||||
Link = table.Column<string>(maxLength: 512, nullable: true),
|
||||
Text = table.Column<string>("longtext", maxLength: 131072, nullable: true)
|
||||
}, constraints: table =>
|
||||
|
||||
@@ -12,13 +12,17 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
AcquisitionDate = table.Column<DateTime>(), LostDate = table.Column<DateTime>(nullable: true),
|
||||
Status = table.Column<int>(), LastStatusDate = table.Column<DateTime>(nullable: true),
|
||||
Trade = table.Column<bool>(), Boxed = table.Column<bool>(),
|
||||
AcquisitionDate = table.Column<DateTime>(),
|
||||
LostDate = table.Column<DateTime>(nullable: true),
|
||||
Status = table.Column<int>(),
|
||||
LastStatusDate = table.Column<DateTime>(nullable: true),
|
||||
Trade = table.Column<bool>(),
|
||||
Boxed = table.Column<bool>(),
|
||||
Manuals = table.Column<bool>(),
|
||||
SerialNumber = table.Column<string>(nullable: true),
|
||||
SerialNumberVisible = table.Column<bool>(nullable: false, defaultValue: true),
|
||||
MachineId = table.Column<int>(), UserId = table.Column<string>(nullable: true)
|
||||
MachineId = table.Column<int>(),
|
||||
UserId = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OwnedMachines", x => x.Id);
|
||||
@@ -34,7 +38,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
GpuId = table.Column<int>(), OwnedMachineId = table.Column<long>()
|
||||
GpuId = table.Column<int>(),
|
||||
OwnedMachineId = table.Column<long>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GpusByOwnedMachine", x => x.Id);
|
||||
@@ -50,8 +55,11 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
OwnedMachineId = table.Column<long>(), Type = table.Column<int>(), Usage = table.Column<int>(),
|
||||
Size = table.Column<long>(), Speed = table.Column<double>()
|
||||
OwnedMachineId = table.Column<long>(),
|
||||
Type = table.Column<int>(),
|
||||
Usage = table.Column<int>(),
|
||||
Size = table.Column<long>(),
|
||||
Speed = table.Column<double>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MemoryByOwnedMachine", x => x.Id);
|
||||
@@ -62,7 +70,8 @@ namespace Marechai.Database.Migrations
|
||||
|
||||
migrationBuilder.CreateTable("OwnedMachinePhotos", table => new
|
||||
{
|
||||
Id = table.Column<Guid>(), Author = table.Column<string>(nullable: true),
|
||||
Id = table.Column<Guid>(),
|
||||
Author = table.Column<string>(nullable: true),
|
||||
CameraManufacturer = table.Column<string>(nullable: true),
|
||||
CameraModel = table.Column<string>(nullable: true),
|
||||
ColorSpace = table.Column<ushort>(nullable: true),
|
||||
@@ -97,7 +106,8 @@ namespace Marechai.Database.Migrations
|
||||
VerticalResolution = table.Column<double>(nullable: true),
|
||||
WhiteBalance = table.Column<ushort>(nullable: true),
|
||||
UserId = table.Column<string>(nullable: true),
|
||||
LicenseId = table.Column<int>(), OwnedMachineId = table.Column<long>()
|
||||
LicenseId = table.Column<int>(),
|
||||
OwnedMachineId = table.Column<long>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OwnedMachinePhotos", x => x.Id);
|
||||
@@ -116,7 +126,9 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
ProcessorId = table.Column<int>(), OwnedMachineId = table.Column<long>(), Speed = table.Column<float>()
|
||||
ProcessorId = table.Column<int>(),
|
||||
OwnedMachineId = table.Column<long>(),
|
||||
Speed = table.Column<float>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProcessorsByOwnedMachine", x => x.Id);
|
||||
@@ -132,7 +144,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
SoundSynthId = table.Column<int>(), OwnedMachineId = table.Column<long>()
|
||||
SoundSynthId = table.Column<int>(),
|
||||
OwnedMachineId = table.Column<long>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SoundByOwnedMachine", x => x.Id);
|
||||
@@ -148,7 +161,9 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
OwnedMachineId = table.Column<long>(), Type = table.Column<int>(), Interface = table.Column<int>(),
|
||||
OwnedMachineId = table.Column<long>(),
|
||||
Type = table.Column<int>(),
|
||||
Interface = table.Column<int>(),
|
||||
Capacity = table.Column<long>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -11,9 +11,12 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<int>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Width = table.Column<double>(nullable: true), Height = table.Column<double>(nullable: true),
|
||||
Diagonal = table.Column<double>(), NativeResolutionId = table.Column<int>(),
|
||||
EffectiveColors = table.Column<long>(nullable: true), Type = table.Column<string>()
|
||||
Width = table.Column<double>(nullable: true),
|
||||
Height = table.Column<double>(nullable: true),
|
||||
Diagonal = table.Column<double>(),
|
||||
NativeResolutionId = table.Column<int>(),
|
||||
EffectiveColors = table.Column<long>(nullable: true),
|
||||
Type = table.Column<string>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Screens", x => x.Id);
|
||||
@@ -26,7 +29,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
ScreenId = table.Column<int>(), ResolutionId = table.Column<int>()
|
||||
ScreenId = table.Column<int>(),
|
||||
ResolutionId = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ResolutionsByScreen", x => x.Id);
|
||||
@@ -42,7 +46,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
ScreenId = table.Column<int>(), MachineId = table.Column<int>()
|
||||
ScreenId = table.Column<int>(),
|
||||
MachineId = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ScreensByMachine", x => x.Id);
|
||||
|
||||
@@ -12,11 +12,15 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<int>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Name = table.Column<string>(), Surname = table.Column<string>(),
|
||||
BirthDate = table.Column<DateTime>(),
|
||||
DeathDate = table.Column<DateTime>(nullable: true), Webpage = table.Column<string>(nullable: true),
|
||||
Twitter = table.Column<string>(nullable: true), Facebook = table.Column<string>(nullable: true),
|
||||
Photo = table.Column<Guid>(), CountryOfBirthId = table.Column<short>(nullable: true)
|
||||
Name = table.Column<string>(),
|
||||
Surname = table.Column<string>(),
|
||||
BirthDate = table.Column<DateTime>(),
|
||||
DeathDate = table.Column<DateTime>(nullable: true),
|
||||
Webpage = table.Column<string>(nullable: true),
|
||||
Twitter = table.Column<string>(nullable: true),
|
||||
Facebook = table.Column<string>(nullable: true),
|
||||
Photo = table.Column<Guid>(),
|
||||
CountryOfBirthId = table.Column<short>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_People", x => x.Id);
|
||||
|
||||
@@ -8,11 +8,14 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
migrationBuilder.CreateTable("ISO_639-3", table => new
|
||||
{
|
||||
Id = table.Column<string>("char(3)"), Part2B = table.Column<string>("char(3)", nullable: true),
|
||||
Part2T = table.Column<string>("char(3)", nullable: true),
|
||||
Part1 = table.Column<string>("char(2)", nullable: true), Scope = table.Column<string>("char(1)"),
|
||||
Type = table.Column<string>("char(1)"), Ref_Name = table.Column<string>("varchar(150)"),
|
||||
Comment = table.Column<string>("varchar(150)", nullable: true)
|
||||
Id = table.Column<string>("char(3)"),
|
||||
Part2B = table.Column<string>("char(3)", nullable: true),
|
||||
Part2T = table.Column<string>("char(3)", nullable: true),
|
||||
Part1 = table.Column<string>("char(2)", nullable: true),
|
||||
Scope = table.Column<string>("char(1)"),
|
||||
Type = table.Column<string>("char(1)"),
|
||||
Ref_Name = table.Column<string>("varchar(150)"),
|
||||
Comment = table.Column<string>("varchar(150)", nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ISO_639-3", x => x.Id);
|
||||
|
||||
@@ -12,9 +12,12 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
PersonId = table.Column<int>(), CompanyId = table.Column<int>(),
|
||||
Position = table.Column<string>(nullable: true), Start = table.Column<DateTime>(nullable: true),
|
||||
End = table.Column<DateTime>(nullable: true), Ongoing = table.Column<bool>()
|
||||
PersonId = table.Column<int>(),
|
||||
CompanyId = table.Column<int>(),
|
||||
Position = table.Column<string>(nullable: true),
|
||||
Start = table.Column<DateTime>(nullable: true),
|
||||
End = table.Column<DateTime>(nullable: true),
|
||||
Ongoing = table.Column<bool>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PeopleByCompany", x => x.Id);
|
||||
|
||||
@@ -12,9 +12,11 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Title = table.Column<string>(), NativeTitle = table.Column<string>(nullable: true),
|
||||
Published = table.Column<DateTime>(nullable: true), CountryId = table.Column<short>(nullable: true),
|
||||
Synopsis = table.Column<string>(maxLength: 262144, nullable: true)
|
||||
Title = table.Column<string>(),
|
||||
NativeTitle = table.Column<string>(nullable: true),
|
||||
Published = table.Column<DateTime>(nullable: true),
|
||||
CountryId = table.Column<short>(nullable: true),
|
||||
Synopsis = table.Column<string>(maxLength: 262144, nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Documents", x => x.Id);
|
||||
|
||||
@@ -8,7 +8,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
migrationBuilder.CreateTable("DocumentRoles", table => new
|
||||
{
|
||||
Id = table.Column<string>("char(3)"), Name = table.Column<string>(nullable: true),
|
||||
Id = table.Column<string>("char(3)"),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Enabled = table.Column<bool>(nullable: false, defaultValue: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -13,7 +13,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<int>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Name = table.Column<string>(), Surname = table.Column<string>(),
|
||||
Name = table.Column<string>(),
|
||||
Surname = table.Column<string>(),
|
||||
PersonId = table.Column<int>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -11,8 +11,9 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
PersonId = table.Column<int>(), DocumentId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
PersonId = table.Column<int>(),
|
||||
DocumentId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PeopleByDocuments", x => x.Id);
|
||||
|
||||
@@ -13,7 +13,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<int>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Name = table.Column<string>(), CompanyId = table.Column<int>(nullable: true)
|
||||
Name = table.Column<string>(),
|
||||
CompanyId = table.Column<int>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DocumentCompanies", x => x.Id);
|
||||
|
||||
@@ -11,8 +11,9 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CompanyId = table.Column<int>(), DocumentId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
CompanyId = table.Column<int>(),
|
||||
DocumentId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CompaniesByDocuments", x => x.Id);
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DocumentId = table.Column<long>(), MachineId = table.Column<int>()
|
||||
DocumentId = table.Column<long>(),
|
||||
MachineId = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DocumentsByMachines", x => x.Id);
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
DocumentId = table.Column<long>(), MachineFamilyId = table.Column<int>()
|
||||
DocumentId = table.Column<long>(),
|
||||
MachineFamilyId = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DocumentsByMachineFamily", x => x.Id);
|
||||
|
||||
@@ -12,14 +12,16 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Title = table.Column<string>(), NativeTitle = table.Column<string>(nullable: true),
|
||||
Published = table.Column<DateTime>(nullable: true), CountryId = table.Column<short>(nullable: true),
|
||||
Synopsis = table.Column<string>(maxLength: 262144, nullable: true),
|
||||
Isbn = table.Column<string>(maxLength: 13, nullable: true),
|
||||
Pages = table.Column<short>(nullable: true),
|
||||
Edition = table.Column<int>(nullable: true),
|
||||
PreviousId = table.Column<long>(nullable: true),
|
||||
SourceId = table.Column<long>(nullable: true)
|
||||
Title = table.Column<string>(),
|
||||
NativeTitle = table.Column<string>(nullable: true),
|
||||
Published = table.Column<DateTime>(nullable: true),
|
||||
CountryId = table.Column<short>(nullable: true),
|
||||
Synopsis = table.Column<string>(maxLength: 262144, nullable: true),
|
||||
Isbn = table.Column<string>(maxLength: 13, nullable: true),
|
||||
Pages = table.Column<short>(nullable: true),
|
||||
Edition = table.Column<int>(nullable: true),
|
||||
PreviousId = table.Column<long>(nullable: true),
|
||||
SourceId = table.Column<long>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Books", x => x.Id);
|
||||
|
||||
@@ -11,7 +11,9 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CompanyId = table.Column<int>(), BookId = table.Column<long>(), RoleId = table.Column<string>("char(3)")
|
||||
CompanyId = table.Column<int>(),
|
||||
BookId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CompaniesByBooks", x => x.Id);
|
||||
|
||||
@@ -11,7 +11,9 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
PersonId = table.Column<int>(), BookId = table.Column<long>(), RoleId = table.Column<string>("char(3)")
|
||||
PersonId = table.Column<int>(),
|
||||
BookId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PeopleByBooks", x => x.Id);
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
BookId = table.Column<long>(), MachineId = table.Column<int>()
|
||||
BookId = table.Column<long>(),
|
||||
MachineId = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BooksByMachines", x => x.Id);
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
BookId = table.Column<long>(), MachineFamilyId = table.Column<int>()
|
||||
BookId = table.Column<long>(),
|
||||
MachineFamilyId = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BooksByMachineFamilies", x => x.Id);
|
||||
|
||||
@@ -12,10 +12,12 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
MagazineId = table.Column<long>(), Caption = table.Column<string>(),
|
||||
MagazineId = table.Column<long>(),
|
||||
Caption = table.Column<string>(),
|
||||
NativeCaption = table.Column<string>(nullable: true),
|
||||
Published = table.Column<DateTime>(nullable: true),
|
||||
ProductCode = table.Column<string>(maxLength: 18, nullable: true), Pages = table.Column<short>()
|
||||
ProductCode = table.Column<string>(maxLength: 18, nullable: true),
|
||||
Pages = table.Column<short>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MagazineIssues", x => x.Id);
|
||||
|
||||
@@ -11,8 +11,9 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
CompanyId = table.Column<int>(), MagazineId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
CompanyId = table.Column<int>(),
|
||||
MagazineId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CompaniesByMagazines", x => x.Id);
|
||||
|
||||
@@ -11,8 +11,9 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
PersonId = table.Column<int>(), MagazineId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
PersonId = table.Column<int>(),
|
||||
MagazineId = table.Column<long>(),
|
||||
RoleId = table.Column<string>("char(3)")
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PeopleByMagazines", x => x.Id);
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
MagazineId = table.Column<long>(), MachineId = table.Column<int>()
|
||||
MagazineId = table.Column<long>(),
|
||||
MachineId = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MagazinesByMachines", x => x.Id);
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
Id = table.Column<long>().
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
MagazineId = table.Column<long>(), MachineFamilyId = table.Column<int>()
|
||||
MagazineId = table.Column<long>(),
|
||||
MachineFamilyId = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MagazinesByMachinesFamilies", x => x.Id);
|
||||
|
||||
@@ -4,8 +4,8 @@ namespace Marechai.Database.Migrations
|
||||
{
|
||||
public partial class SetDetaulfsForBooleans : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Up(MigrationBuilder migrationBuilder) {}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) { }
|
||||
protected override void Down(MigrationBuilder migrationBuilder) {}
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,12 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Type = table.Column<byte>(nullable: false), UserId = table.Column<string>(nullable: false),
|
||||
Table = table.Column<string>(nullable: true), Keys = table.Column<string>(nullable: true),
|
||||
OldValues = table.Column<string>(nullable: true), NewValues = table.Column<string>(nullable: true),
|
||||
Type = table.Column<byte>(nullable: false),
|
||||
UserId = table.Column<string>(nullable: false),
|
||||
Table = table.Column<string>(nullable: true),
|
||||
Keys = table.Column<string>(nullable: true),
|
||||
OldValues = table.Column<string>(nullable: true),
|
||||
NewValues = table.Column<string>(nullable: true),
|
||||
AffectedColumns = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -43,7 +43,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
CurrencyCode = table.Column<string>(nullable: false), Year = table.Column<uint>(nullable: false),
|
||||
CurrencyCode = table.Column<string>(nullable: false),
|
||||
Year = table.Column<uint>(nullable: false),
|
||||
Inflation = table.Column<float>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -44,8 +44,10 @@ namespace Marechai.Database.Migrations
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
SourceCode = table.Column<string>(nullable: false),
|
||||
DestinationCode = table.Column<string>(nullable: false), Ratio = table.Column<float>(nullable: false),
|
||||
Start = table.Column<DateTime>(nullable: false), End = table.Column<DateTime>(nullable: true)
|
||||
DestinationCode = table.Column<string>(nullable: false),
|
||||
Ratio = table.Column<float>(nullable: false),
|
||||
Start = table.Column<DateTime>(nullable: false),
|
||||
End = table.Column<DateTime>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CurrenciesPegging", x => x.Id);
|
||||
|
||||
@@ -50,9 +50,6 @@ namespace Marechai.Database.Migrations
|
||||
migrationBuilder.CreateIndex("IX_DumpHardwares_SoftwareVersion", "DumpHardwares", "SoftwareVersion");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("DumpHardwares");
|
||||
}
|
||||
protected override void Down(MigrationBuilder migrationBuilder) => migrationBuilder.DropTable("DumpHardwares");
|
||||
}
|
||||
}
|
||||
@@ -43,14 +43,19 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Size = table.Column<ulong>(nullable: false), Md5 = table.Column<byte[]>("binary(16)", nullable: true),
|
||||
Sha1 = table.Column<byte[]>("binary(20)", nullable: true),
|
||||
Sha256 = table.Column<byte[]>("binary(32)", nullable: true),
|
||||
Sha3 = table.Column<byte[]>("binary(64)", nullable: true),
|
||||
Spamsum = table.Column<string>(nullable: true), Mime = table.Column<string>(nullable: true),
|
||||
Magic = table.Column<string>(nullable: true), AccoustId = table.Column<string>(nullable: true),
|
||||
Infected = table.Column<bool>(nullable: false), Malware = table.Column<string>(nullable: true),
|
||||
Hack = table.Column<bool>(nullable: false), HackGroup = table.Column<string>(nullable: true)
|
||||
Size = table.Column<ulong>(nullable: false),
|
||||
Md5 = table.Column<byte[]>("binary(16)", nullable: true),
|
||||
Sha1 = table.Column<byte[]>("binary(20)", nullable: true),
|
||||
Sha256 = table.Column<byte[]>("binary(32)", nullable: true),
|
||||
Sha3 = table.Column<byte[]>("binary(64)", nullable: true),
|
||||
Spamsum = table.Column<string>(nullable: true),
|
||||
Mime = table.Column<string>(nullable: true),
|
||||
Magic = table.Column<string>(nullable: true),
|
||||
AccoustId = table.Column<string>(nullable: true),
|
||||
Infected = table.Column<bool>(nullable: false),
|
||||
Malware = table.Column<string>(nullable: true),
|
||||
Hack = table.Column<bool>(nullable: false),
|
||||
HackGroup = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Files", x => x.Id);
|
||||
|
||||
@@ -43,8 +43,9 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Name = table.Column<string>(maxLength: 255, nullable: true),
|
||||
Size = table.Column<ulong>(nullable: false), FileId = table.Column<ulong>(nullable: false)
|
||||
Name = table.Column<string>(maxLength: 255, nullable: true),
|
||||
Size = table.Column<ulong>(nullable: false),
|
||||
FileId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FileDataStreams", x => x.Id);
|
||||
|
||||
@@ -43,19 +43,24 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Type = table.Column<string>(nullable: false), CreationDate = table.Column<DateTime>(nullable: true),
|
||||
ModificationDate = table.Column<DateTime>(nullable: true),
|
||||
BackupDate = table.Column<DateTime>(nullable: true), ClusterSize = table.Column<int>(nullable: false),
|
||||
Clusters = table.Column<ulong>(nullable: false), Files = table.Column<ulong>(nullable: true),
|
||||
Bootable = table.Column<bool>(nullable: false), Serial = table.Column<string>(nullable: true),
|
||||
Label = table.Column<string>(nullable: true), FreeClusters = table.Column<ulong>(nullable: true),
|
||||
ExpirationDate = table.Column<DateTime>(nullable: true),
|
||||
EffectiveDate = table.Column<DateTime>(nullable: true),
|
||||
SystemIdentifier = table.Column<string>(nullable: true),
|
||||
VolumeSetIdentifier = table.Column<string>(nullable: true),
|
||||
PublisherIdentifier = table.Column<string>(nullable: true),
|
||||
Type = table.Column<string>(nullable: false),
|
||||
CreationDate = table.Column<DateTime>(nullable: true),
|
||||
ModificationDate = table.Column<DateTime>(nullable: true),
|
||||
BackupDate = table.Column<DateTime>(nullable: true),
|
||||
ClusterSize = table.Column<int>(nullable: false),
|
||||
Clusters = table.Column<ulong>(nullable: false),
|
||||
Files = table.Column<ulong>(nullable: true),
|
||||
Bootable = table.Column<bool>(nullable: false),
|
||||
Serial = table.Column<string>(nullable: true),
|
||||
Label = table.Column<string>(nullable: true),
|
||||
FreeClusters = table.Column<ulong>(nullable: true),
|
||||
ExpirationDate = table.Column<DateTime>(nullable: true),
|
||||
EffectiveDate = table.Column<DateTime>(nullable: true),
|
||||
SystemIdentifier = table.Column<string>(nullable: true),
|
||||
VolumeSetIdentifier = table.Column<string>(nullable: true),
|
||||
PublisherIdentifier = table.Column<string>(nullable: true),
|
||||
DataPreparerIdentifier = table.Column<string>(nullable: true),
|
||||
ApplicationIdentifier = table.Column<string>(nullable: true)
|
||||
ApplicationIdentifier = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Filesystems", x => x.Id);
|
||||
|
||||
@@ -43,10 +43,14 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Sequence = table.Column<uint>(nullable: false), Name = table.Column<string>(nullable: true),
|
||||
Type = table.Column<string>(nullable: false), FirstSector = table.Column<ulong>(nullable: false),
|
||||
LastSector = table.Column<ulong>(nullable: false), Size = table.Column<ulong>(nullable: false),
|
||||
Description = table.Column<string>(nullable: true), Scheme = table.Column<string>(nullable: true)
|
||||
Sequence = table.Column<uint>(nullable: false),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Type = table.Column<string>(nullable: false),
|
||||
FirstSector = table.Column<ulong>(nullable: false),
|
||||
LastSector = table.Column<ulong>(nullable: false),
|
||||
Size = table.Column<ulong>(nullable: false),
|
||||
Description = table.Column<string>(nullable: true),
|
||||
Scheme = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LogicalPartitions", x => x.Id);
|
||||
@@ -62,7 +66,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
FilesystemId = table.Column<ulong>(nullable: false), PartitionId = table.Column<ulong>(nullable: false)
|
||||
FilesystemId = table.Column<ulong>(nullable: false),
|
||||
PartitionId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FilesystemsByLogicalPartition", x => x.Id);
|
||||
|
||||
@@ -43,19 +43,30 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Title = table.Column<string>(nullable: true), Sequence = table.Column<ushort>(nullable: true),
|
||||
LastSequence = table.Column<ushort>(nullable: true), Type = table.Column<uint>(nullable: false),
|
||||
WriteOffset = table.Column<int>(nullable: true), Sides = table.Column<ushort>(nullable: true),
|
||||
Layers = table.Column<ushort>(nullable: true), Sessions = table.Column<ushort>(nullable: true),
|
||||
Tracks = table.Column<ushort>(nullable: true), Sectors = table.Column<ulong>(nullable: false),
|
||||
Size = table.Column<ulong>(nullable: false), CopyProtection = table.Column<string>(nullable: true),
|
||||
PartNumber = table.Column<string>(nullable: true), SerialNumber = table.Column<string>(nullable: true),
|
||||
Barcode = table.Column<string>(nullable: true), CatalogueNumber = table.Column<string>(nullable: true),
|
||||
Manufacturer = table.Column<string>(nullable: true), Model = table.Column<string>(nullable: true),
|
||||
Revision = table.Column<string>(nullable: true), Firmware = table.Column<string>(nullable: true),
|
||||
Title = table.Column<string>(nullable: true),
|
||||
Sequence = table.Column<ushort>(nullable: true),
|
||||
LastSequence = table.Column<ushort>(nullable: true),
|
||||
Type = table.Column<uint>(nullable: false),
|
||||
WriteOffset = table.Column<int>(nullable: true),
|
||||
Sides = table.Column<ushort>(nullable: true),
|
||||
Layers = table.Column<ushort>(nullable: true),
|
||||
Sessions = table.Column<ushort>(nullable: true),
|
||||
Tracks = table.Column<ushort>(nullable: true),
|
||||
Sectors = table.Column<ulong>(nullable: false),
|
||||
Size = table.Column<ulong>(nullable: false),
|
||||
CopyProtection = table.Column<string>(nullable: true),
|
||||
PartNumber = table.Column<string>(nullable: true),
|
||||
SerialNumber = table.Column<string>(nullable: true),
|
||||
Barcode = table.Column<string>(nullable: true),
|
||||
CatalogueNumber = table.Column<string>(nullable: true),
|
||||
Manufacturer = table.Column<string>(nullable: true),
|
||||
Model = table.Column<string>(nullable: true),
|
||||
Revision = table.Column<string>(nullable: true),
|
||||
Firmware = table.Column<string>(nullable: true),
|
||||
PhysicalBlockSize = table.Column<int>(nullable: true),
|
||||
LogicalBlockSize = table.Column<int>(nullable: true), BlockSizes = table.Column<string>(nullable: true),
|
||||
StorageInterface = table.Column<int>(nullable: true)
|
||||
LogicalBlockSize = table.Column<int>(nullable: true),
|
||||
BlockSizes = table.Column<string>(nullable: true),
|
||||
StorageInterface = table.Column<int>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Media", x => x.Id);
|
||||
|
||||
@@ -43,7 +43,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
MediaId = table.Column<ulong>(nullable: false), PartitionId = table.Column<ulong>(nullable: false)
|
||||
MediaId = table.Column<ulong>(nullable: false),
|
||||
PartitionId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LogicalPartitionsByMedia", x => x.Id);
|
||||
|
||||
@@ -43,7 +43,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
MediaId = table.Column<ulong>(nullable: false), Format = table.Column<string>(nullable: true),
|
||||
MediaId = table.Column<ulong>(nullable: false),
|
||||
Format = table.Column<string>(nullable: true),
|
||||
Status = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -43,13 +43,15 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
MediaDumpId = table.Column<ulong>(nullable: false), FileSequence = table.Column<long>(nullable: false),
|
||||
PartitionSequence = table.Column<short>(nullable: false), Size = table.Column<ulong>(nullable: false),
|
||||
Md5 = table.Column<byte[]>("binary(16)", nullable: true),
|
||||
Sha1 = table.Column<byte[]>("binary(20)", nullable: true),
|
||||
Sha256 = table.Column<byte[]>("binary(32)", nullable: true),
|
||||
Sha3 = table.Column<byte[]>("binary(64)", nullable: true),
|
||||
Spamsum = table.Column<string>(nullable: true)
|
||||
MediaDumpId = table.Column<ulong>(nullable: false),
|
||||
FileSequence = table.Column<long>(nullable: false),
|
||||
PartitionSequence = table.Column<short>(nullable: false),
|
||||
Size = table.Column<ulong>(nullable: false),
|
||||
Md5 = table.Column<byte[]>("binary(16)", nullable: true),
|
||||
Sha1 = table.Column<byte[]>("binary(20)", nullable: true),
|
||||
Sha256 = table.Column<byte[]>("binary(32)", nullable: true),
|
||||
Sha3 = table.Column<byte[]>("binary(64)", nullable: true),
|
||||
Spamsum = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MediaDumpFileImages", x => x.Id);
|
||||
|
||||
@@ -18,12 +18,14 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
MediaDumpId = table.Column<ulong>(nullable: false), Size = table.Column<ulong>(nullable: false),
|
||||
MediaDumpId = table.Column<ulong>(nullable: false),
|
||||
Size = table.Column<ulong>(nullable: false),
|
||||
Md5 = table.Column<byte[]>("binary(16)", nullable: true),
|
||||
Sha1 = table.Column<byte[]>("binary(20)", nullable: true),
|
||||
Sha256 = table.Column<byte[]>("binary(32)", nullable: true),
|
||||
Sha3 = table.Column<byte[]>("binary(64)", nullable: true),
|
||||
Spamsum = table.Column<string>(nullable: true), AccoustId = table.Column<string>(nullable: true)
|
||||
Spamsum = table.Column<string>(nullable: true),
|
||||
AccoustId = table.Column<string>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MediaDumpImages", x => x.Id);
|
||||
|
||||
@@ -43,12 +43,15 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
TrackSequence = table.Column<short>(nullable: false), Status = table.Column<byte>(nullable: false),
|
||||
Size = table.Column<ulong>(nullable: false), Md5 = table.Column<byte[]>("binary(16)", nullable: true),
|
||||
Sha1 = table.Column<byte[]>("binary(20)", nullable: true),
|
||||
Sha256 = table.Column<byte[]>("binary(32)", nullable: true),
|
||||
Sha3 = table.Column<byte[]>("binary(64)", nullable: true),
|
||||
Spamsum = table.Column<string>(nullable: true), MediaDumpId = table.Column<ulong>(nullable: true)
|
||||
TrackSequence = table.Column<short>(nullable: false),
|
||||
Status = table.Column<byte>(nullable: false),
|
||||
Size = table.Column<ulong>(nullable: false),
|
||||
Md5 = table.Column<byte[]>("binary(16)", nullable: true),
|
||||
Sha1 = table.Column<byte[]>("binary(20)", nullable: true),
|
||||
Sha256 = table.Column<byte[]>("binary(32)", nullable: true),
|
||||
Sha3 = table.Column<byte[]>("binary(64)", nullable: true),
|
||||
Spamsum = table.Column<string>(nullable: true),
|
||||
MediaDumpId = table.Column<ulong>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MediaDumpSubchannelImages", x => x.Id);
|
||||
|
||||
@@ -45,12 +45,15 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
TrackSequence = table.Column<short>(nullable: false), Format = table.Column<string>(nullable: true),
|
||||
Size = table.Column<ulong>(nullable: false), Md5 = table.Column<byte[]>("binary(16)", nullable: true),
|
||||
Sha1 = table.Column<byte[]>("binary(20)", nullable: true),
|
||||
Sha256 = table.Column<byte[]>("binary(32)", nullable: true),
|
||||
Sha3 = table.Column<byte[]>("binary(64)", nullable: true),
|
||||
Spamsum = table.Column<string>(nullable: true), MediaDumpId = table.Column<ulong>(nullable: true)
|
||||
TrackSequence = table.Column<short>(nullable: false),
|
||||
Format = table.Column<string>(nullable: true),
|
||||
Size = table.Column<ulong>(nullable: false),
|
||||
Md5 = table.Column<byte[]>("binary(16)", nullable: true),
|
||||
Sha1 = table.Column<byte[]>("binary(20)", nullable: true),
|
||||
Sha256 = table.Column<byte[]>("binary(32)", nullable: true),
|
||||
Sha3 = table.Column<byte[]>("binary(64)", nullable: true),
|
||||
Spamsum = table.Column<string>(nullable: true),
|
||||
MediaDumpId = table.Column<ulong>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MediaDumpTrackImages", x => x.Id);
|
||||
|
||||
@@ -53,19 +53,22 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Path = table.Column<string>(maxLength: 8192, nullable: false),
|
||||
Name = table.Column<string>(maxLength: 255, nullable: false),
|
||||
PathSeparator = table.Column<string>(nullable: false),
|
||||
IsDirectory = table.Column<bool>(nullable: false),
|
||||
CreationDate = table.Column<DateTime>(nullable: true),
|
||||
AccessDate = table.Column<DateTime>(nullable: true),
|
||||
Path = table.Column<string>(maxLength: 8192, nullable: false),
|
||||
Name = table.Column<string>(maxLength: 255, nullable: false),
|
||||
PathSeparator = table.Column<string>(nullable: false),
|
||||
IsDirectory = table.Column<bool>(nullable: false),
|
||||
CreationDate = table.Column<DateTime>(nullable: true),
|
||||
AccessDate = table.Column<DateTime>(nullable: true),
|
||||
StatusChangeDate = table.Column<DateTime>(nullable: true),
|
||||
BackupDate = table.Column<DateTime>(nullable: true),
|
||||
LastWriteDate = table.Column<DateTime>(nullable: true),
|
||||
Attributes = table.Column<ulong>(nullable: false), PosixMode = table.Column<ushort>(nullable: true),
|
||||
DeviceNumber = table.Column<uint>(nullable: true), GroupId = table.Column<ulong>(nullable: true),
|
||||
UserId = table.Column<ulong>(nullable: true), Inode = table.Column<ulong>(nullable: true),
|
||||
Links = table.Column<ulong>(nullable: true)
|
||||
BackupDate = table.Column<DateTime>(nullable: true),
|
||||
LastWriteDate = table.Column<DateTime>(nullable: true),
|
||||
Attributes = table.Column<ulong>(nullable: false),
|
||||
PosixMode = table.Column<ushort>(nullable: true),
|
||||
DeviceNumber = table.Column<uint>(nullable: true),
|
||||
GroupId = table.Column<ulong>(nullable: true),
|
||||
UserId = table.Column<ulong>(nullable: true),
|
||||
Inode = table.Column<ulong>(nullable: true),
|
||||
Links = table.Column<ulong>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MediaFiles", x => x.Id);
|
||||
@@ -104,7 +107,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
FilesystemId = table.Column<ulong>(nullable: false), FileId = table.Column<ulong>(nullable: false)
|
||||
FilesystemId = table.Column<ulong>(nullable: false),
|
||||
FileId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FilesByFilesystem", x => x.Id);
|
||||
|
||||
@@ -45,9 +45,12 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Dumper = table.Column<string>(nullable: true), UserId = table.Column<string>(nullable: true),
|
||||
DumpingGroup = table.Column<string>(nullable: true), DumpDate = table.Column<DateTime>(nullable: true),
|
||||
MediaId = table.Column<ulong>(nullable: true), MediaDumpId = table.Column<ulong>(nullable: true)
|
||||
Dumper = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<string>(nullable: true),
|
||||
DumpingGroup = table.Column<string>(nullable: true),
|
||||
DumpDate = table.Column<DateTime>(nullable: true),
|
||||
MediaId = table.Column<ulong>(nullable: true),
|
||||
MediaDumpId = table.Column<ulong>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Dumps", x => x.Id);
|
||||
|
||||
@@ -43,8 +43,9 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Name = table.Column<string>(nullable: false), Introduced = table.Column<DateTime>(nullable: true),
|
||||
ParentId = table.Column<ulong>(nullable: true)
|
||||
Name = table.Column<string>(nullable: false),
|
||||
Introduced = table.Column<DateTime>(nullable: true),
|
||||
ParentId = table.Column<ulong>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SoftwareFamilies", x => x.Id);
|
||||
@@ -63,7 +64,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
RoleId = table.Column<string>(nullable: false), CompanyId = table.Column<int>(nullable: false),
|
||||
RoleId = table.Column<string>(nullable: false),
|
||||
CompanyId = table.Column<int>(nullable: false),
|
||||
SoftwareFamilyId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
@@ -90,7 +92,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
RoleId = table.Column<string>(nullable: false), PersonId = table.Column<int>(nullable: false),
|
||||
RoleId = table.Column<string>(nullable: false),
|
||||
PersonId = table.Column<int>(nullable: false),
|
||||
SoftwareFamilyId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -43,9 +43,12 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
FamilyId = table.Column<ulong>(nullable: false), Name = table.Column<string>(nullable: true),
|
||||
Codename = table.Column<string>(nullable: true), Version = table.Column<string>(nullable: false),
|
||||
Introduced = table.Column<DateTime>(nullable: true), LicenseId = table.Column<int>(nullable: true),
|
||||
FamilyId = table.Column<ulong>(nullable: false),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Codename = table.Column<string>(nullable: true),
|
||||
Version = table.Column<string>(nullable: false),
|
||||
Introduced = table.Column<DateTime>(nullable: true),
|
||||
LicenseId = table.Column<int>(nullable: true),
|
||||
PreviousId = table.Column<ulong>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
@@ -72,7 +75,8 @@ namespace Marechai.Database.Migrations
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
CompanyId = table.Column<int>(nullable: false),
|
||||
SoftwareVersionId = table.Column<ulong>(nullable: false), RoleId = table.Column<string>(nullable: false)
|
||||
SoftwareVersionId = table.Column<ulong>(nullable: false),
|
||||
RoleId = table.Column<string>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CompaniesBySoftwareVersion", x => x.Id);
|
||||
@@ -98,7 +102,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
SoftwareVersionId = table.Column<ulong>(nullable: false), PersonId = table.Column<int>(nullable: false),
|
||||
SoftwareVersionId = table.Column<ulong>(nullable: false),
|
||||
PersonId = table.Column<int>(nullable: false),
|
||||
RoleId = table.Column<string>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -43,16 +43,19 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Name = table.Column<string>(nullable: true), Version = table.Column<string>(nullable: true),
|
||||
Introduced = table.Column<DateTime>(nullable: true), ParentId = table.Column<ulong>(nullable: true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Version = table.Column<string>(nullable: true),
|
||||
Introduced = table.Column<DateTime>(nullable: true),
|
||||
ParentId = table.Column<ulong>(nullable: true),
|
||||
SoftwareVersionId = table.Column<ulong>(nullable: false),
|
||||
MinimumMemory = table.Column<ulong>(nullable: true),
|
||||
MinimumMemory = table.Column<ulong>(nullable: true),
|
||||
RecommendedMemory = table.Column<ulong>(nullable: true),
|
||||
RequiredStorage = table.Column<ulong>(nullable: true),
|
||||
PartNumber = table.Column<string>(nullable: true), SerialNumber = table.Column<string>(nullable: true),
|
||||
ProductCode = table.Column<string>(nullable: true),
|
||||
CatalogueNumber = table.Column<string>(nullable: true),
|
||||
DistributionMode = table.Column<uint>(nullable: false)
|
||||
RequiredStorage = table.Column<ulong>(nullable: true),
|
||||
PartNumber = table.Column<string>(nullable: true),
|
||||
SerialNumber = table.Column<string>(nullable: true),
|
||||
ProductCode = table.Column<string>(nullable: true),
|
||||
CatalogueNumber = table.Column<string>(nullable: true),
|
||||
DistributionMode = table.Column<uint>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SoftwareVariants", x => x.Id);
|
||||
@@ -75,7 +78,8 @@ namespace Marechai.Database.Migrations
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
CompanyId = table.Column<int>(nullable: false),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false), RoleId = table.Column<string>(nullable: false)
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false),
|
||||
RoleId = table.Column<string>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CompaniesBySoftwareVariant", x => x.Id);
|
||||
@@ -101,8 +105,10 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
GpuId = table.Column<int>(nullable: false), SoftwareVariantId = table.Column<ulong>(nullable: false),
|
||||
Minimum = table.Column<bool>(nullable: true), Recommended = table.Column<bool>(nullable: true)
|
||||
GpuId = table.Column<int>(nullable: false),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false),
|
||||
Minimum = table.Column<bool>(nullable: true),
|
||||
Recommended = table.Column<bool>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GpusBySoftwareVariant", x => x.Id);
|
||||
@@ -198,7 +204,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
MachineId = table.Column<int>(nullable: false), SoftwareVariantId = table.Column<ulong>(nullable: false)
|
||||
MachineId = table.Column<int>(nullable: false),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MachinesBySoftwareVariant", x => x.Id);
|
||||
@@ -221,7 +228,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
MediaId = table.Column<ulong>(nullable: false), SoftwareVariantId = table.Column<ulong>(nullable: false)
|
||||
MediaId = table.Column<ulong>(nullable: false),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MediaBySoftwareVariant", x => x.Id);
|
||||
@@ -244,7 +252,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false), PersonId = table.Column<int>(nullable: false),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false),
|
||||
PersonId = table.Column<int>(nullable: false),
|
||||
RoleId = table.Column<string>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
@@ -272,8 +281,10 @@ namespace Marechai.Database.Migrations
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
ProcessorId = table.Column<int>(nullable: false),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false), Speed = table.Column<float>(nullable: true),
|
||||
Minimum = table.Column<bool>(nullable: true), Recommended = table.Column<bool>(nullable: true)
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false),
|
||||
Speed = table.Column<float>(nullable: true),
|
||||
Minimum = table.Column<bool>(nullable: true),
|
||||
Recommended = table.Column<bool>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProcessorsBySoftwareVariant", x => x.Id);
|
||||
@@ -370,19 +381,23 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Path = table.Column<string>(maxLength: 8192, nullable: false),
|
||||
Name = table.Column<string>(maxLength: 255, nullable: false),
|
||||
PathSeparator = table.Column<string>(nullable: false),
|
||||
IsDirectory = table.Column<bool>(nullable: false),
|
||||
CreationDate = table.Column<DateTime>(nullable: true),
|
||||
AccessDate = table.Column<DateTime>(nullable: true),
|
||||
StatusChangeDate = table.Column<DateTime>(nullable: true),
|
||||
BackupDate = table.Column<DateTime>(nullable: true),
|
||||
LastWriteDate = table.Column<DateTime>(nullable: true),
|
||||
Attributes = table.Column<ulong>(nullable: false), PosixMode = table.Column<ushort>(nullable: true),
|
||||
DeviceNumber = table.Column<uint>(nullable: true), GroupId = table.Column<ulong>(nullable: true),
|
||||
UserId = table.Column<ulong>(nullable: true), Inode = table.Column<ulong>(nullable: true),
|
||||
Links = table.Column<ulong>(nullable: true), SoftwareVariantId = table.Column<ulong>(nullable: false)
|
||||
Path = table.Column<string>(maxLength: 8192, nullable: false),
|
||||
Name = table.Column<string>(maxLength: 255, nullable: false),
|
||||
PathSeparator = table.Column<string>(nullable: false),
|
||||
IsDirectory = table.Column<bool>(nullable: false),
|
||||
CreationDate = table.Column<DateTime>(nullable: true),
|
||||
AccessDate = table.Column<DateTime>(nullable: true),
|
||||
StatusChangeDate = table.Column<DateTime>(nullable: true),
|
||||
BackupDate = table.Column<DateTime>(nullable: true),
|
||||
LastWriteDate = table.Column<DateTime>(nullable: true),
|
||||
Attributes = table.Column<ulong>(nullable: false),
|
||||
PosixMode = table.Column<ushort>(nullable: true),
|
||||
DeviceNumber = table.Column<uint>(nullable: true),
|
||||
GroupId = table.Column<ulong>(nullable: true),
|
||||
UserId = table.Column<ulong>(nullable: true),
|
||||
Inode = table.Column<ulong>(nullable: true),
|
||||
Links = table.Column<ulong>(nullable: true),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_StandaloneFiles", x => x.Id);
|
||||
|
||||
@@ -43,8 +43,10 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Type = table.Column<byte>(nullable: false), Text = table.Column<string>(nullable: false),
|
||||
Side = table.Column<short>(nullable: true), Layer = table.Column<short>(nullable: true),
|
||||
Type = table.Column<byte>(nullable: false),
|
||||
Text = table.Column<string>(nullable: false),
|
||||
Side = table.Column<short>(nullable: true),
|
||||
Layer = table.Column<short>(nullable: true),
|
||||
MediaId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -43,7 +43,8 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
MediaDumpId = table.Column<ulong>(nullable: false), Type = table.Column<int>(nullable: false),
|
||||
MediaDumpId = table.Column<ulong>(nullable: false),
|
||||
Type = table.Column<int>(nullable: false),
|
||||
FileId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
|
||||
@@ -43,8 +43,10 @@ namespace Marechai.Database.Migrations
|
||||
UpdatedOn = table.Column<DateTime>(nullable: false).
|
||||
Annotation("MySql:ValueGenerationStrategy",
|
||||
MySqlValueGenerationStrategy.ComputedColumn),
|
||||
Path = table.Column<string>(nullable: true), PathSeparator = table.Column<string>(nullable: false),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false), MediaId = table.Column<ulong>(nullable: false)
|
||||
Path = table.Column<string>(nullable: true),
|
||||
PathSeparator = table.Column<string>(nullable: false),
|
||||
SoftwareVariantId = table.Column<ulong>(nullable: false),
|
||||
MediaId = table.Column<ulong>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SoftwareVariantByCompilationMedia", x => x.Id);
|
||||
|
||||
@@ -40,9 +40,9 @@ namespace Marechai.Database.Models
|
||||
new ValueConverter<string, byte[]>(v => HexStringToBytesConverter.StringToHex(v),
|
||||
v => HexStringToBytesConverter.HexToString(v));
|
||||
|
||||
public MarechaiContext() { }
|
||||
public MarechaiContext() {}
|
||||
|
||||
public MarechaiContext(DbContextOptions<MarechaiContext> options) : base(options) { }
|
||||
public MarechaiContext(DbContextOptions<MarechaiContext> options) : base(options) {}
|
||||
|
||||
public virtual DbSet<Book> Books { get; set; }
|
||||
public virtual DbSet<BooksByMachine> BooksByMachines { get; set; }
|
||||
@@ -457,7 +457,9 @@ namespace Marechai.Database.Models
|
||||
{
|
||||
entity.HasKey(e => new
|
||||
{
|
||||
e.Id, e.CompanyId, LogoGuid = e.Guid
|
||||
e.Id,
|
||||
e.CompanyId,
|
||||
LogoGuid = e.Guid
|
||||
});
|
||||
|
||||
entity.ToTable("company_logos");
|
||||
@@ -666,7 +668,9 @@ namespace Marechai.Database.Models
|
||||
{
|
||||
entity.HasKey(e => new
|
||||
{
|
||||
e.Id, e.ProcessorId, e.ExtensionId
|
||||
e.Id,
|
||||
e.ProcessorId,
|
||||
e.ExtensionId
|
||||
});
|
||||
|
||||
entity.ToTable("instruction_set_extensions_by_processor");
|
||||
@@ -1369,17 +1373,23 @@ namespace Marechai.Database.Models
|
||||
|
||||
entity.HasIndex(e => new
|
||||
{
|
||||
e.Width, e.Height
|
||||
e.Width,
|
||||
e.Height
|
||||
}).HasName("idx_resolutions_resolution");
|
||||
|
||||
entity.HasIndex(e => new
|
||||
{
|
||||
e.Width, e.Height, e.Colors
|
||||
e.Width,
|
||||
e.Height,
|
||||
e.Colors
|
||||
}).HasName("idx_resolutions_resolution_with_color");
|
||||
|
||||
entity.HasIndex(e => new
|
||||
{
|
||||
e.Width, e.Height, e.Colors, e.Palette
|
||||
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)");
|
||||
|
||||
@@ -1046,31 +1046,30 @@ namespace Marechai.Database
|
||||
trans = dbCon.BeginTransaction();
|
||||
dbCmd.Transaction = trans;
|
||||
|
||||
dbCmd.CommandText =
|
||||
"CREATE INDEX `idx_processors_company` ON `processors` (`company`);\n" +
|
||||
"CREATE INDEX `idx_processors_model_code` ON `processors` (`model_code`);\n" +
|
||||
"CREATE INDEX `idx_processors_introduced` ON `processors` (`introduced`);\n" +
|
||||
"CREATE INDEX `idx_processors_instruction_set` ON `processors` (`instruction_set`);\n" +
|
||||
"CREATE INDEX `idx_processors_speed` ON `processors` (`speed`);\n" +
|
||||
"CREATE INDEX `idx_processors_package` ON `processors` (`package`);\n" +
|
||||
"CREATE INDEX `idx_processors_GPRs` ON `processors` (`GPRs`);\n" +
|
||||
"CREATE INDEX `idx_processors_GPR_size` ON `processors` (`GPR_size`);\n" +
|
||||
"CREATE INDEX `idx_processors_FPRs` ON `processors` (`FPRs`);\n" +
|
||||
"CREATE INDEX `idx_processors_FPR_size` ON `processors` (`FPR_size`);\n" +
|
||||
"CREATE INDEX `idx_processors_cores` ON `processors` (`cores`);\n" +
|
||||
"CREATE INDEX `idx_processors_threads_per_core` ON `processors` (`threads_per_core`);\n" +
|
||||
"CREATE INDEX `idx_processors_process` ON `processors` (`process`);\n" +
|
||||
"CREATE INDEX `idx_processors_process_nm` ON `processors` (`process_nm`);\n" +
|
||||
"CREATE INDEX `idx_processors_die_size` ON `processors` (`die_size`);\n" +
|
||||
"CREATE INDEX `idx_processors_transistors` ON `processors` (`transistors`);\n" +
|
||||
"CREATE INDEX `idx_processors_data_bus` ON `processors` (`data_bus`);\n" +
|
||||
"CREATE INDEX `idx_processors_addr_bus` ON `processors` (`addr_bus`);\n" +
|
||||
"CREATE INDEX `idx_processors_SIMD_registers` ON `processors` (`SIMD_registers`);\n" +
|
||||
"CREATE INDEX `idx_processors_SIMD_size` ON `processors` (`SIMD_size`);\n" +
|
||||
"CREATE INDEX `idx_processors_L1_instruction` ON `processors` (`L1_instruction`);\n" +
|
||||
"CREATE INDEX `idx_processors_L1_data` ON `processors` (`L1_data`);\n" +
|
||||
"CREATE INDEX `idx_processors_L2` ON `processors` (`L2`);\n" +
|
||||
"CREATE INDEX `idx_processors_L3` ON `processors` (`L3`);";
|
||||
dbCmd.CommandText = "CREATE INDEX `idx_processors_company` ON `processors` (`company`);\n" +
|
||||
"CREATE INDEX `idx_processors_model_code` ON `processors` (`model_code`);\n" +
|
||||
"CREATE INDEX `idx_processors_introduced` ON `processors` (`introduced`);\n" +
|
||||
"CREATE INDEX `idx_processors_instruction_set` ON `processors` (`instruction_set`);\n" +
|
||||
"CREATE INDEX `idx_processors_speed` ON `processors` (`speed`);\n" +
|
||||
"CREATE INDEX `idx_processors_package` ON `processors` (`package`);\n" +
|
||||
"CREATE INDEX `idx_processors_GPRs` ON `processors` (`GPRs`);\n" +
|
||||
"CREATE INDEX `idx_processors_GPR_size` ON `processors` (`GPR_size`);\n" +
|
||||
"CREATE INDEX `idx_processors_FPRs` ON `processors` (`FPRs`);\n" +
|
||||
"CREATE INDEX `idx_processors_FPR_size` ON `processors` (`FPR_size`);\n" +
|
||||
"CREATE INDEX `idx_processors_cores` ON `processors` (`cores`);\n" +
|
||||
"CREATE INDEX `idx_processors_threads_per_core` ON `processors` (`threads_per_core`);\n" +
|
||||
"CREATE INDEX `idx_processors_process` ON `processors` (`process`);\n" +
|
||||
"CREATE INDEX `idx_processors_process_nm` ON `processors` (`process_nm`);\n" +
|
||||
"CREATE INDEX `idx_processors_die_size` ON `processors` (`die_size`);\n" +
|
||||
"CREATE INDEX `idx_processors_transistors` ON `processors` (`transistors`);\n" +
|
||||
"CREATE INDEX `idx_processors_data_bus` ON `processors` (`data_bus`);\n" +
|
||||
"CREATE INDEX `idx_processors_addr_bus` ON `processors` (`addr_bus`);\n" +
|
||||
"CREATE INDEX `idx_processors_SIMD_registers` ON `processors` (`SIMD_registers`);\n" +
|
||||
"CREATE INDEX `idx_processors_SIMD_size` ON `processors` (`SIMD_size`);\n" +
|
||||
"CREATE INDEX `idx_processors_L1_instruction` ON `processors` (`L1_instruction`);\n" +
|
||||
"CREATE INDEX `idx_processors_L1_data` ON `processors` (`L1_data`);\n" +
|
||||
"CREATE INDEX `idx_processors_L2` ON `processors` (`L2`);\n" +
|
||||
"CREATE INDEX `idx_processors_L3` ON `processors` (`L3`);";
|
||||
|
||||
dbCmd.ExecuteNonQuery();
|
||||
trans.Commit();
|
||||
@@ -1512,27 +1511,27 @@ namespace Marechai.Database
|
||||
dbCmd.Transaction = trans;
|
||||
|
||||
dbCmd.CommandText =
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_company`, ADD INDEX `idx_machines_company` (`company`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_year`, ADD INDEX `idx_machines_year` (`year`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_model`, ADD INDEX `idx_machines_model` (`model`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_cpu1`, ADD INDEX `idx_machines_cpu1` (`cpu1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_cpu2`, ADD INDEX `idx_machines_cpu2` (`cpu2`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_mhz1`, ADD INDEX `idx_machines_mhz1` (`mhz1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_mhz2`, ADD INDEX `idx_machines_mhz2` (`mhz2`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_ram`, ADD INDEX `idx_machines_ram` (`ram`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_rom`, ADD INDEX `idx_machines_rom` (`rom`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_gpu`, ADD INDEX `idx_machines_gpu` (`gpu`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_vram`, ADD INDEX `idx_machines_vram` (`vram`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_colors`, ADD INDEX `idx_machines_colors` (`colors`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_res`, ADD INDEX `idx_machines_res` (`res`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_company`, ADD INDEX `idx_machines_company` (`company`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_year`, ADD INDEX `idx_machines_year` (`year`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_model`, ADD INDEX `idx_machines_model` (`model`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_cpu1`, ADD INDEX `idx_machines_cpu1` (`cpu1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_cpu2`, ADD INDEX `idx_machines_cpu2` (`cpu2`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_mhz1`, ADD INDEX `idx_machines_mhz1` (`mhz1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_mhz2`, ADD INDEX `idx_machines_mhz2` (`mhz2`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_ram`, ADD INDEX `idx_machines_ram` (`ram`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_rom`, ADD INDEX `idx_machines_rom` (`rom`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_gpu`, ADD INDEX `idx_machines_gpu` (`gpu`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_vram`, ADD INDEX `idx_machines_vram` (`vram`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_colors`, ADD INDEX `idx_machines_colors` (`colors`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_res`, ADD INDEX `idx_machines_res` (`res`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_sound_synth`, ADD INDEX `idx_machines_sound_synth` (`sound_synth`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_music_synth`, ADD INDEX `idx_machines_music_synth` (`music_synth`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_hdd1`, ADD INDEX `idx_machines_hdd1` (`hdd1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_hdd2`, ADD INDEX `idx_machines_hdd2` (`hdd2`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_hdd3`, ADD INDEX `idx_machines_hdd3` (`hdd3`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_disk1`, ADD INDEX `idx_machines_disk1` (`disk1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_disk2`, ADD INDEX `idx_machines_disk2` (`disk2`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_cap1`, ADD INDEX `idx_machines_cap1` (`cap1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_hdd1`, ADD INDEX `idx_machines_hdd1` (`hdd1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_hdd2`, ADD INDEX `idx_machines_hdd2` (`hdd2`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_hdd3`, ADD INDEX `idx_machines_hdd3` (`hdd3`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_disk1`, ADD INDEX `idx_machines_disk1` (`disk1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_disk2`, ADD INDEX `idx_machines_disk2` (`disk2`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_cap1`, ADD INDEX `idx_machines_cap1` (`cap1`);\n" +
|
||||
"ALTER TABLE `machines` DROP INDEX `idx_computers_cap2`, ADD INDEX `idx_machines_cap2` (`cap2`);";
|
||||
|
||||
dbCmd.ExecuteNonQuery();
|
||||
@@ -1566,15 +1565,15 @@ namespace Marechai.Database
|
||||
dbCmd.Transaction = trans;
|
||||
|
||||
dbCmd.CommandText =
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_cpu1` (cpu1) REFERENCES `processors` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_cpu2` (cpu2) REFERENCES `processors` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_gpu` (gpu) REFERENCES `gpus` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_cpu1` (cpu1) REFERENCES `processors` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_cpu2` (cpu2) REFERENCES `processors` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_gpu` (gpu) REFERENCES `gpus` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_music_synth` (music_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_sound_synth` (sound_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;";
|
||||
|
||||
@@ -1675,13 +1674,11 @@ namespace Marechai.Database
|
||||
param3.Value = (string)dataRow["model"];
|
||||
param4.Value = dataRow["cpu1"] == DBNull.Value ? (object)null : (int)dataRow["cpu1"];
|
||||
|
||||
param5.Value = dataRow["mhz1"] == DBNull.Value ? (object)null
|
||||
: float.Parse(dataRow["mhz1"].ToString());
|
||||
param5.Value = dataRow["mhz1"] == DBNull.Value ? (object)null : float.Parse(dataRow["mhz1"].ToString());
|
||||
|
||||
param6.Value = dataRow["cpu2"] == DBNull.Value ? (object)null : (int)dataRow["cpu2"];
|
||||
|
||||
param7.Value = dataRow["mhz2"] == DBNull.Value ? (object)null
|
||||
: float.Parse(dataRow["mhz2"].ToString());
|
||||
param7.Value = dataRow["mhz2"] == DBNull.Value ? (object)null : float.Parse(dataRow["mhz2"].ToString());
|
||||
|
||||
param8.Value = (int)dataRow["ram"];
|
||||
param9.Value = (int)dataRow["rom"];
|
||||
@@ -2549,7 +2546,7 @@ namespace Marechai.Database
|
||||
|
||||
switch(media)
|
||||
{
|
||||
case"disk1":
|
||||
case "disk1":
|
||||
if(dataRow["cap1"] != DBNull.Value)
|
||||
if(int.TryParse((string)dataRow["cap1"], out int cap))
|
||||
param4.Value = cap == 0
|
||||
@@ -2559,7 +2556,7 @@ namespace Marechai.Database
|
||||
: cap * 1024;
|
||||
|
||||
break;
|
||||
case"disk2":
|
||||
case "disk2":
|
||||
if(dataRow["cap2"] != DBNull.Value)
|
||||
if(int.TryParse((string)dataRow["cap2"], out int cap))
|
||||
param4.Value = cap == 0
|
||||
|
||||
@@ -62,62 +62,59 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string OwnedConsoles = V9.OwnedConsoles;
|
||||
|
||||
public static readonly string Processors =
|
||||
"CREATE TABLE `processors` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`company` int(11) DEFAULT NULL,\n" +
|
||||
"`model_code` varchar(45) DEFAULT NULL,\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`instruction_set` int(11) DEFAULT NULL,\n" +
|
||||
"`speed` double DEFAULT NULL,\n" +
|
||||
"`package` varchar(45) DEFAULT NULL,\n" +
|
||||
"`GPRs` int(11) DEFAULT NULL,\n" +
|
||||
"`GPR_size` int(11) DEFAULT NULL,\n" +
|
||||
"`FPRs` int(11) DEFAULT NULL,\n" +
|
||||
"`FPR_size` int(11) DEFAULT NULL,\n" +
|
||||
"`cores` int(11) DEFAULT NULL,\n" +
|
||||
"`threads_per_core` int(11) DEFAULT NULL,\n" +
|
||||
"`process` varchar(45) DEFAULT NULL,\n" +
|
||||
"`process_nm` float DEFAULT NULL,\n" +
|
||||
"`die_size` float DEFAULT NULL,\n" +
|
||||
"`transistors` bigint(20) DEFAULT NULL,\n" +
|
||||
"`data_bus` int(11) DEFAULT NULL,\n" +
|
||||
"`addr_bus` int(11) DEFAULT NULL,\n" +
|
||||
"`SIMD_registers` int(11) DEFAULT NULL,\n" +
|
||||
"`SIMD_size` int(11) DEFAULT NULL,\n" +
|
||||
"`L1_instruction` float DEFAULT NULL,\n" +
|
||||
"`L1_data` float DEFAULT NULL,\n" +
|
||||
"`L2` float DEFAULT NULL,\n" +
|
||||
"`L3` float DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_processors_name` (`name`),\n" +
|
||||
"KEY `idx_processors_company` (`company`),\n" +
|
||||
"KEY `idx_processors_model_code` (`model_code`),\n" +
|
||||
"KEY `idx_processors_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_processors_instruction_set` (`instruction_set`),\n" +
|
||||
"KEY `idx_processors_speed` (`speed`),\n" +
|
||||
"KEY `idx_processors_package` (`package`),\n" +
|
||||
"KEY `idx_processors_GPRs` (`GPRs`),\n" +
|
||||
"KEY `idx_processors_GPR_size` (`GPR_size`),\n" +
|
||||
"KEY `idx_processors_FPRs` (`FPRs`),\n" +
|
||||
"KEY `idx_processors_FPR_size` (`FPR_size`),\n" +
|
||||
"KEY `idx_processors_cores` (`cores`),\n" +
|
||||
"KEY `idx_processors_threads_per_core` (`threads_per_core`),\n" +
|
||||
"KEY `idx_processors_process` (`process`),\n" +
|
||||
"KEY `idx_processors_process_nm` (`process_nm`),\n" +
|
||||
"KEY `idx_processors_die_size` (`die_size`),\n" +
|
||||
"KEY `idx_processors_transistors` (`transistors`),\n" +
|
||||
"KEY `idx_processors_data_bus` (`data_bus`),\n" +
|
||||
"KEY `idx_processors_addr_bus` (`addr_bus`),\n" +
|
||||
"KEY `idx_processors_SIMD_registers` (`SIMD_registers`),\n" +
|
||||
"KEY `idx_processors_SIMD_size` (`SIMD_size`),\n" +
|
||||
"KEY `idx_processors_L1_instruction` (`L1_instruction`),\n" +
|
||||
"KEY `idx_processors_L1_data` (`L1_data`),\n" +
|
||||
"KEY `idx_processors_L2` (`L2`),\n" +
|
||||
"KEY `idx_processors_L3` (`L3`),\n" +
|
||||
"CONSTRAINT `fk_processors_company` FOREIGN KEY (`company`) REFERENCES `companies` (`id`) ON UPDATE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_processors_instruction_set` FOREIGN KEY (`instruction_set`) REFERENCES `instruction_sets` (`id`) ON UPDATE CASCADE);";
|
||||
public static readonly string Processors = "CREATE TABLE `processors` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`company` int(11) DEFAULT NULL,\n" +
|
||||
"`model_code` varchar(45) DEFAULT NULL,\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`instruction_set` int(11) DEFAULT NULL,\n" +
|
||||
"`speed` double DEFAULT NULL,\n" +
|
||||
"`package` varchar(45) DEFAULT NULL,\n" +
|
||||
"`GPRs` int(11) DEFAULT NULL,\n" +
|
||||
"`GPR_size` int(11) DEFAULT NULL,\n" +
|
||||
"`FPRs` int(11) DEFAULT NULL,\n" +
|
||||
"`FPR_size` int(11) DEFAULT NULL,\n" +
|
||||
"`cores` int(11) DEFAULT NULL,\n" +
|
||||
"`threads_per_core` int(11) DEFAULT NULL,\n" +
|
||||
"`process` varchar(45) DEFAULT NULL,\n" +
|
||||
"`process_nm` float DEFAULT NULL,\n" +
|
||||
"`die_size` float DEFAULT NULL,\n" +
|
||||
"`transistors` bigint(20) DEFAULT NULL,\n" +
|
||||
"`data_bus` int(11) DEFAULT NULL,\n" +
|
||||
"`addr_bus` int(11) DEFAULT NULL,\n" +
|
||||
"`SIMD_registers` int(11) DEFAULT NULL,\n" +
|
||||
"`SIMD_size` int(11) DEFAULT NULL,\n" +
|
||||
"`L1_instruction` float DEFAULT NULL,\n" +
|
||||
"`L1_data` float DEFAULT NULL,\n" + "`L2` float DEFAULT NULL,\n" +
|
||||
"`L3` float DEFAULT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_processors_name` (`name`),\n" +
|
||||
"KEY `idx_processors_company` (`company`),\n" +
|
||||
"KEY `idx_processors_model_code` (`model_code`),\n" +
|
||||
"KEY `idx_processors_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_processors_instruction_set` (`instruction_set`),\n" +
|
||||
"KEY `idx_processors_speed` (`speed`),\n" +
|
||||
"KEY `idx_processors_package` (`package`),\n" +
|
||||
"KEY `idx_processors_GPRs` (`GPRs`),\n" +
|
||||
"KEY `idx_processors_GPR_size` (`GPR_size`),\n" +
|
||||
"KEY `idx_processors_FPRs` (`FPRs`),\n" +
|
||||
"KEY `idx_processors_FPR_size` (`FPR_size`),\n" +
|
||||
"KEY `idx_processors_cores` (`cores`),\n" +
|
||||
"KEY `idx_processors_threads_per_core` (`threads_per_core`),\n" +
|
||||
"KEY `idx_processors_process` (`process`),\n" +
|
||||
"KEY `idx_processors_process_nm` (`process_nm`),\n" +
|
||||
"KEY `idx_processors_die_size` (`die_size`),\n" +
|
||||
"KEY `idx_processors_transistors` (`transistors`),\n" +
|
||||
"KEY `idx_processors_data_bus` (`data_bus`),\n" +
|
||||
"KEY `idx_processors_addr_bus` (`addr_bus`),\n" +
|
||||
"KEY `idx_processors_SIMD_registers` (`SIMD_registers`),\n" +
|
||||
"KEY `idx_processors_SIMD_size` (`SIMD_size`),\n" +
|
||||
"KEY `idx_processors_L1_instruction` (`L1_instruction`),\n" +
|
||||
"KEY `idx_processors_L1_data` (`L1_data`),\n" +
|
||||
"KEY `idx_processors_L2` (`L2`),\n" +
|
||||
"KEY `idx_processors_L3` (`L3`),\n" +
|
||||
"CONSTRAINT `fk_processors_company` FOREIGN KEY (`company`) REFERENCES `companies` (`id`) ON UPDATE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_processors_instruction_set` FOREIGN KEY (`instruction_set`) REFERENCES `instruction_sets` (`id`) ON UPDATE CASCADE);";
|
||||
|
||||
public static readonly string SoundSynths = V9.SoundSynths;
|
||||
|
||||
@@ -146,18 +143,13 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor =
|
||||
"CREATE TABLE IF NOT EXISTS `instruction_set_extensions_by_processor` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`processor_id` INT NOT NULL,\n" +
|
||||
"`extension_id` INT NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`, `processor_id`, `extension_id`),\n" +
|
||||
"INDEX `idx_setextension_processor` (`processor_id` ASC),\n" +
|
||||
"INDEX `idx_setextension_extension` (`extension_id` ASC),\n" +
|
||||
"CONSTRAINT `fk_extension_processor_id`\n" +
|
||||
"FOREIGN KEY (`processor_id`)\n" +
|
||||
"REFERENCES `processors` (`id`)\n" + "ON DELETE RESTRICT\n" +
|
||||
"ON UPDATE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_extension_extension_id`\n" + "FOREIGN KEY (`extension_id`)\n" +
|
||||
"REFERENCES `instruction_set_extensions` (`id`)\n" +
|
||||
"ON DELETE RESTRICT\n" + "ON UPDATE CASCADE);";
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" + "`processor_id` INT NOT NULL,\n" +
|
||||
"`extension_id` INT NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`, `processor_id`, `extension_id`),\n" +
|
||||
"INDEX `idx_setextension_processor` (`processor_id` ASC),\n" +
|
||||
"INDEX `idx_setextension_extension` (`extension_id` ASC),\n" + "CONSTRAINT `fk_extension_processor_id`\n" +
|
||||
"FOREIGN KEY (`processor_id`)\n" + "REFERENCES `processors` (`id`)\n" + "ON DELETE RESTRICT\n" +
|
||||
"ON UPDATE CASCADE,\n" + "CONSTRAINT `fk_extension_extension_id`\n" + "FOREIGN KEY (`extension_id`)\n" +
|
||||
"REFERENCES `instruction_set_extensions` (`id`)\n" + "ON DELETE RESTRICT\n" + "ON UPDATE CASCADE);";
|
||||
}
|
||||
}
|
||||
@@ -48,25 +48,24 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Forbidden = V10.Forbidden;
|
||||
|
||||
public static readonly string Gpus = "CREATE TABLE `gpus` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` char(128) NOT NULL DEFAULT '',\n" +
|
||||
"`company` int(11) DEFAULT NULL,\n" +
|
||||
"`model_code` varchar(45) DEFAULT NULL,\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`package` varchar(45) DEFAULT NULL,\n" +
|
||||
"`process` varchar(45) DEFAULT NULL,\n" +
|
||||
"`process_nm` float DEFAULT NULL,\n" +
|
||||
"`die_size` float DEFAULT NULL,\n" +
|
||||
"`transistors` bigint(20) DEFAULT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_gpus_name` (`name`),\n" +
|
||||
"KEY `idx_gpus_company` (`company`),\n" +
|
||||
"KEY `idx_gpus_model_code` (`model_code`),\n" +
|
||||
"KEY `idx_gpus_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_gpus_package` (`package`),\n" +
|
||||
"KEY `idx_gpus_process` (`process`),\n" +
|
||||
"KEY `idx_gpus_process_nm` (`process_nm`),\n" +
|
||||
"KEY `idx_gpus_die_size` (`die_size`),\n" +
|
||||
public static readonly string Gpus = "CREATE TABLE `gpus` (\n" + "`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` char(128) NOT NULL DEFAULT '',\n" +
|
||||
"`company` int(11) DEFAULT NULL,\n" +
|
||||
"`model_code` varchar(45) DEFAULT NULL,\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`package` varchar(45) DEFAULT NULL,\n" +
|
||||
"`process` varchar(45) DEFAULT NULL,\n" +
|
||||
"`process_nm` float DEFAULT NULL,\n" +
|
||||
"`die_size` float DEFAULT NULL,\n" +
|
||||
"`transistors` bigint(20) DEFAULT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_gpus_name` (`name`),\n" +
|
||||
"KEY `idx_gpus_company` (`company`),\n" +
|
||||
"KEY `idx_gpus_model_code` (`model_code`),\n" +
|
||||
"KEY `idx_gpus_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_gpus_package` (`package`),\n" +
|
||||
"KEY `idx_gpus_process` (`process`),\n" +
|
||||
"KEY `idx_gpus_process_nm` (`process_nm`),\n" +
|
||||
"KEY `idx_gpus_die_size` (`die_size`),\n" +
|
||||
"KEY `idx_gpus_transistors` (`transistors`),\n" +
|
||||
"CONSTRAINT `fk_gpus_company` FOREIGN KEY (`company`) REFERENCES `companies` (`id`) ON UPDATE CASCADE);";
|
||||
|
||||
|
||||
@@ -40,110 +40,104 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V11.Companies;
|
||||
|
||||
public static readonly string Computers = "CREATE TABLE `computers` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,\n" +
|
||||
"`hdd3` int(11) DEFAULT NULL,\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_computers_company` (`company`),\n" +
|
||||
"KEY `idx_computers_year` (`year`),\n" +
|
||||
"KEY `idx_computers_model` (`model`),\n" +
|
||||
"KEY `idx_computers_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_computers_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_computers_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_computers_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_computers_bits` (`bits`),\n" +
|
||||
"KEY `idx_computers_ram` (`ram`),\n" +
|
||||
"KEY `idx_computers_rom` (`rom`),\n" +
|
||||
"KEY `idx_computers_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_computers_vram` (`vram`),\n" +
|
||||
"KEY `idx_computers_colors` (`colors`),\n" +
|
||||
"KEY `idx_computers_res` (`res`),\n" +
|
||||
public static readonly string Computers = "CREATE TABLE `computers` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" + "`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,\n" + "`hdd3` int(11) DEFAULT NULL,\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_computers_company` (`company`),\n" +
|
||||
"KEY `idx_computers_year` (`year`),\n" +
|
||||
"KEY `idx_computers_model` (`model`),\n" +
|
||||
"KEY `idx_computers_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_computers_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_computers_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_computers_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_computers_bits` (`bits`),\n" +
|
||||
"KEY `idx_computers_ram` (`ram`),\n" +
|
||||
"KEY `idx_computers_rom` (`rom`),\n" +
|
||||
"KEY `idx_computers_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_computers_vram` (`vram`),\n" +
|
||||
"KEY `idx_computers_colors` (`colors`),\n" +
|
||||
"KEY `idx_computers_res` (`res`),\n" +
|
||||
"KEY `idx_computers_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_computers_music_synth` (`music_synth`),\n" +
|
||||
"KEY `idx_computers_hdd1` (`hdd1`),\n" +
|
||||
"KEY `idx_computers_hdd2` (`hdd2`),\n" +
|
||||
"KEY `idx_computers_hdd3` (`hdd3`),\n" +
|
||||
"KEY `idx_computers_disk1` (`disk1`),\n" +
|
||||
"KEY `idx_computers_disk2` (`disk2`),\n" +
|
||||
"KEY `idx_computers_cap1` (`cap1`),\n" +
|
||||
"KEY `idx_computers_hdd1` (`hdd1`),\n" +
|
||||
"KEY `idx_computers_hdd2` (`hdd2`),\n" +
|
||||
"KEY `idx_computers_hdd3` (`hdd3`),\n" +
|
||||
"KEY `idx_computers_disk1` (`disk1`),\n" +
|
||||
"KEY `idx_computers_disk2` (`disk2`),\n" +
|
||||
"KEY `idx_computers_cap1` (`cap1`),\n" +
|
||||
"KEY `idx_computers_cap2` (`cap2`))";
|
||||
|
||||
public static readonly string Consoles = "CREATE TABLE `consoles` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`res` char(11) NOT NULL DEFAULT '',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`palette` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`schannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`mchannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`format` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_consoles_company` (`company`),\n" +
|
||||
"KEY `idx_consoles_year` (`year`),\n" +
|
||||
"KEY `idx_consoles_model` (`model`),\n" +
|
||||
"KEY `idx_consoles_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_consoles_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_consoles_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_consoles_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_consoles_bits` (`bits`),\n" +
|
||||
"KEY `idx_consoles_ram` (`ram`),\n" +
|
||||
"KEY `idx_consoles_rom` (`rom`),\n" +
|
||||
"KEY `idx_consoles_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_consoles_vram` (`vram`),\n" +
|
||||
"KEY `idx_consoles_colors` (`colors`),\n" +
|
||||
"KEY `idx_consoles_res` (`res`),\n" +
|
||||
public static readonly string Consoles = "CREATE TABLE `consoles` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" + "`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`res` char(11) NOT NULL DEFAULT '',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`palette` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`schannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`mchannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`format` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap` int(11) NOT NULL DEFAULT '0',\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_consoles_company` (`company`),\n" +
|
||||
"KEY `idx_consoles_year` (`year`),\n" +
|
||||
"KEY `idx_consoles_model` (`model`),\n" +
|
||||
"KEY `idx_consoles_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_consoles_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_consoles_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_consoles_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_consoles_bits` (`bits`),\n" +
|
||||
"KEY `idx_consoles_ram` (`ram`),\n" +
|
||||
"KEY `idx_consoles_rom` (`rom`),\n" +
|
||||
"KEY `idx_consoles_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_consoles_vram` (`vram`),\n" +
|
||||
"KEY `idx_consoles_colors` (`colors`),\n" +
|
||||
"KEY `idx_consoles_res` (`res`),\n" +
|
||||
"KEY `idx_consoles_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_consoles_music_synth` (`music_synth`),\n" +
|
||||
"KEY `idx_consoles_palette` (`palette`),\n" +
|
||||
"KEY `idx_consoles_format` (`format`),\n" +
|
||||
"KEY `idx_consoles_palette` (`palette`),\n" +
|
||||
"KEY `idx_consoles_format` (`format`),\n" +
|
||||
"KEY `idx_consoles_cap` (`cap`));";
|
||||
|
||||
public static readonly string DiskFormats = V11.DiskFormats;
|
||||
|
||||
public static readonly string Forbidden = V11.Forbidden;
|
||||
|
||||
public static readonly string Gpus =
|
||||
V11.Gpus + "\n" +
|
||||
$"INSERT INTO `gpus` (`id`, `name`) VALUES ({Operations.DB_NONE}, `DB_NONE`);\n" +
|
||||
$"INSERT INTO `gpus` (`id`, `name`) VALUES ({Operations.DB_SOFTWARE}, `DB_FRAMEBUFFER`);";
|
||||
public static readonly string Gpus = V11.Gpus + "\n" +
|
||||
$"INSERT INTO `gpus` (`id`, `name`) VALUES ({Operations.DB_NONE}, `DB_NONE`);\n" +
|
||||
$"INSERT INTO `gpus` (`id`, `name`) VALUES ({Operations.DB_SOFTWARE}, `DB_FRAMEBUFFER`);";
|
||||
|
||||
public static readonly string Logs = V11.Logs;
|
||||
|
||||
|
||||
@@ -40,100 +40,95 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V12.Companies;
|
||||
|
||||
public static readonly string Computers = "CREATE TABLE `computers` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,\n" +
|
||||
"`hdd3` int(11) DEFAULT NULL,\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_computers_company` (`company`),\n" +
|
||||
"KEY `idx_computers_year` (`year`),\n" +
|
||||
"KEY `idx_computers_model` (`model`),\n" +
|
||||
"KEY `idx_computers_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_computers_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_computers_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_computers_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_computers_bits` (`bits`),\n" +
|
||||
"KEY `idx_computers_ram` (`ram`),\n" +
|
||||
"KEY `idx_computers_rom` (`rom`),\n" +
|
||||
"KEY `idx_computers_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_computers_vram` (`vram`),\n" +
|
||||
"KEY `idx_computers_colors` (`colors`),\n" +
|
||||
"KEY `idx_computers_res` (`res`),\n" +
|
||||
public static readonly string Computers = "CREATE TABLE `computers` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" + "`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,\n" + "`hdd3` int(11) DEFAULT NULL,\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_computers_company` (`company`),\n" +
|
||||
"KEY `idx_computers_year` (`year`),\n" +
|
||||
"KEY `idx_computers_model` (`model`),\n" +
|
||||
"KEY `idx_computers_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_computers_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_computers_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_computers_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_computers_bits` (`bits`),\n" +
|
||||
"KEY `idx_computers_ram` (`ram`),\n" +
|
||||
"KEY `idx_computers_rom` (`rom`),\n" +
|
||||
"KEY `idx_computers_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_computers_vram` (`vram`),\n" +
|
||||
"KEY `idx_computers_colors` (`colors`),\n" +
|
||||
"KEY `idx_computers_res` (`res`),\n" +
|
||||
"KEY `idx_computers_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_computers_music_synth` (`music_synth`),\n" +
|
||||
"KEY `idx_computers_hdd1` (`hdd1`),\n" +
|
||||
"KEY `idx_computers_hdd2` (`hdd2`),\n" +
|
||||
"KEY `idx_computers_hdd3` (`hdd3`),\n" +
|
||||
"KEY `idx_computers_disk1` (`disk1`),\n" +
|
||||
"KEY `idx_computers_disk2` (`disk2`),\n" +
|
||||
"KEY `idx_computers_cap1` (`cap1`),\n" +
|
||||
"KEY `idx_computers_hdd1` (`hdd1`),\n" +
|
||||
"KEY `idx_computers_hdd2` (`hdd2`),\n" +
|
||||
"KEY `idx_computers_hdd3` (`hdd3`),\n" +
|
||||
"KEY `idx_computers_disk1` (`disk1`),\n" +
|
||||
"KEY `idx_computers_disk2` (`disk2`),\n" +
|
||||
"KEY `idx_computers_cap1` (`cap1`),\n" +
|
||||
"KEY `idx_computers_cap2` (`cap2`));";
|
||||
|
||||
public static readonly string Consoles = "CREATE TABLE `consoles` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`res` char(11) NOT NULL DEFAULT '',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`palette` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`schannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`mchannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`format` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_consoles_company` (`company`),\n" +
|
||||
"KEY `idx_consoles_year` (`year`),\n" +
|
||||
"KEY `idx_consoles_model` (`model`),\n" +
|
||||
"KEY `idx_consoles_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_consoles_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_consoles_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_consoles_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_consoles_bits` (`bits`),\n" +
|
||||
"KEY `idx_consoles_ram` (`ram`),\n" +
|
||||
"KEY `idx_consoles_rom` (`rom`),\n" +
|
||||
"KEY `idx_consoles_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_consoles_vram` (`vram`),\n" +
|
||||
"KEY `idx_consoles_colors` (`colors`),\n" +
|
||||
"KEY `idx_consoles_res` (`res`),\n" +
|
||||
public static readonly string Consoles = "CREATE TABLE `consoles` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,\n" + "`mhz1` int(11) DEFAULT NULL,\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,\n" +
|
||||
"`bits` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`res` char(11) NOT NULL DEFAULT '',\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`palette` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`schannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`mchannels` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`format` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`cap` int(11) NOT NULL DEFAULT '0',\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_consoles_company` (`company`),\n" +
|
||||
"KEY `idx_consoles_year` (`year`),\n" +
|
||||
"KEY `idx_consoles_model` (`model`),\n" +
|
||||
"KEY `idx_consoles_cpu1` (`cpu1`),\n" +
|
||||
"KEY `idx_consoles_cpu2` (`cpu2`),\n" +
|
||||
"KEY `idx_consoles_mhz1` (`mhz1`),\n" +
|
||||
"KEY `idx_consoles_mhz2` (`mhz2`),\n" +
|
||||
"KEY `idx_consoles_bits` (`bits`),\n" +
|
||||
"KEY `idx_consoles_ram` (`ram`),\n" +
|
||||
"KEY `idx_consoles_rom` (`rom`),\n" +
|
||||
"KEY `idx_consoles_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_consoles_vram` (`vram`),\n" +
|
||||
"KEY `idx_consoles_colors` (`colors`),\n" +
|
||||
"KEY `idx_consoles_res` (`res`),\n" +
|
||||
"KEY `idx_consoles_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_consoles_music_synth` (`music_synth`),\n" +
|
||||
"KEY `idx_consoles_palette` (`palette`),\n" +
|
||||
"KEY `idx_consoles_format` (`format`),\n" +
|
||||
"KEY `idx_consoles_palette` (`palette`),\n" +
|
||||
"KEY `idx_consoles_format` (`format`),\n" +
|
||||
"KEY `idx_consoles_cap` (`cap`));";
|
||||
|
||||
public static readonly string DiskFormats = V12.DiskFormats;
|
||||
@@ -154,50 +149,49 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Processors = V12.Processors;
|
||||
|
||||
public static readonly string SoundSynths = "CREATE TABLE `sound_synths` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`company` int(11) DEFAULT NULL,\n" +
|
||||
"`model_code` varchar(45) DEFAULT NULL,\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`voices` int(11) DEFAULT NULL,\n" +
|
||||
"`frequency` double DEFAULT NULL,\n" +
|
||||
"`depth` int(11) DEFAULT NULL,\n" +
|
||||
"`square_wave` int(11) DEFAULT NULL,\n" +
|
||||
"`white_noise` int(11) DEFAULT NULL,\n" +
|
||||
"`type` int(11) DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_sound_synths_name` (`name`),\n" +
|
||||
"KEY `idx_sound_synths_company` (`company`),\n" +
|
||||
"KEY `idx_sound_synths_model_code` (`model_code`),\n" +
|
||||
"KEY `idx_sound_synths_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_sound_synths_voices` (`voices`),\n" +
|
||||
"KEY `idx_sound_synths_frequency` (`frequency`),\n" +
|
||||
"KEY `idx_sound_synths_depth` (`depth`),\n" +
|
||||
public static readonly string SoundSynths = "CREATE TABLE `sound_synths` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` char(50) NOT NULL DEFAULT '',\n" +
|
||||
"`company` int(11) DEFAULT NULL,\n" +
|
||||
"`model_code` varchar(45) DEFAULT NULL,\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`voices` int(11) DEFAULT NULL,\n" +
|
||||
"`frequency` double DEFAULT NULL,\n" +
|
||||
"`depth` int(11) DEFAULT NULL,\n" +
|
||||
"`square_wave` int(11) DEFAULT NULL,\n" +
|
||||
"`white_noise` int(11) DEFAULT NULL,\n" +
|
||||
"`type` int(11) DEFAULT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_sound_synths_name` (`name`),\n" +
|
||||
"KEY `idx_sound_synths_company` (`company`),\n" +
|
||||
"KEY `idx_sound_synths_model_code` (`model_code`),\n" +
|
||||
"KEY `idx_sound_synths_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_sound_synths_voices` (`voices`),\n" +
|
||||
"KEY `idx_sound_synths_frequency` (`frequency`),\n" +
|
||||
"KEY `idx_sound_synths_depth` (`depth`),\n" +
|
||||
"KEY `idx_sound_synths_square_wave` (`square_wave`),\n" +
|
||||
"KEY `idx_sound_synths_white_noise` (`white_noise`),\n" +
|
||||
"KEY `idx_sound_synths_type` (`type`),\n" +
|
||||
"KEY `idx_sound_synths_type` (`type`),\n" +
|
||||
"CONSTRAINT `fk_sound_synths_company` FOREIGN KEY (`company`) REFERENCES `companies` (`id`) ON UPDATE CASCADE);";
|
||||
|
||||
public static readonly string ComputersForeignKeys =
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_music_synth (music_synth) REFERENCES sound_synths (id) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd1 (hdd1) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd2 (hdd2) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd3 (hdd3) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_disk1 (disk1) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd1 (hdd1) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd2 (hdd2) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd3 (hdd3) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_disk1 (disk1) REFERENCES disk_formats (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_disk2 (disk2) REFERENCES disk_formats (id);";
|
||||
|
||||
public static readonly string ConsolesForeignKeys =
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_music_synth (music_synth) REFERENCES sound_synths (id) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_format (format) REFERENCES disk_formats (id);";
|
||||
|
||||
|
||||
@@ -40,56 +40,53 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V13.Companies;
|
||||
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,;\n" +
|
||||
"`mhz1` int(11) DEFAULT NULL,;\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,;\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,;\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,;\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" +
|
||||
"`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_cpu1` (`cpu1`),;\n" +
|
||||
"KEY `idx_machines_cpu2` (`cpu2`),;\n" +
|
||||
"KEY `idx_machines_mhz1` (`mhz1`),;\n" +
|
||||
"KEY `idx_machines_mhz2` (`mhz2`),;\n" +
|
||||
"KEY `idx_machines_ram` (`ram`),;\n" +
|
||||
"KEY `idx_machines_rom` (`rom`),;\n" +
|
||||
"KEY `idx_machines_gpu` (`gpu`),;\n" +
|
||||
"KEY `idx_machines_vram` (`vram`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`cpu1` int(11) DEFAULT NULL,;\n" + "`mhz1` int(11) DEFAULT NULL,;\n" +
|
||||
"`cpu2` int(11) DEFAULT NULL,;\n" +
|
||||
"`mhz2` decimal(11,2) DEFAULT NULL,;\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,;\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" + "`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" + "PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_cpu1` (`cpu1`),;\n" +
|
||||
"KEY `idx_machines_cpu2` (`cpu2`),;\n" +
|
||||
"KEY `idx_machines_mhz1` (`mhz1`),;\n" +
|
||||
"KEY `idx_machines_mhz2` (`mhz2`),;\n" +
|
||||
"KEY `idx_machines_ram` (`ram`),;\n" +
|
||||
"KEY `idx_machines_rom` (`rom`),;\n" +
|
||||
"KEY `idx_machines_gpu` (`gpu`),;\n" +
|
||||
"KEY `idx_machines_vram` (`vram`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
"KEY `idx_machines_sound_synth` (`sound_synth`),;\n" +
|
||||
"KEY `idx_machines_music_synth` (`music_synth`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_type` (`type`));";
|
||||
|
||||
public static readonly string DiskFormats = V13.DiskFormats;
|
||||
@@ -119,15 +116,15 @@ namespace Marechai.Database.Schemas.Sql
|
||||
public static readonly string Iso3166NumericValues = V13.Iso3166NumericValues;
|
||||
|
||||
public static readonly string MachinesForeignKeys =
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_cpu1` (cpu1) REFERENCES `processors` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_cpu2` (cpu2) REFERENCES `processors` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_gpu` (gpu) REFERENCES `gpus` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_cpu1` (cpu1) REFERENCES `processors` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_cpu2` (cpu2) REFERENCES `processors` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_gpu` (gpu) REFERENCES `gpus` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_music_synth` (music_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_sound_synth` (sound_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;";
|
||||
|
||||
|
||||
@@ -40,48 +40,46 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V14.Companies;
|
||||
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,;\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" +
|
||||
"`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_ram` (`ram`),;\n" +
|
||||
"KEY `idx_machines_rom` (`rom`),;\n" +
|
||||
"KEY `idx_machines_gpu` (`gpu`),;\n" +
|
||||
"KEY `idx_machines_vram` (`vram`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`gpu` int(11) DEFAULT NULL,;\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" + "`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" + "PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_ram` (`ram`),;\n" +
|
||||
"KEY `idx_machines_rom` (`rom`),;\n" +
|
||||
"KEY `idx_machines_gpu` (`gpu`),;\n" +
|
||||
"KEY `idx_machines_vram` (`vram`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
"KEY `idx_machines_sound_synth` (`sound_synth`),;\n" +
|
||||
"KEY `idx_machines_music_synth` (`music_synth`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_type` (`type`));";
|
||||
|
||||
public static readonly string DiskFormats = V14.DiskFormats;
|
||||
@@ -105,13 +103,13 @@ namespace Marechai.Database.Schemas.Sql
|
||||
public static readonly string SoundSynths = V14.SoundSynths;
|
||||
|
||||
public static readonly string MachinesForeignKeys =
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_gpu` (gpu) REFERENCES `gpus` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_gpu` (gpu) REFERENCES `gpus` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_music_synth` (music_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_sound_synth` (sound_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;";
|
||||
|
||||
@@ -131,15 +129,14 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string InstructionSetExtensionsByProcessor = V14.InstructionSetExtensionsByProcessor;
|
||||
|
||||
public static readonly string ProcessorsByMachine =
|
||||
"CREATE TABLE `processors_by_machine` (\n" +
|
||||
"`processor` INT NOT NULL, \n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"`speed` FLOAT DEFAULT NULL, \n" +
|
||||
"KEY `idx_processors_by_machine_processor` (`processor`),\n" +
|
||||
"KEY `idx_processors_by_machine_machine` (`machine`),\n" +
|
||||
"KEY `idx_processors_by_machine_speed` (`speed`),\n" +
|
||||
"CONSTRAINT `fk_processors_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_processors_by_machine_processor` FOREIGN KEY (`processor`) REFERENCES `processors` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
public static readonly string ProcessorsByMachine = "CREATE TABLE `processors_by_machine` (\n" +
|
||||
"`processor` INT NOT NULL, \n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"`speed` FLOAT DEFAULT NULL, \n" +
|
||||
"KEY `idx_processors_by_machine_processor` (`processor`),\n" +
|
||||
"KEY `idx_processors_by_machine_machine` (`machine`),\n" +
|
||||
"KEY `idx_processors_by_machine_speed` (`speed`),\n" +
|
||||
"CONSTRAINT `fk_processors_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_processors_by_machine_processor` FOREIGN KEY (`processor`) REFERENCES `processors` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
@@ -40,46 +40,44 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V15.Companies;
|
||||
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" +
|
||||
"`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_ram` (`ram`),;\n" +
|
||||
"KEY `idx_machines_rom` (`rom`),;\n" +
|
||||
"KEY `idx_machines_vram` (`vram`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`sound_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_synth` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`sound_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`music_channels` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" + "`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" + "PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_ram` (`ram`),;\n" +
|
||||
"KEY `idx_machines_rom` (`rom`),;\n" +
|
||||
"KEY `idx_machines_vram` (`vram`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
"KEY `idx_machines_sound_synth` (`sound_synth`),;\n" +
|
||||
"KEY `idx_machines_music_synth` (`music_synth`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_type` (`type`));";
|
||||
|
||||
public static readonly string DiskFormats = V15.DiskFormats;
|
||||
@@ -103,12 +101,12 @@ namespace Marechai.Database.Schemas.Sql
|
||||
public static readonly string SoundSynths = V15.SoundSynths;
|
||||
|
||||
public static readonly string MachinesForeignKeys =
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_music_synth` (music_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_sound_synth` (sound_synth) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE;";
|
||||
|
||||
@@ -130,13 +128,11 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string ProcessorsByMachine = V15.ProcessorsByMachine;
|
||||
|
||||
public static readonly string GpusByMachine =
|
||||
"CREATE TABLE `gpus_by_machine` (\n" +
|
||||
"`gpu` INT NOT NULL, \n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"KEY `idx_gpus_by_machine_gpus` (`gpu`),\n" +
|
||||
"KEY `idx_gpus_by_machine_machine` (`machine`),\n" +
|
||||
"CONSTRAINT `fk_gpus_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_gpus_by_machine_gpu` FOREIGN KEY (`gpu`) REFERENCES `gpus` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
public static readonly string GpusByMachine = "CREATE TABLE `gpus_by_machine` (\n" + "`gpu` INT NOT NULL, \n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"KEY `idx_gpus_by_machine_gpus` (`gpu`),\n" +
|
||||
"KEY `idx_gpus_by_machine_machine` (`machine`),\n" +
|
||||
"CONSTRAINT `fk_gpus_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_gpus_by_machine_gpu` FOREIGN KEY (`gpu`) REFERENCES `gpus` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
@@ -40,40 +40,38 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V16.Companies;
|
||||
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" +
|
||||
"`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"PRIMARY KEY (`id`),;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`ram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`rom` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`vram` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" + "`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" + "PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_ram` (`ram`),;\n" +
|
||||
"KEY `idx_machines_rom` (`rom`),;\n" +
|
||||
"KEY `idx_machines_vram` (`vram`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_ram` (`ram`),;\n" +
|
||||
"KEY `idx_machines_rom` (`rom`),;\n" +
|
||||
"KEY `idx_machines_vram` (`vram`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_type` (`type`));";
|
||||
|
||||
public static readonly string DiskFormats = V16.DiskFormats;
|
||||
@@ -98,10 +96,10 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string MachinesForeignKeys =
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_company` (company) REFERENCES `companies` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk1` (disk1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_disk2` (disk2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd1` (hdd1) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd2` (hdd2) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;\n" +
|
||||
"ALTER TABLE `machines` ADD FOREIGN KEY `fk_machines_hdd3` (hdd3) REFERENCES `disk_formats` (`id`) ON UPDATE CASCADE;";
|
||||
|
||||
public static readonly string Iso3166Numeric = V16.Iso3166Numeric;
|
||||
@@ -124,13 +122,11 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string GpusByMachine = V16.GpusByMachine;
|
||||
|
||||
public static readonly string SoundByMachine =
|
||||
"CREATE TABLE `sound_by_machine` (\n" +
|
||||
"`sound_synth` INT NOT NULL, \n" +
|
||||
"`machine` INT NOT NULL,\n" +
|
||||
"KEY `idx_sound_by_machine_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_sound_by_machine_machine` (`machine`),\n" +
|
||||
"CONSTRAINT `fk_sound_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_sound_by_machine_sound_synth` FOREIGN KEY (`sound_synth`) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
public static readonly string SoundByMachine = "CREATE TABLE `sound_by_machine` (\n" +
|
||||
"`sound_synth` INT NOT NULL, \n" + "`machine` INT NOT NULL,\n" +
|
||||
"KEY `idx_sound_by_machine_sound_synth` (`sound_synth`),\n" +
|
||||
"KEY `idx_sound_by_machine_machine` (`machine`),\n" +
|
||||
"CONSTRAINT `fk_sound_by_machine_machine` FOREIGN KEY (`machine`) REFERENCES `machines` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_sound_by_machine_sound_synth` FOREIGN KEY (`sound_synth`) REFERENCES `sound_synths` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
@@ -40,34 +40,32 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V17.Companies;
|
||||
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" +
|
||||
"`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"PRIMARY KEY (`id`),;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`colors` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`res` char(10) NOT NULL DEFAULT '',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" + "`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" + "PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_colors` (`colors`),;\n" +
|
||||
"KEY `idx_machines_res` (`res`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_type` (`type`));";
|
||||
|
||||
public static readonly string DiskFormats = V17.DiskFormats;
|
||||
|
||||
@@ -40,30 +40,28 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V18.Companies;
|
||||
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" +
|
||||
"`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"PRIMARY KEY (`id`),;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`hdd1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`hdd2` int(11) DEFAULT NULL,;\n" + "`hdd3` int(11) DEFAULT NULL,;\n" +
|
||||
"`disk1` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`cap1` char(25) NOT NULL DEFAULT '0',;\n" +
|
||||
"`disk2` int(11) DEFAULT NULL,;\n" +
|
||||
"`cap2` char(25) DEFAULT NULL,;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" + "PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_hdd1` (`hdd1`),;\n" +
|
||||
"KEY `idx_machines_hdd2` (`hdd2`),;\n" +
|
||||
"KEY `idx_machines_hdd3` (`hdd3`),;\n" +
|
||||
"KEY `idx_machines_disk1` (`disk1`),;\n" +
|
||||
"KEY `idx_machines_disk2` (`disk2`),;\n" +
|
||||
"KEY `idx_machines_cap1` (`cap1`),;\n" +
|
||||
"KEY `idx_machines_cap2` (`cap2`),;\n" +
|
||||
"KEY `idx_machines_type` (`type`));";
|
||||
|
||||
public static readonly string DiskFormats = V18.DiskFormats;
|
||||
@@ -112,29 +110,26 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string MemoryByMachine = V18.MemoryByMachine;
|
||||
|
||||
public static readonly string Resolutions =
|
||||
"CREATE TABLE `resolutions` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`width` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`height` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`colors` BIGINT DEFAULT NULL,\n" +
|
||||
"`palette` BIGINT DEFAULT NULL,\n" +
|
||||
"`chars` BOOL NOT NULL DEFAULT 0,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_resolutions_width` (`width`),\n" +
|
||||
"KEY `idx_resolutions_height` (`height`),\n" +
|
||||
"KEY `idx_resolutions_colors` (`colors`),\n" +
|
||||
"KEY `idx_resolutions_palette` (`palette`),\n" +
|
||||
"INDEX `idx_resolutions_resolution` (`width`,`height`),\n" +
|
||||
"INDEX `idx_resolutions_resolution_with_color` (`width`,`height`,`colors`),\n" +
|
||||
"INDEX `idx_resolutions_resolution_with_color_and_palette` (`width`,`height`,`colors`,`palette`));";
|
||||
public static readonly string Resolutions = "CREATE TABLE `resolutions` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`width` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`height` INT NOT NULL DEFAULT 0,\n" +
|
||||
"`colors` BIGINT DEFAULT NULL,\n" +
|
||||
"`palette` BIGINT DEFAULT NULL,\n" +
|
||||
"`chars` BOOL NOT NULL DEFAULT 0,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_resolutions_width` (`width`),\n" +
|
||||
"KEY `idx_resolutions_height` (`height`),\n" +
|
||||
"KEY `idx_resolutions_colors` (`colors`),\n" +
|
||||
"KEY `idx_resolutions_palette` (`palette`),\n" +
|
||||
"INDEX `idx_resolutions_resolution` (`width`,`height`),\n" +
|
||||
"INDEX `idx_resolutions_resolution_with_color` (`width`,`height`,`colors`),\n" +
|
||||
"INDEX `idx_resolutions_resolution_with_color_and_palette` (`width`,`height`,`colors`,`palette`));";
|
||||
|
||||
public static readonly string ResolutionsByGpu =
|
||||
"CREATE TABLE `resolutions_by_gpu` (\n" +
|
||||
"`gpu` INT NOT NULL,\n" +
|
||||
"`resolution` INT NOT NULL,\n" +
|
||||
"KEY `idx_resolutions_by_gpu_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_resolutions_by_gpu_resolution` (`resolution`),\n" +
|
||||
"CONSTRAINT `fk_resolutions_by_gpu_gpu` FOREIGN KEY (`gpu`) REFERENCES `gpus` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_resolutions_by_gpu_resolution` FOREIGN KEY (`resolution`) REFERENCES `resolutions` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
public static readonly string ResolutionsByGpu = "CREATE TABLE `resolutions_by_gpu` (\n" +
|
||||
"`gpu` INT NOT NULL,\n" + "`resolution` INT NOT NULL,\n" +
|
||||
"KEY `idx_resolutions_by_gpu_gpu` (`gpu`),\n" +
|
||||
"KEY `idx_resolutions_by_gpu_resolution` (`resolution`),\n" +
|
||||
"CONSTRAINT `fk_resolutions_by_gpu_gpu` FOREIGN KEY (`gpu`) REFERENCES `gpus` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,\n" +
|
||||
"CONSTRAINT `fk_resolutions_by_gpu_resolution` FOREIGN KEY (`resolution`) REFERENCES `resolutions` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
@@ -40,16 +40,15 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V19.Companies;
|
||||
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"PRIMARY KEY (`id`),;\n" +
|
||||
"`year` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" + "PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_year` (`year`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_type` (`type`));";
|
||||
|
||||
public static readonly string Forbidden = V19.Forbidden;
|
||||
|
||||
@@ -40,16 +40,15 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V20.Companies;
|
||||
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`introduced` DATETIME NULL,;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (;\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,;\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',;\n" +
|
||||
"`introduced` DATETIME NULL,;\n" +
|
||||
"`model` char(50) NOT NULL DEFAULT '',;\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',;\n" + "PRIMARY KEY (`id`),;\n" +
|
||||
"KEY `idx_machines_company` (`company`),;\n" +
|
||||
"KEY `idx_machines_introduced` (`introduced`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_model` (`model`),;\n" +
|
||||
"KEY `idx_machines_type` (`type`));";
|
||||
|
||||
public static readonly string Forbidden = V20.Forbidden;
|
||||
|
||||
@@ -40,20 +40,19 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string Companies = V21.Companies;
|
||||
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`name` varchar(255) NOT NULL,\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`family` int(11) DEFAULT NULL,\n" +
|
||||
"`model` varchar(50) DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_machines_company` (`company`),\n" +
|
||||
"KEY `idx_machines_type` (`type`),\n" +
|
||||
public static readonly string Machines = "CREATE TABLE `machines` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`name` varchar(255) NOT NULL,\n" +
|
||||
"`type` int(11) NOT NULL DEFAULT '0',\n" +
|
||||
"`introduced` datetime DEFAULT NULL,\n" +
|
||||
"`family` int(11) DEFAULT NULL,\n" +
|
||||
"`model` varchar(50) DEFAULT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_machines_company` (`company`),\n" +
|
||||
"KEY `idx_machines_type` (`type`),\n" +
|
||||
"KEY `idx_machines_introduced` (`introduced`),\n" +
|
||||
"KEY `idx_machines_family` (`family`),\n" +
|
||||
"KEY `idx_machines_name` (`name`),\n" +
|
||||
"KEY `idx_machines_family` (`family`),\n" +
|
||||
"KEY `idx_machines_name` (`name`),\n" +
|
||||
"KEY `idx_machines_model` (`model`));";
|
||||
|
||||
public static readonly string Forbidden = V21.Forbidden;
|
||||
@@ -108,13 +107,12 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string StorageByMachine = V21.StorageByMachine;
|
||||
|
||||
public static readonly string MachineFamilies = "CREATE TABLE `machine_families` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` INT NOT NULL,\n" +
|
||||
"`name` VARCHAR(255) NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
public static readonly string MachineFamilies = "CREATE TABLE `machine_families` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company` INT NOT NULL,\n" +
|
||||
"`name` VARCHAR(255) NOT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_machine_families_company` (`company`),\n" +
|
||||
"KEY `idx_machine_families_name` (`name`),\n" +
|
||||
"KEY `idx_machine_families_name` (`name`),\n" +
|
||||
"CONSTRAINT `fk_machine_families_company` FOREIGN KEY (`company`) REFERENCES `companies` (`id`) ON UPDATE CASCADE ON DELETE CASCADE);";
|
||||
}
|
||||
}
|
||||
@@ -29,13 +29,12 @@ namespace Marechai.Database.Schemas.Sql
|
||||
{
|
||||
public static readonly string Admins = V3.Admins + "\n" + "CREATE INDEX idx_admins_user ON admins (user);";
|
||||
|
||||
public static readonly string BrowserTests =
|
||||
V3.BrowserTests + "\n" +
|
||||
"CREATE INDEX idx_browser_tests_user_agent ON browser_tests (user_agent);\n" +
|
||||
"CREATE INDEX idx_browser_tests_browser ON browser_tests (browser);\n" +
|
||||
"CREATE INDEX idx_browser_tests_version ON browser_tests (version);\n" +
|
||||
"CREATE INDEX idx_browser_tests_os ON browser_tests (os);\n" +
|
||||
"CREATE INDEX idx_browser_tests_platform ON browser_tests (platform);";
|
||||
public static readonly string BrowserTests = V3.BrowserTests + "\n" +
|
||||
"CREATE INDEX idx_browser_tests_user_agent ON browser_tests (user_agent);\n" +
|
||||
"CREATE INDEX idx_browser_tests_browser ON browser_tests (browser);\n" +
|
||||
"CREATE INDEX idx_browser_tests_version ON browser_tests (version);\n" +
|
||||
"CREATE INDEX idx_browser_tests_os ON browser_tests (os);\n" +
|
||||
"CREATE INDEX idx_browser_tests_platform ON browser_tests (platform);";
|
||||
|
||||
public static readonly string MarechaiDb = @"CREATE TABLE `marechai_db` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
@@ -48,113 +47,105 @@ namespace Marechai.Database.Schemas.Sql
|
||||
public static readonly string Companies =
|
||||
V3.Companies + "\n" + "CREATE INDEX idx_companies_name ON companies (name);";
|
||||
|
||||
public static readonly string Computers =
|
||||
V3.Computers + "\n" +
|
||||
"CREATE INDEX idx_computers_company ON computers (company);\n" +
|
||||
"CREATE INDEX idx_computers_year ON computers (year);\n" +
|
||||
"CREATE INDEX idx_computers_model ON computers (model);\n" +
|
||||
"CREATE INDEX idx_computers_cpu1 ON computers (cpu1);\n" +
|
||||
"CREATE INDEX idx_computers_cpu2 ON computers (cpu2);\n" +
|
||||
"CREATE INDEX idx_computers_mhz1 ON computers (mhz1);\n" +
|
||||
"CREATE INDEX idx_computers_mhz2 ON computers (mhz2);\n" +
|
||||
"CREATE INDEX idx_computers_bits ON computers (bits);\n" +
|
||||
"CREATE INDEX idx_computers_ram ON computers (ram);\n" +
|
||||
"CREATE INDEX idx_computers_rom ON computers (rom);\n" +
|
||||
"CREATE INDEX idx_computers_gpu ON computers (gpu);\n" +
|
||||
"CREATE INDEX idx_computers_vram ON computers (vram);\n" +
|
||||
"CREATE INDEX idx_computers_colors ON computers (colors);\n" +
|
||||
"CREATE INDEX idx_computers_res ON computers (res);\n" +
|
||||
"CREATE INDEX idx_computers_sound_synth ON computers (sound_synth);\n" +
|
||||
"CREATE INDEX idx_computers_music_synth ON computers (music_synth);\n" +
|
||||
"CREATE INDEX idx_computers_hdd1 ON computers (hdd1);\n" +
|
||||
"CREATE INDEX idx_computers_hdd2 ON computers (hdd2);\n" +
|
||||
"CREATE INDEX idx_computers_hdd3 ON computers (hdd3);\n" +
|
||||
"CREATE INDEX idx_computers_disk1 ON computers (disk1);\n" +
|
||||
"CREATE INDEX idx_computers_disk2 ON computers (disk2);\n" +
|
||||
"CREATE INDEX idx_computers_cap1 ON computers (cap1);\n" +
|
||||
"CREATE INDEX idx_computers_cap2 ON computers (cap2);";
|
||||
public static readonly string Computers = V3.Computers + "\n" +
|
||||
"CREATE INDEX idx_computers_company ON computers (company);\n" +
|
||||
"CREATE INDEX idx_computers_year ON computers (year);\n" +
|
||||
"CREATE INDEX idx_computers_model ON computers (model);\n" +
|
||||
"CREATE INDEX idx_computers_cpu1 ON computers (cpu1);\n" +
|
||||
"CREATE INDEX idx_computers_cpu2 ON computers (cpu2);\n" +
|
||||
"CREATE INDEX idx_computers_mhz1 ON computers (mhz1);\n" +
|
||||
"CREATE INDEX idx_computers_mhz2 ON computers (mhz2);\n" +
|
||||
"CREATE INDEX idx_computers_bits ON computers (bits);\n" +
|
||||
"CREATE INDEX idx_computers_ram ON computers (ram);\n" +
|
||||
"CREATE INDEX idx_computers_rom ON computers (rom);\n" +
|
||||
"CREATE INDEX idx_computers_gpu ON computers (gpu);\n" +
|
||||
"CREATE INDEX idx_computers_vram ON computers (vram);\n" +
|
||||
"CREATE INDEX idx_computers_colors ON computers (colors);\n" +
|
||||
"CREATE INDEX idx_computers_res ON computers (res);\n" +
|
||||
"CREATE INDEX idx_computers_sound_synth ON computers (sound_synth);\n" +
|
||||
"CREATE INDEX idx_computers_music_synth ON computers (music_synth);\n" +
|
||||
"CREATE INDEX idx_computers_hdd1 ON computers (hdd1);\n" +
|
||||
"CREATE INDEX idx_computers_hdd2 ON computers (hdd2);\n" +
|
||||
"CREATE INDEX idx_computers_hdd3 ON computers (hdd3);\n" +
|
||||
"CREATE INDEX idx_computers_disk1 ON computers (disk1);\n" +
|
||||
"CREATE INDEX idx_computers_disk2 ON computers (disk2);\n" +
|
||||
"CREATE INDEX idx_computers_cap1 ON computers (cap1);\n" +
|
||||
"CREATE INDEX idx_computers_cap2 ON computers (cap2);";
|
||||
|
||||
public static readonly string Consoles = V3.Consoles +
|
||||
"\n" +
|
||||
"CREATE INDEX idx_consoles_company ON consoles (company);\n" +
|
||||
"CREATE INDEX idx_consoles_year ON consoles (year);\n" +
|
||||
"CREATE INDEX idx_consoles_model ON consoles (model);\n" +
|
||||
"CREATE INDEX idx_consoles_cpu1 ON consoles (cpu1);\n" +
|
||||
"CREATE INDEX idx_consoles_cpu2 ON consoles (cpu2);\n" +
|
||||
"CREATE INDEX idx_consoles_mhz1 ON consoles (mhz1);\n" +
|
||||
"CREATE INDEX idx_consoles_mhz2 ON consoles (mhz2);\n" +
|
||||
"CREATE INDEX idx_consoles_bits ON consoles (bits);\n" +
|
||||
"CREATE INDEX idx_consoles_ram ON consoles (ram);\n" +
|
||||
"CREATE INDEX idx_consoles_rom ON consoles (rom);\n" +
|
||||
"CREATE INDEX idx_consoles_gpu ON consoles (gpu);\n" +
|
||||
"CREATE INDEX idx_consoles_vram ON consoles (vram);\n" +
|
||||
"CREATE INDEX idx_consoles_colors ON consoles (colors);\n" +
|
||||
"CREATE INDEX idx_consoles_res ON consoles (res);\n" +
|
||||
public static readonly string Consoles = V3.Consoles + "\n" +
|
||||
"CREATE INDEX idx_consoles_company ON consoles (company);\n" +
|
||||
"CREATE INDEX idx_consoles_year ON consoles (year);\n" +
|
||||
"CREATE INDEX idx_consoles_model ON consoles (model);\n" +
|
||||
"CREATE INDEX idx_consoles_cpu1 ON consoles (cpu1);\n" +
|
||||
"CREATE INDEX idx_consoles_cpu2 ON consoles (cpu2);\n" +
|
||||
"CREATE INDEX idx_consoles_mhz1 ON consoles (mhz1);\n" +
|
||||
"CREATE INDEX idx_consoles_mhz2 ON consoles (mhz2);\n" +
|
||||
"CREATE INDEX idx_consoles_bits ON consoles (bits);\n" +
|
||||
"CREATE INDEX idx_consoles_ram ON consoles (ram);\n" +
|
||||
"CREATE INDEX idx_consoles_rom ON consoles (rom);\n" +
|
||||
"CREATE INDEX idx_consoles_gpu ON consoles (gpu);\n" +
|
||||
"CREATE INDEX idx_consoles_vram ON consoles (vram);\n" +
|
||||
"CREATE INDEX idx_consoles_colors ON consoles (colors);\n" +
|
||||
"CREATE INDEX idx_consoles_res ON consoles (res);\n" +
|
||||
"CREATE INDEX idx_consoles_sound_synth ON consoles (sound_synth);\n" +
|
||||
"CREATE INDEX idx_consoles_music_synth ON consoles (music_synth);\n" +
|
||||
"CREATE INDEX idx_consoles_palette ON consoles (palette);\n" +
|
||||
"CREATE INDEX idx_consoles_format ON consoles (format);\n" +
|
||||
"CREATE INDEX idx_consoles_palette ON consoles (palette);\n" +
|
||||
"CREATE INDEX idx_consoles_format ON consoles (format);\n" +
|
||||
"CREATE INDEX idx_consoles_cap ON consoles (cap);";
|
||||
|
||||
public static readonly string DiskFormats = V3.DiskFormats + "\n" +
|
||||
"CREATE INDEX idx_disk_formats_description ON disk_formats (description);";
|
||||
|
||||
public static readonly string Forbidden = V3.Forbidden +
|
||||
"\n" +
|
||||
public static readonly string Forbidden = V3.Forbidden + "\n" +
|
||||
"CREATE INDEX idx_forbidden_browser ON forbidden (browser);\n" +
|
||||
"CREATE INDEX idx_forbidden_date ON forbidden (date);\n" +
|
||||
"CREATE INDEX idx_forbidden_ip ON forbidden (ip);\n" +
|
||||
"CREATE INDEX idx_forbidden_date ON forbidden (date);\n" +
|
||||
"CREATE INDEX idx_forbidden_ip ON forbidden (ip);\n" +
|
||||
"CREATE INDEX idx_forbidden_referer ON forbidden (referer);";
|
||||
|
||||
public static readonly string Gpus = V3.Gpus + "\n" + "CREATE INDEX idx_gpus_name ON gpus (name);";
|
||||
|
||||
public static readonly string Logs = V3.Logs + "\n" +
|
||||
"CREATE INDEX idx_log_browser ON log (browser);\n" +
|
||||
"CREATE INDEX idx_log_date ON log (date);\n" +
|
||||
"CREATE INDEX idx_log_ip ON log (ip);\n" +
|
||||
public static readonly string Logs = V3.Logs + "\n" + "CREATE INDEX idx_log_browser ON log (browser);\n" +
|
||||
"CREATE INDEX idx_log_date ON log (date);\n" +
|
||||
"CREATE INDEX idx_log_ip ON log (ip);\n" +
|
||||
"CREATE INDEX idx_log_referer ON log (referer);";
|
||||
|
||||
public static readonly string MoneyDonations =
|
||||
V3.MoneyDonations + "\n" +
|
||||
"CREATE INDEX idx_money_donations_donator ON money_donations (donator);\n" +
|
||||
"CREATE INDEX idx_money_donations_quantity ON money_donations (quantity);";
|
||||
public static readonly string MoneyDonations = V3.MoneyDonations + "\n" +
|
||||
"CREATE INDEX idx_money_donations_donator ON money_donations (donator);\n" +
|
||||
"CREATE INDEX idx_money_donations_quantity ON money_donations (quantity);";
|
||||
|
||||
public static readonly string MusicSynths =
|
||||
V3.MusicSynths + "\n" + "CREATE INDEX idx_music_synts_name ON music_synths (name);";
|
||||
|
||||
public static readonly string News = V3.News + "\n" +
|
||||
"CREATE INDEX idx_news_date ON news (date);\n" +
|
||||
public static readonly string News = V3.News + "\n" + "CREATE INDEX idx_news_date ON news (date);\n" +
|
||||
"CREATE INDEX idx_news_type ON news (type);\n" +
|
||||
"CREATE INDEX idx_news_ip ON news (added_id);";
|
||||
|
||||
public static readonly string OwnedComputers =
|
||||
V3.OwnedComputers + "\n" +
|
||||
"CREATE INDEX idx_owned_computers_db_id ON owned_computers (db_id);\n" +
|
||||
"CREATE INDEX idx_owned_computers_date ON owned_computers (date);\n" +
|
||||
"CREATE INDEX idx_owned_computers_status ON owned_computers (status);\n" +
|
||||
"CREATE INDEX idx_owned_computers_trade ON owned_computers (trade);\n" +
|
||||
"CREATE INDEX idx_owned_computers_boxed ON owned_computers (boxed);\n" +
|
||||
"CREATE INDEX idx_owned_computers_manuals ON owned_computers (manuals);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cpu1 ON owned_computers (cpu1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cpu2 ON owned_computers (cpu2);\n" +
|
||||
"CREATE INDEX idx_owned_computers_mhz1 ON owned_computers (mhz1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_mhz2 ON owned_computers (mhz2);\n" +
|
||||
"CREATE INDEX idx_owned_computers_ram ON owned_computers (ram);\n" +
|
||||
"CREATE INDEX idx_owned_computers_vram ON owned_computers (vram);\n" +
|
||||
"CREATE INDEX idx_owned_computers_rigid ON owned_computers (rigid);\n" +
|
||||
"CREATE INDEX idx_owned_computers_disk1 ON owned_computers (disk1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_disk2 ON owned_computers (disk2);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cap1 ON owned_computers (cap1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cap2 ON owned_computers (cap2);";
|
||||
public static readonly string OwnedComputers = V3.OwnedComputers + "\n" +
|
||||
"CREATE INDEX idx_owned_computers_db_id ON owned_computers (db_id);\n" +
|
||||
"CREATE INDEX idx_owned_computers_date ON owned_computers (date);\n" +
|
||||
"CREATE INDEX idx_owned_computers_status ON owned_computers (status);\n" +
|
||||
"CREATE INDEX idx_owned_computers_trade ON owned_computers (trade);\n" +
|
||||
"CREATE INDEX idx_owned_computers_boxed ON owned_computers (boxed);\n" +
|
||||
"CREATE INDEX idx_owned_computers_manuals ON owned_computers (manuals);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cpu1 ON owned_computers (cpu1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cpu2 ON owned_computers (cpu2);\n" +
|
||||
"CREATE INDEX idx_owned_computers_mhz1 ON owned_computers (mhz1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_mhz2 ON owned_computers (mhz2);\n" +
|
||||
"CREATE INDEX idx_owned_computers_ram ON owned_computers (ram);\n" +
|
||||
"CREATE INDEX idx_owned_computers_vram ON owned_computers (vram);\n" +
|
||||
"CREATE INDEX idx_owned_computers_rigid ON owned_computers (rigid);\n" +
|
||||
"CREATE INDEX idx_owned_computers_disk1 ON owned_computers (disk1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_disk2 ON owned_computers (disk2);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cap1 ON owned_computers (cap1);\n" +
|
||||
"CREATE INDEX idx_owned_computers_cap2 ON owned_computers (cap2);";
|
||||
|
||||
public static readonly string OwnedConsoles =
|
||||
V3.OwnedConsoles + "\n" +
|
||||
"CREATE INDEX idx_owned_consoles_db_id ON owned_consoles (db_id);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_date ON owned_consoles (date);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_status ON owned_consoles (status);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_trade ON owned_consoles (trade);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_boxed ON owned_consoles (boxed);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_manuals ON owned_consoles (manuals);";
|
||||
public static readonly string OwnedConsoles = V3.OwnedConsoles + "\n" +
|
||||
"CREATE INDEX idx_owned_consoles_db_id ON owned_consoles (db_id);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_date ON owned_consoles (date);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_status ON owned_consoles (status);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_trade ON owned_consoles (trade);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_boxed ON owned_consoles (boxed);\n" +
|
||||
"CREATE INDEX idx_owned_consoles_manuals ON owned_consoles (manuals);";
|
||||
|
||||
public static readonly string Processors = @"CREATE TABLE IF NOT EXISTS `processors` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
|
||||
@@ -68,10 +68,10 @@ namespace Marechai.Database.Schemas.Sql
|
||||
public static readonly string SoundSynths = V4.SoundSynths;
|
||||
|
||||
public static readonly string ComputersForeignKeys =
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_music_synth (music_synth) REFERENCES music_synths (id);\n" +
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_hdd1 (hdd1) REFERENCES disk_formats (id);\n" +
|
||||
@@ -81,10 +81,10 @@ namespace Marechai.Database.Schemas.Sql
|
||||
"ALTER TABLE computers ADD FOREIGN KEY fk_computers_disk2 (disk2) REFERENCES disk_formats (id);";
|
||||
|
||||
public static readonly string ConsolesForeignKeys =
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_company (company) REFERENCES companies (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu1 (cpu1) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_cpu2 (cpu2) REFERENCES processors (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_gpu (gpu) REFERENCES gpus (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_sound_synth (sound_synth) REFERENCES sound_synths (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_music_synth (music_synth) REFERENCES music_synths (id);\n" +
|
||||
"ALTER TABLE consoles ADD FOREIGN KEY fk_consoles_format (format) REFERENCES disk_formats (id);";
|
||||
|
||||
@@ -38,32 +38,31 @@ namespace Marechai.Database.Schemas.Sql
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO marechai_db (version) VALUES ('6');";
|
||||
|
||||
public static readonly string Companies = "CREATE TABLE `companies` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` varchar(128) NOT NULL DEFAULT '',\n" +
|
||||
"`founded` datetime DEFAULT NULL,\n" +
|
||||
"`website` varchar(255) DEFAULT NULL,\n" +
|
||||
"`twitter` varchar(45) DEFAULT NULL,\n" +
|
||||
"`facebook` varchar(45) DEFAULT NULL,\n" +
|
||||
"`sold` datetime DEFAULT NULL,\n" +
|
||||
"`sold_to` int(11) DEFAULT NULL,\n" +
|
||||
"`address` varchar(80) DEFAULT NULL,\n" +
|
||||
"`city` varchar(80) DEFAULT NULL,\n" +
|
||||
"`province` varchar(80) DEFAULT NULL,\n" +
|
||||
"`postal_code` varchar(25) DEFAULT NULL,\n" +
|
||||
public static readonly string Companies = "CREATE TABLE `companies` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` varchar(128) NOT NULL DEFAULT '',\n" +
|
||||
"`founded` datetime DEFAULT NULL,\n" +
|
||||
"`website` varchar(255) DEFAULT NULL,\n" +
|
||||
"`twitter` varchar(45) DEFAULT NULL,\n" +
|
||||
"`facebook` varchar(45) DEFAULT NULL,\n" +
|
||||
"`sold` datetime DEFAULT NULL,\n" +
|
||||
"`sold_to` int(11) DEFAULT NULL,\n" +
|
||||
"`address` varchar(80) DEFAULT NULL,\n" +
|
||||
"`city` varchar(80) DEFAULT NULL,\n" +
|
||||
"`province` varchar(80) DEFAULT NULL,\n" +
|
||||
"`postal_code` varchar(25) DEFAULT NULL,\n" +
|
||||
"`country` smallint(3) UNSIGNED ZEROFILL DEFAULT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_companies_name` (`name`),\n" +
|
||||
"KEY `idx_companies_founded` (`founded`),\n" +
|
||||
"KEY `idx_companies_website` (`website`),\n" +
|
||||
"KEY `idx_companies_twitter` (`twitter`),\n" +
|
||||
"KEY `idx_companies_facebook` (`facebook`),\n" +
|
||||
"KEY `idx_companies_sold` (`sold`),\n" +
|
||||
"KEY `idx_companies_sold_to` (`sold_to`),\n" +
|
||||
"KEY `idx_companies_address` (`address`),\n" +
|
||||
"KEY `idx_companies_city` (`city`),\n" +
|
||||
"KEY `idx_companies_province` (`province`),\n" +
|
||||
"KEY `idx_companies_postal_code` (`postal_code`),\n" +
|
||||
"PRIMARY KEY (`id`),\n" + "KEY `idx_companies_name` (`name`),\n" +
|
||||
"KEY `idx_companies_founded` (`founded`),\n" +
|
||||
"KEY `idx_companies_website` (`website`),\n" +
|
||||
"KEY `idx_companies_twitter` (`twitter`),\n" +
|
||||
"KEY `idx_companies_facebook` (`facebook`),\n" +
|
||||
"KEY `idx_companies_sold` (`sold`),\n" +
|
||||
"KEY `idx_companies_sold_to` (`sold_to`),\n" +
|
||||
"KEY `idx_companies_address` (`address`),\n" +
|
||||
"KEY `idx_companies_city` (`city`),\n" +
|
||||
"KEY `idx_companies_province` (`province`),\n" +
|
||||
"KEY `idx_companies_postal_code` (`postal_code`),\n" +
|
||||
"KEY `idx_companies_country` (`country`));";
|
||||
|
||||
public static readonly string Computers = V5.Computers;
|
||||
@@ -96,73 +95,72 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string ConsolesForeignKeys = V5.ConsolesForeignKeys;
|
||||
|
||||
public static readonly string Iso3166Numeric = "CREATE TABLE `iso3166_1_numeric` (\n" +
|
||||
public static readonly string Iso3166Numeric = "CREATE TABLE `iso3166_1_numeric` (\n" +
|
||||
"`id` SMALLINT(3) UNSIGNED ZEROFILL NOT NULL,\n" +
|
||||
"`name` VARCHAR(64) NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"`name` VARCHAR(64) NOT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"INDEX `idx_name` (`name` ASC));";
|
||||
|
||||
public static readonly string Iso3166NumericValues =
|
||||
"INSERT INTO `iso3166_1_numeric` VALUES (004,'Afghanistan'),(248,'Åland Islands'),(008,'Albania')," +
|
||||
"(012,'Algeria'),(016,'American Samoa'),(020,'Andorra'),(024,'Angola'),(660,'Anguilla'),(010,'Antarctica')," +
|
||||
"(028,'Antigua and Barbuda'),(032,'Argentina'),(051,'Armenia'),(533,'Aruba'),(036,'Australia')," +
|
||||
"(040,'Austria'),(031,'Azerbaijan'),(044,'Bahamas'),(048,'Bahrain'),(050,'Bangladesh'),(052,'Barbados')," +
|
||||
"(112,'Belarus'),(056,'Belgium'),(084,'Belize'),(204,'Benin'),(060,'Bermuda'),(064,'Bhutan')," +
|
||||
"(862,'Bolivarian Republic of Venezuela'),(535,'Bonaire, Sint Eustatius and Saba')," +
|
||||
"(070,'Bosnia and Herzegovina'),(072,'Botswana'),(074,'Bouvet Island'),(076,'Brazil')," +
|
||||
"(080,'British Antarctic Territory'),(086,'British Indian Ocean Territory'),(092,'British Virgin Islands')," +
|
||||
"(096,'Brunei Darussalam'),(100,'Bulgaria'),(854,'Burkina Faso'),(108,'Burundi'),(132,'Cabo Verde')," +
|
||||
"(116,'Cambodia'),(120,'Cameroon'),(124,'Canada'),(128,'Canton and Enderbury Islands')," +
|
||||
"(136,'Cayman Islands'),(140,'Central African Republic'),(148,'Chad'),(830,'Channel Islands'),(152,'Chile')," +
|
||||
"(156,'China'),(162,'Christmas Island'),(166,'Cocos (Keeling) Islands'),(170,'Colombia'),(174,'Comoros')," +
|
||||
"(178,'Congo'),(184,'Cook Islands'),(188,'Costa Rica'),(384,'Côte d\\'Ivoire'),(191,'Croatia'),(192,'Cuba')," +
|
||||
"(531,'Curaçao'),(196,'Cyprus'),(203,'Czechia'),(200,'Czechoslovakia')," +
|
||||
"(408,'Democratic People\\'s Republic of Korea'),(180,'Democratic Republic of the Congo')," +
|
||||
"(720,'Democratic Yemen'),(208,'Denmark'),(262,'Djibouti'),(212,'Dominica'),(214,'Dominican Republic')," +
|
||||
"(216,'Dronning Maud Land'),(218,'Ecuador'),(818,'Egypt'),(222,'El Salvador'),(226,'Equatorial Guinea')," +
|
||||
"(232,'Eritrea'),(233,'Estonia'),(230,'Ethiopia'),(231,'Ethiopia'),(238,'Falkland Islands (Malvinas)')," +
|
||||
"(234,'Faroe Islands'),(280,'Federal Republic of Germany'),(583,'Federated States of Micronesia')," +
|
||||
"(242,'Fiji'),(246,'Finland'),(250,'France'),(249,'France, Metropolitan'),(254,'French Guiana')," +
|
||||
"(258,'French Polynesia'),(260,'French Southern Territories'),(266,'Gabon'),(270,'Gambia')," +
|
||||
"(274,'Gaza Strip (Palestine)'),(268,'Georgia'),(278,'German Democratic Republic'),(276,'Germany')," +
|
||||
"(288,'Ghana'),(292,'Gibraltar'),(300,'Greece'),(304,'Greenland'),(308,'Grenada'),(312,'Guadeloupe')," +
|
||||
"(316,'Guam'),(320,'Guatemala'),(831,'Guernsey'),(324,'Guinea'),(624,'Guinea-Bissau'),(328,'Guyana')," +
|
||||
"(332,'Haiti'),(334,'Heard Island and McDonald Islands'),(336,'Holy See'),(340,'Honduras')," +
|
||||
"(344,'Hong Kong'),(348,'Hungary'),(352,'Iceland'),(356,'India'),(360,'Indonesia'),(368,'Iraq')," +
|
||||
"(372,'Ireland'),(364,'Islamic Republic of Iran'),(833,'Isle of Man'),(376,'Israel'),(380,'Italy')," +
|
||||
"(388,'Jamaica'),(392,'Japan'),(832,'Jersey'),(396,'Johnston Island'),(400,'Jordan'),(398,'Kazakhstan')," +
|
||||
"INSERT INTO `iso3166_1_numeric` VALUES (004,'Afghanistan'),(248,'Åland Islands'),(008,'Albania')," +
|
||||
"(012,'Algeria'),(016,'American Samoa'),(020,'Andorra'),(024,'Angola'),(660,'Anguilla'),(010,'Antarctica')," +
|
||||
"(028,'Antigua and Barbuda'),(032,'Argentina'),(051,'Armenia'),(533,'Aruba'),(036,'Australia')," +
|
||||
"(040,'Austria'),(031,'Azerbaijan'),(044,'Bahamas'),(048,'Bahrain'),(050,'Bangladesh'),(052,'Barbados')," +
|
||||
"(112,'Belarus'),(056,'Belgium'),(084,'Belize'),(204,'Benin'),(060,'Bermuda'),(064,'Bhutan')," +
|
||||
"(862,'Bolivarian Republic of Venezuela'),(535,'Bonaire, Sint Eustatius and Saba')," +
|
||||
"(070,'Bosnia and Herzegovina'),(072,'Botswana'),(074,'Bouvet Island'),(076,'Brazil')," +
|
||||
"(080,'British Antarctic Territory'),(086,'British Indian Ocean Territory'),(092,'British Virgin Islands')," +
|
||||
"(096,'Brunei Darussalam'),(100,'Bulgaria'),(854,'Burkina Faso'),(108,'Burundi'),(132,'Cabo Verde')," +
|
||||
"(116,'Cambodia'),(120,'Cameroon'),(124,'Canada'),(128,'Canton and Enderbury Islands')," +
|
||||
"(136,'Cayman Islands'),(140,'Central African Republic'),(148,'Chad'),(830,'Channel Islands'),(152,'Chile')," +
|
||||
"(156,'China'),(162,'Christmas Island'),(166,'Cocos (Keeling) Islands'),(170,'Colombia'),(174,'Comoros')," +
|
||||
"(178,'Congo'),(184,'Cook Islands'),(188,'Costa Rica'),(384,'Côte d\\'Ivoire'),(191,'Croatia'),(192,'Cuba')," +
|
||||
"(531,'Curaçao'),(196,'Cyprus'),(203,'Czechia'),(200,'Czechoslovakia')," +
|
||||
"(408,'Democratic People\\'s Republic of Korea'),(180,'Democratic Republic of the Congo')," +
|
||||
"(720,'Democratic Yemen'),(208,'Denmark'),(262,'Djibouti'),(212,'Dominica'),(214,'Dominican Republic')," +
|
||||
"(216,'Dronning Maud Land'),(218,'Ecuador'),(818,'Egypt'),(222,'El Salvador'),(226,'Equatorial Guinea')," +
|
||||
"(232,'Eritrea'),(233,'Estonia'),(230,'Ethiopia'),(231,'Ethiopia'),(238,'Falkland Islands (Malvinas)')," +
|
||||
"(234,'Faroe Islands'),(280,'Federal Republic of Germany'),(583,'Federated States of Micronesia')," +
|
||||
"(242,'Fiji'),(246,'Finland'),(250,'France'),(249,'France, Metropolitan'),(254,'French Guiana')," +
|
||||
"(258,'French Polynesia'),(260,'French Southern Territories'),(266,'Gabon'),(270,'Gambia')," +
|
||||
"(274,'Gaza Strip (Palestine)'),(268,'Georgia'),(278,'German Democratic Republic'),(276,'Germany')," +
|
||||
"(288,'Ghana'),(292,'Gibraltar'),(300,'Greece'),(304,'Greenland'),(308,'Grenada'),(312,'Guadeloupe')," +
|
||||
"(316,'Guam'),(320,'Guatemala'),(831,'Guernsey'),(324,'Guinea'),(624,'Guinea-Bissau'),(328,'Guyana')," +
|
||||
"(332,'Haiti'),(334,'Heard Island and McDonald Islands'),(336,'Holy See'),(340,'Honduras')," +
|
||||
"(344,'Hong Kong'),(348,'Hungary'),(352,'Iceland'),(356,'India'),(360,'Indonesia'),(368,'Iraq')," +
|
||||
"(372,'Ireland'),(364,'Islamic Republic of Iran'),(833,'Isle of Man'),(376,'Israel'),(380,'Italy')," +
|
||||
"(388,'Jamaica'),(392,'Japan'),(832,'Jersey'),(396,'Johnston Island'),(400,'Jordan'),(398,'Kazakhstan')," +
|
||||
"(404,'Kenya'),(296,'Kiribati'),(414,'Kuwait'),(417,'Kyrgyzstan'),(418,'Lao People\\'s Democratic Republic')," +
|
||||
"(428,'Latvia'),(422,'Lebanon'),(426,'Lesotho'),(430,'Liberia'),(434,'Libya'),(438,'Liechtenstein')," +
|
||||
"(440,'Lithuania'),(442,'Luxembourg'),(446,'Macao'),(450,'Madagascar'),(454,'Malawi'),(458,'Malaysia')," +
|
||||
"(462,'Maldives'),(466,'Mali'),(470,'Malta'),(584,'Marshall Islands'),(474,'Martinique'),(478,'Mauritania')," +
|
||||
"(480,'Mauritius'),(175,'Mayotte'),(484,'Mexico'),(488,'Midway Islands'),(492,'Monaco'),(496,'Mongolia')," +
|
||||
"(499,'Montenegro'),(500,'Montserrat'),(504,'Morocco'),(508,'Mozambique'),(104,'Myanmar'),(516,'Namibia')," +
|
||||
"(520,'Nauru'),(524,'Nepal'),(528,'Netherlands'),(530,'Netherlands Antilles'),(532,'Netherlands Antilles')," +
|
||||
"(536,'Neutral Zone'),(540,'New Caledonia'),(554,'New Zealand'),(558,'Nicaragua'),(562,'Niger')," +
|
||||
"(566,'Nigeria'),(570,'Niue'),(574,'Norfolk Island'),(580,'Northern Mariana Islands'),(578,'Norway')," +
|
||||
"(512,'Oman'),(586,'Pakistan'),(585,'Palau'),(590,'Panama'),(591,'Panama'),(594,'Panama Canal Zone')," +
|
||||
"(598,'Papua New Guinea'),(600,'Paraguay'),(604,'Peru'),(608,'Philippines'),(612,'Pitcairn')," +
|
||||
"(068,'Plurinational State of Bolivia'),(616,'Poland'),(620,'Portugal'),(630,'Puerto Rico'),(634,'Qatar')," +
|
||||
"(410,'Republic of Korea'),(498,'Republic of Moldova'),(714,'Republic of Viet-Nam'),(638,'Réunion')," +
|
||||
"(642,'Romania'),(643,'Russian Federation'),(646,'Rwanda'),(650,'Ryukyu Islands'),(652,'Saint Barthélemy')," +
|
||||
"(654,'Saint Helena, Ascension and Tristan da Cunha'),(659,'Saint Kitts and Nevis')," +
|
||||
"(658,'Saint Kitts-Nevis-Anguilla'),(662,'Saint Lucia'),(663,'Saint Martin')," +
|
||||
"(666,'Saint Pierre and Miquelon'),(670,'Saint Vincent and the Grenadines'),(882,'Samoa')," +
|
||||
"(674,'San Marino'),(678,'Sao Tome and Principe'),(682,'Saudi Arabia'),(686,'Senegal'),(688,'Serbia')," +
|
||||
"(891,'Serbia and Montenegro'),(690,'Seychelles'),(694,'Sierra Leone'),(698,'Sikkim'),(702,'Singapore')," +
|
||||
"(534,'Sint Marteen'),(703,'Slovakia'),(705,'Slovenia'),(890,'Socialist Federal Republic of Yugoslavia')," +
|
||||
"(090,'Solomon Islands'),(706,'Somalia'),(710,'South Africa')," +
|
||||
"(239,'South Georgia and the South Sandwich Islands'),(728,'South Sudan'),(724,'Spain'),(144,'Sri Lanka')," +
|
||||
"(275,'State of Palestine'),(729,'Sudan'),(736,'Sudan'),(740,'Suriname'),(744,'Svalbard and Jan Mayen')," +
|
||||
"(748,'Swaziland'),(752,'Sweden'),(756,'Switzerland'),(760,'Syrian Arab Republic')," +
|
||||
"(158,'Taiwan, Province of China'),(762,'Tajikistan'),(764,'Thailand')," +
|
||||
"(807,'The former Yugoslav Republic of Macedonia'),(626,'Timor-Leste'),(768,'Togo'),(772,'Tokelau')," +
|
||||
"(776,'Tonga'),(780,'Trinidad and Tobago'),(582,'Trust Territory of the Pacific Islands'),(788,'Tunisia')," +
|
||||
"(792,'Turkey'),(795,'Turkmenistan'),(796,'Turks and Caicos Islands'),(798,'Tuvalu')," +
|
||||
"(849,'U.S. Miscellaneous Pacific Islands'),(800,'Uganda'),(804,'Ukraine'),(784,'United Arab Emirates')," +
|
||||
"(826,'United Kingdom'),(834,'United Republic of Tanzania'),(581,'United States Minor Outlying Islands')," +
|
||||
"(840,'United States of America'),(858,'Uruguay'),(810,'USSR'),(860,'Uzbekistan'),(548,'Vanuatu')," +
|
||||
"(704,'Viet-Nam'),(850,'Virgin Islands, U.S.'),(872,'Wake Island'),(876,'Wallis and Futuna')," +
|
||||
"(428,'Latvia'),(422,'Lebanon'),(426,'Lesotho'),(430,'Liberia'),(434,'Libya'),(438,'Liechtenstein')," +
|
||||
"(440,'Lithuania'),(442,'Luxembourg'),(446,'Macao'),(450,'Madagascar'),(454,'Malawi'),(458,'Malaysia')," +
|
||||
"(462,'Maldives'),(466,'Mali'),(470,'Malta'),(584,'Marshall Islands'),(474,'Martinique'),(478,'Mauritania')," +
|
||||
"(480,'Mauritius'),(175,'Mayotte'),(484,'Mexico'),(488,'Midway Islands'),(492,'Monaco'),(496,'Mongolia')," +
|
||||
"(499,'Montenegro'),(500,'Montserrat'),(504,'Morocco'),(508,'Mozambique'),(104,'Myanmar'),(516,'Namibia')," +
|
||||
"(520,'Nauru'),(524,'Nepal'),(528,'Netherlands'),(530,'Netherlands Antilles'),(532,'Netherlands Antilles')," +
|
||||
"(536,'Neutral Zone'),(540,'New Caledonia'),(554,'New Zealand'),(558,'Nicaragua'),(562,'Niger')," +
|
||||
"(566,'Nigeria'),(570,'Niue'),(574,'Norfolk Island'),(580,'Northern Mariana Islands'),(578,'Norway')," +
|
||||
"(512,'Oman'),(586,'Pakistan'),(585,'Palau'),(590,'Panama'),(591,'Panama'),(594,'Panama Canal Zone')," +
|
||||
"(598,'Papua New Guinea'),(600,'Paraguay'),(604,'Peru'),(608,'Philippines'),(612,'Pitcairn')," +
|
||||
"(068,'Plurinational State of Bolivia'),(616,'Poland'),(620,'Portugal'),(630,'Puerto Rico'),(634,'Qatar')," +
|
||||
"(410,'Republic of Korea'),(498,'Republic of Moldova'),(714,'Republic of Viet-Nam'),(638,'Réunion')," +
|
||||
"(642,'Romania'),(643,'Russian Federation'),(646,'Rwanda'),(650,'Ryukyu Islands'),(652,'Saint Barthélemy')," +
|
||||
"(654,'Saint Helena, Ascension and Tristan da Cunha'),(659,'Saint Kitts and Nevis')," +
|
||||
"(658,'Saint Kitts-Nevis-Anguilla'),(662,'Saint Lucia'),(663,'Saint Martin')," +
|
||||
"(666,'Saint Pierre and Miquelon'),(670,'Saint Vincent and the Grenadines'),(882,'Samoa')," +
|
||||
"(674,'San Marino'),(678,'Sao Tome and Principe'),(682,'Saudi Arabia'),(686,'Senegal'),(688,'Serbia')," +
|
||||
"(891,'Serbia and Montenegro'),(690,'Seychelles'),(694,'Sierra Leone'),(698,'Sikkim'),(702,'Singapore')," +
|
||||
"(534,'Sint Marteen'),(703,'Slovakia'),(705,'Slovenia'),(890,'Socialist Federal Republic of Yugoslavia')," +
|
||||
"(090,'Solomon Islands'),(706,'Somalia'),(710,'South Africa')," +
|
||||
"(239,'South Georgia and the South Sandwich Islands'),(728,'South Sudan'),(724,'Spain'),(144,'Sri Lanka')," +
|
||||
"(275,'State of Palestine'),(729,'Sudan'),(736,'Sudan'),(740,'Suriname'),(744,'Svalbard and Jan Mayen')," +
|
||||
"(748,'Swaziland'),(752,'Sweden'),(756,'Switzerland'),(760,'Syrian Arab Republic')," +
|
||||
"(158,'Taiwan, Province of China'),(762,'Tajikistan'),(764,'Thailand')," +
|
||||
"(807,'The former Yugoslav Republic of Macedonia'),(626,'Timor-Leste'),(768,'Togo'),(772,'Tokelau')," +
|
||||
"(776,'Tonga'),(780,'Trinidad and Tobago'),(582,'Trust Territory of the Pacific Islands'),(788,'Tunisia')," +
|
||||
"(792,'Turkey'),(795,'Turkmenistan'),(796,'Turks and Caicos Islands'),(798,'Tuvalu')," +
|
||||
"(849,'U.S. Miscellaneous Pacific Islands'),(800,'Uganda'),(804,'Ukraine'),(784,'United Arab Emirates')," +
|
||||
"(826,'United Kingdom'),(834,'United Republic of Tanzania'),(581,'United States Minor Outlying Islands')," +
|
||||
"(840,'United States of America'),(858,'Uruguay'),(810,'USSR'),(860,'Uzbekistan'),(548,'Vanuatu')," +
|
||||
"(704,'Viet-Nam'),(850,'Virgin Islands, U.S.'),(872,'Wake Island'),(876,'Wallis and Futuna')," +
|
||||
"(732,'Western Sahara'),(887,'Yemen'),(886,'Yemen Arab Republic'),(894,'Zambia'),(716,'Zimbabwe');";
|
||||
|
||||
public static readonly string CompaniesForeignKeys =
|
||||
|
||||
@@ -38,34 +38,33 @@ namespace Marechai.Database.Schemas.Sql
|
||||
"PRIMARY KEY (`id`)\n" + ");\n" +
|
||||
"INSERT INTO marechai_db (version) VALUES ('7');";
|
||||
|
||||
public static readonly string Companies = "CREATE TABLE `companies` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` varchar(128) NOT NULL DEFAULT '',\n" +
|
||||
"`founded` datetime DEFAULT NULL,\n" +
|
||||
"`website` varchar(255) DEFAULT NULL,\n" +
|
||||
"`twitter` varchar(45) DEFAULT NULL,\n" +
|
||||
"`facebook` varchar(45) DEFAULT NULL,\n" +
|
||||
"`sold` datetime DEFAULT NULL,\n" +
|
||||
"`sold_to` int(11) DEFAULT NULL,\n" +
|
||||
"`address` varchar(80) DEFAULT NULL,\n" +
|
||||
"`city` varchar(80) DEFAULT NULL,\n" +
|
||||
"`province` varchar(80) DEFAULT NULL,\n" +
|
||||
"`postal_code` varchar(25) DEFAULT NULL,\n" +
|
||||
public static readonly string Companies = "CREATE TABLE `companies` (\n" +
|
||||
"`id` int(11) NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`name` varchar(128) NOT NULL DEFAULT '',\n" +
|
||||
"`founded` datetime DEFAULT NULL,\n" +
|
||||
"`website` varchar(255) DEFAULT NULL,\n" +
|
||||
"`twitter` varchar(45) DEFAULT NULL,\n" +
|
||||
"`facebook` varchar(45) DEFAULT NULL,\n" +
|
||||
"`sold` datetime DEFAULT NULL,\n" +
|
||||
"`sold_to` int(11) DEFAULT NULL,\n" +
|
||||
"`address` varchar(80) DEFAULT NULL,\n" +
|
||||
"`city` varchar(80) DEFAULT NULL,\n" +
|
||||
"`province` varchar(80) DEFAULT NULL,\n" +
|
||||
"`postal_code` varchar(25) DEFAULT NULL,\n" +
|
||||
"`country` smallint(3) UNSIGNED ZEROFILL DEFAULT NULL,\n" +
|
||||
"`status` int NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_companies_name` (`name`),\n" +
|
||||
"KEY `idx_companies_founded` (`founded`),\n" +
|
||||
"KEY `idx_companies_website` (`website`),\n" +
|
||||
"KEY `idx_companies_twitter` (`twitter`),\n" +
|
||||
"KEY `idx_companies_facebook` (`facebook`),\n" +
|
||||
"KEY `idx_companies_sold` (`sold`),\n" +
|
||||
"KEY `idx_companies_sold_to` (`sold_to`),\n" +
|
||||
"KEY `idx_companies_address` (`address`),\n" +
|
||||
"KEY `idx_companies_city` (`city`),\n" +
|
||||
"KEY `idx_companies_province` (`province`),\n" +
|
||||
"KEY `idx_companies_postal_code` (`postal_code`),\n" +
|
||||
"KEY `idx_companies_status` (`status`),\n" +
|
||||
"`status` int NOT NULL,\n" + "PRIMARY KEY (`id`),\n" +
|
||||
"KEY `idx_companies_name` (`name`),\n" +
|
||||
"KEY `idx_companies_founded` (`founded`),\n" +
|
||||
"KEY `idx_companies_website` (`website`),\n" +
|
||||
"KEY `idx_companies_twitter` (`twitter`),\n" +
|
||||
"KEY `idx_companies_facebook` (`facebook`),\n" +
|
||||
"KEY `idx_companies_sold` (`sold`),\n" +
|
||||
"KEY `idx_companies_sold_to` (`sold_to`),\n" +
|
||||
"KEY `idx_companies_address` (`address`),\n" +
|
||||
"KEY `idx_companies_city` (`city`),\n" +
|
||||
"KEY `idx_companies_province` (`province`),\n" +
|
||||
"KEY `idx_companies_postal_code` (`postal_code`),\n" +
|
||||
"KEY `idx_companies_status` (`status`),\n" +
|
||||
"KEY `idx_companies_country` (`country`));";
|
||||
|
||||
public static readonly string Computers = V6.Computers;
|
||||
|
||||
@@ -76,17 +76,16 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string CompaniesForeignKeys = V7.CompaniesForeignKeys;
|
||||
|
||||
public static readonly string CompanyLogos = "CREATE TABLE IF NOT EXISTS `company_logos` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company_id` INT(11) NOT NULL,\n" +
|
||||
"`year` INT(4) DEFAULT NULL,\n" +
|
||||
"`logo_guid` CHAR(36) NOT NULL,\n" +
|
||||
public static readonly string CompanyLogos = "CREATE TABLE IF NOT EXISTS `company_logos` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company_id` INT(11) NOT NULL,\n" +
|
||||
"`year` INT(4) DEFAULT NULL,\n" +
|
||||
"`logo_guid` CHAR(36) NOT NULL,\n" +
|
||||
"PRIMARY KEY (`id`, `company_id`, `logo_guid`),\n" +
|
||||
"UNIQUE INDEX `idx_id` (`id` ASC),\n" +
|
||||
"INDEX `idx_company_id` (`company_id` ASC),\n" +
|
||||
"INDEX `idx_guid` (`logo_guid` ASC),\n" +
|
||||
"CONSTRAINT `fk_company_logos_company1`\n" +
|
||||
"FOREIGN KEY (`company_id`)\n" +
|
||||
"REFERENCES `companies` (`id`))";
|
||||
"UNIQUE INDEX `idx_id` (`id` ASC),\n" +
|
||||
"INDEX `idx_company_id` (`company_id` ASC),\n" +
|
||||
"INDEX `idx_guid` (`logo_guid` ASC),\n" +
|
||||
"CONSTRAINT `fk_company_logos_company1`\n" +
|
||||
"FOREIGN KEY (`company_id`)\n" + "REFERENCES `companies` (`id`))";
|
||||
}
|
||||
}
|
||||
@@ -78,15 +78,13 @@ namespace Marechai.Database.Schemas.Sql
|
||||
|
||||
public static readonly string CompanyLogos = V8.CompanyLogos;
|
||||
|
||||
public static readonly string CompanyDescriptions =
|
||||
"CREATE TABLE `company_descriptions` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company_id` INT NOT NULL,\n" +
|
||||
"`text` text,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"INDEX `idx_company_id` (`company_id` ASC),\n" +
|
||||
"FULLTEXT KEY `idx_text` (`text`),\n" +
|
||||
"CONSTRAINT `fk_company_id` FOREIGN KEY (`id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE\n" +
|
||||
")";
|
||||
public static readonly string CompanyDescriptions = "CREATE TABLE `company_descriptions` (\n" +
|
||||
"`id` INT NOT NULL AUTO_INCREMENT,\n" +
|
||||
"`company_id` INT NOT NULL,\n" + "`text` text,\n" +
|
||||
"PRIMARY KEY (`id`),\n" +
|
||||
"INDEX `idx_company_id` (`company_id` ASC),\n" +
|
||||
"FULLTEXT KEY `idx_text` (`text`),\n" +
|
||||
"CONSTRAINT `fk_company_id` FOREIGN KEY (`id`) REFERENCES `companies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE\n" +
|
||||
")";
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -111,7 +111,9 @@ namespace Marechai.Database.Seeders
|
||||
{
|
||||
var newCode = new Models.Iso4217
|
||||
{
|
||||
Code = currency.Code, Name = currency.Name, Numeric = currency.Number
|
||||
Code = currency.Code,
|
||||
Name = currency.Name,
|
||||
Numeric = currency.Number
|
||||
};
|
||||
|
||||
if(byte.TryParse(currency.MinorUnits, out minorUnits))
|
||||
@@ -170,7 +172,9 @@ namespace Marechai.Database.Seeders
|
||||
{
|
||||
var newCode = new Models.Iso4217
|
||||
{
|
||||
Code = currency.Code, Name = currency.Name, Numeric = currency.Number
|
||||
Code = currency.Code,
|
||||
Name = currency.Name,
|
||||
Numeric = currency.Number
|
||||
};
|
||||
|
||||
if(byte.TryParse(currency.MinorUnits, out minorUnits))
|
||||
|
||||
@@ -99,8 +99,14 @@ namespace Marechai.Database.Seeders
|
||||
|
||||
codes.Add(new Models.Iso639
|
||||
{
|
||||
Id = pieces[0], Part2B = pieces[1], Part2T = pieces[2], Part1 = pieces[3],
|
||||
Scope = pieces[4], Type = pieces[5], ReferenceName = pieces[6], Comment = pieces[7]
|
||||
Id = pieces[0],
|
||||
Part2B = pieces[1],
|
||||
Part2T = pieces[2],
|
||||
Part1 = pieces[3],
|
||||
Scope = pieces[4],
|
||||
Type = pieces[5],
|
||||
ReferenceName = pieces[6],
|
||||
Comment = pieces[7]
|
||||
});
|
||||
|
||||
line = sr.ReadLine();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,8 @@ namespace Marechai.Database.Seeders
|
||||
{
|
||||
var roles = configuration.GetSection("MarechaiRoles").GetChildren().Select(x => new
|
||||
{
|
||||
Name = x.GetValue<string>("Name"), Description = x.GetValue<string>("Description")
|
||||
Name = x.GetValue<string>("Name"),
|
||||
Description = x.GetValue<string>("Description")
|
||||
}).ToList();
|
||||
|
||||
if(roles.Count == 0)
|
||||
|
||||
@@ -67,7 +67,9 @@ namespace Marechai.Database.Seeders
|
||||
{
|
||||
uberAdmin = new ApplicationUser
|
||||
{
|
||||
UserName = "claunia", Email = "claunia@claunia.com", EmailConfirmed = true
|
||||
UserName = "claunia",
|
||||
Email = "claunia@claunia.com",
|
||||
EmailConfirmed = true
|
||||
};
|
||||
|
||||
byte[] newPass = new byte[8];
|
||||
|
||||
@@ -7,6 +7,6 @@ namespace Marechai.Areas.Identity
|
||||
{
|
||||
public class IdentityHostingStartup : IHostingStartup
|
||||
{
|
||||
public void Configure(IWebHostBuilder builder) => builder.ConfigureServices((context, services) => { });
|
||||
public void Configure(IWebHostBuilder builder) => builder.ConfigureServices((context, services) => {});
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,6 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
{
|
||||
public class AccessDeniedModel : PageModel
|
||||
{
|
||||
public void OnGet() { }
|
||||
public void OnGet() {}
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,8 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
{
|
||||
var user = new ApplicationUser
|
||||
{
|
||||
UserName = Input.Email, Email = Input.Email
|
||||
UserName = Input.Email,
|
||||
Email = Input.Email
|
||||
};
|
||||
|
||||
IdentityResult result = await _userManager.CreateAsync(user);
|
||||
@@ -158,7 +159,9 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
|
||||
string callbackUrl = Url.Page("/Account/ConfirmEmail", null, new
|
||||
{
|
||||
area = "Identity", userId, code
|
||||
area = "Identity",
|
||||
userId,
|
||||
code
|
||||
}, Request.Scheme);
|
||||
|
||||
await _emailSender.SendEmailAsync(Input.Email, "Confirm your email",
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
|
||||
string callbackUrl = Url.Page("/Account/ResetPassword", null, new
|
||||
{
|
||||
area = "Identity", code
|
||||
area = "Identity",
|
||||
code
|
||||
}, Request.Scheme);
|
||||
|
||||
await _emailSender.SendEmailAsync(Input.Email, "Reset Password",
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
[AllowAnonymous]
|
||||
public class ForgotPasswordConfirmation : PageModel
|
||||
{
|
||||
public void OnGet() { }
|
||||
public void OnGet() {}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,6 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
[AllowAnonymous]
|
||||
public class LockoutModel : PageModel
|
||||
{
|
||||
public void OnGet() { }
|
||||
public void OnGet() {}
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,8 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
{
|
||||
return RedirectToPage("./LoginWith2fa", new
|
||||
{
|
||||
ReturnUrl = returnUrl, Input.RememberMe
|
||||
ReturnUrl = returnUrl,
|
||||
Input.RememberMe
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public void OnGet() { }
|
||||
public void OnGet() {}
|
||||
|
||||
public async Task<IActionResult> OnPost(string returnUrl = null)
|
||||
{
|
||||
|
||||
@@ -39,11 +39,8 @@ namespace Marechai.Areas.Identity.Pages.Account.Manage
|
||||
// Only include personal data for download
|
||||
Dictionary<string, string> personalData = new Dictionary<string, string>();
|
||||
|
||||
IEnumerable<PropertyInfo> personalDataProps = typeof(ApplicationUser).
|
||||
GetProperties().
|
||||
Where(prop =>
|
||||
Attribute.IsDefined(prop,
|
||||
typeof(PersonalDataAttribute)));
|
||||
IEnumerable<PropertyInfo> personalDataProps = typeof(ApplicationUser).GetProperties().
|
||||
Where(prop => Attribute.IsDefined(prop, typeof(PersonalDataAttribute)));
|
||||
|
||||
foreach(PropertyInfo p in personalDataProps)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,9 @@ namespace Marechai.Areas.Identity.Pages.Account.Manage
|
||||
|
||||
string callbackUrl = Url.Page("/Account/ConfirmEmailChange", null, new
|
||||
{
|
||||
userId, email = Input.NewEmail, code
|
||||
userId,
|
||||
email = Input.NewEmail,
|
||||
code
|
||||
}, Request.Scheme);
|
||||
|
||||
await _emailSender.SendEmailAsync(Input.NewEmail, "Confirm your email",
|
||||
@@ -128,7 +130,9 @@ namespace Marechai.Areas.Identity.Pages.Account.Manage
|
||||
|
||||
string callbackUrl = Url.Page("/Account/ConfirmEmail", null, new
|
||||
{
|
||||
area = "Identity", userId, code
|
||||
area = "Identity",
|
||||
userId,
|
||||
code
|
||||
}, Request.Scheme);
|
||||
|
||||
await _emailSender.SendEmailAsync(email, "Confirm your email",
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace Marechai.Areas.Identity.Pages.Account.Manage
|
||||
{
|
||||
public class ResetAuthenticatorModel : PageModel
|
||||
{
|
||||
readonly SignInManager<ApplicationUser> _signInManager;
|
||||
readonly ILogger<ResetAuthenticatorModel> _logger;
|
||||
readonly SignInManager<ApplicationUser> _signInManager;
|
||||
readonly UserManager<ApplicationUser> _userManager;
|
||||
|
||||
public ResetAuthenticatorModel(UserManager<ApplicationUser> userManager,
|
||||
|
||||
@@ -55,7 +55,8 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
{
|
||||
var user = new ApplicationUser
|
||||
{
|
||||
UserName = Input.Email, Email = Input.Email
|
||||
UserName = Input.Email,
|
||||
Email = Input.Email
|
||||
};
|
||||
|
||||
IdentityResult result = await _userManager.CreateAsync(user, Input.Password);
|
||||
@@ -69,7 +70,10 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
|
||||
string callbackUrl = Url.Page("/Account/ConfirmEmail", null, new
|
||||
{
|
||||
area = "Identity", userId = user.Id, code, returnUrl
|
||||
area = "Identity",
|
||||
userId = user.Id,
|
||||
code,
|
||||
returnUrl
|
||||
}, Request.Scheme);
|
||||
|
||||
await _emailSender.SendEmailAsync(Input.Email, "Confirm your email",
|
||||
@@ -79,7 +83,8 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
{
|
||||
return RedirectToPage("RegisterConfirmation", new
|
||||
{
|
||||
email = Input.Email, returnUrl
|
||||
email = Input.Email,
|
||||
returnUrl
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,10 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
|
||||
EmailConfirmationUrl = Url.Page("/Account/ConfirmEmail", null, new
|
||||
{
|
||||
area = "Identity", userId, code, returnUrl
|
||||
area = "Identity",
|
||||
userId,
|
||||
code,
|
||||
returnUrl
|
||||
}, Request.Scheme);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
[BindProperty]
|
||||
public InputModel Input { get; set; }
|
||||
|
||||
public void OnGet() { }
|
||||
public void OnGet() {}
|
||||
|
||||
public async Task<IActionResult> OnPostAsync()
|
||||
{
|
||||
@@ -51,7 +51,8 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
|
||||
string callbackUrl = Url.Page("/Account/ConfirmEmail", null, new
|
||||
{
|
||||
userId, code
|
||||
userId,
|
||||
code
|
||||
}, Request.Scheme);
|
||||
|
||||
await _emailSender.SendEmailAsync(Input.Email, "Confirm your email",
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Marechai.Areas.Identity.Pages.Account
|
||||
[AllowAnonymous]
|
||||
public class ResetPasswordConfirmationModel : PageModel
|
||||
{
|
||||
public void OnGet() { }
|
||||
public void OnGet() {}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user