Files
everything/EveryThing/Migrations/20220312183512_1.cs
David Štaleker db0cc8d3de prvi
2025-07-18 05:33:16 +02:00

1785 lines
91 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EveryThing.Migrations
{
public partial class _1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "CodeTableCountries",
columns: table => new
{
IdCountry = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Code = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TranslationSlovenian = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_CodeTableCountries", x => x.IdCountry);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "IdentityRole",
columns: table => new
{
IdRole = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false),
Name = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
NormalizedName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityRole", x => x.IdRole);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "CodeTableCompanies",
columns: table => new
{
IdCompany = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ShortTitle = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IdCountryFk = table.Column<int>(type: "int", nullable: false),
City = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Street = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
HouseNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PostNumber = table.Column<int>(type: "int", nullable: false),
Post = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TaxNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
RegistrationNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Email = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Bank = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Iban = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
SwiftBic = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Ceo = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Phone = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CodeTableCompanies", x => x.IdCompany);
table.ForeignKey(
name: "FK_CodeTableCompanies_CodeTableCountries_IdCountryFk",
column: x => x.IdCountryFk,
principalTable: "CodeTableCountries",
principalColumn: "IdCountry",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "IdentityRoleClaims",
columns: table => new
{
IdRoleClaim = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdRoleFk = table.Column<int>(type: "int", nullable: false),
ClaimType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ClaimValue = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityRoleClaims", x => x.IdRoleClaim);
table.ForeignKey(
name: "FK_IdentityRoleClaims_IdentityRole_IdRoleFk",
column: x => x.IdRoleFk,
principalTable: "IdentityRole",
principalColumn: "IdRole",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "CodeTableDepartements",
columns: table => new
{
IdDepartement = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CodeTableDepartements", x => x.IdDepartement);
table.ForeignKey(
name: "FK_CodeTableDepartements_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "CodeTableItems",
columns: table => new
{
IdItem = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CodeTableItems", x => x.IdItem);
table.ForeignKey(
name: "FK_CodeTableItems_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "CodeTableJobs",
columns: table => new
{
IdJob = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CodeTableJobs", x => x.IdJob);
table.ForeignKey(
name: "FK_CodeTableJobs_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "CodeTablePartners",
columns: table => new
{
IdPartner = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
IdCountryFk = table.Column<int>(type: "int", nullable: false),
City = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Street = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
HouseNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PostNumber = table.Column<int>(type: "int", nullable: false),
Post = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TaxNumber = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
RegistrationNumber = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Email = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CodeTablePartners", x => x.IdPartner);
table.ForeignKey(
name: "FK_CodeTablePartners_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_CodeTablePartners_CodeTableCountries_IdCountryFk",
column: x => x.IdCountryFk,
principalTable: "CodeTableCountries",
principalColumn: "IdCountry",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "CodeTablePrePostText",
columns: table => new
{
IdPrePostText = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
Type = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Content = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_CodeTablePrePostText", x => x.IdPrePostText);
table.ForeignKey(
name: "FK_CodeTablePrePostText_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "DocumentTypes",
columns: table => new
{
IdDocumentType = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: true),
DocumentTypeReference = table.Column<int>(type: "int", nullable: false),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DocumentTypes", x => x.IdDocumentType);
table.ForeignKey(
name: "FK_DocumentTypes_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany");
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Files",
columns: table => new
{
IdFile = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
FileType = table.Column<int>(type: "int", nullable: false),
IdReferenceFk = table.Column<int>(type: "int", nullable: false),
Guid = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Extension = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Salt = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Iv = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
DateOfUpload = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_Files", x => x.IdFile);
table.ForeignKey(
name: "FK_Files_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "IdentityUser",
columns: table => new
{
IdUser = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
Name = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Surname = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
DateCreated = table.Column<DateTime>(type: "datetime(6)", nullable: false),
DateValidUntil = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false),
UserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
NormalizedUserName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Email = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
NormalizedEmail = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
EmailConfirmed = table.Column<bool>(type: "tinyint(1)", nullable: false),
PasswordHash = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
SecurityStamp = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PhoneNumber = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PhoneNumberConfirmed = table.Column<bool>(type: "tinyint(1)", nullable: false),
TwoFactorEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
LockoutEnd = table.Column<DateTimeOffset>(type: "datetime(6)", nullable: true),
LockoutEnabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
AccessFailedCount = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityUser", x => x.IdUser);
table.ForeignKey(
name: "FK_IdentityUser_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Invoices",
columns: table => new
{
IdProject = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Invoices", x => x.IdProject);
table.ForeignKey(
name: "FK_Invoices_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Projects",
columns: table => new
{
IdProject = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Status = table.Column<int>(type: "int", nullable: false),
FinishedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Projects", x => x.IdProject);
table.ForeignKey(
name: "FK_Projects_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleFuelingCards",
columns: table => new
{
IdFuelingCard = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
DateOfExpiry = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CardNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleFuelingCards", x => x.IdFuelingCard);
table.ForeignKey(
name: "FK_VehicleFuelingCards_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleFuelTypes",
columns: table => new
{
IdVehicleFuelType = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: true),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleFuelTypes", x => x.IdVehicleFuelType);
table.ForeignKey(
name: "FK_VehicleFuelTypes_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany");
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleGroups",
columns: table => new
{
IdVehicleGroup = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleGroups", x => x.IdVehicleGroup);
table.ForeignKey(
name: "FK_VehicleGroups_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleMakes",
columns: table => new
{
IdVehicleMake = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: true),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleMakes", x => x.IdVehicleMake);
table.ForeignKey(
name: "FK_VehicleMakes_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany");
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleTypes",
columns: table => new
{
IdVehicleType = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: true),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleTypes", x => x.IdVehicleType);
table.ForeignKey(
name: "FK_VehicleTypes_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany");
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "CodeTableEmployees",
columns: table => new
{
IdEmployee = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
FirstName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
LastName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
GenderIdEmployee = table.Column<int>(type: "int", nullable: false),
BirthDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
IdJobFk = table.Column<int>(type: "int", nullable: false),
IdDepartementFk = table.Column<int>(type: "int", nullable: false),
IdCountryFk = table.Column<int>(type: "int", nullable: false),
City = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Street = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
HouseNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PostNumber = table.Column<int>(type: "int", nullable: false),
Post = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
IdTemporaryCountryFk = table.Column<int>(type: "int", nullable: true),
TemporaryCity = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TemporaryStreet = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TemporaryHouseNumber = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TemporaryPostNumber = table.Column<int>(type: "int", nullable: false),
TemporaryPost = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IdCitizenshipFk = table.Column<int>(type: "int", nullable: false),
CitizenIdNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Telephone = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
MobileTelephone = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Email = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
TaxNumber = table.Column<int>(type: "int", nullable: false),
BankAccount = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
EmploymentDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
HourlyWage = table.Column<float>(type: "float", nullable: false),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CodeTableEmployees", x => x.IdEmployee);
table.ForeignKey(
name: "FK_CodeTableEmployees_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_CodeTableEmployees_CodeTableCountries_IdCitizenshipFk",
column: x => x.IdCitizenshipFk,
principalTable: "CodeTableCountries",
principalColumn: "IdCountry",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_CodeTableEmployees_CodeTableCountries_IdCountryFk",
column: x => x.IdCountryFk,
principalTable: "CodeTableCountries",
principalColumn: "IdCountry",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_CodeTableEmployees_CodeTableCountries_IdTemporaryCountryFk",
column: x => x.IdTemporaryCountryFk,
principalTable: "CodeTableCountries",
principalColumn: "IdCountry",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_CodeTableEmployees_CodeTableDepartements_IdDepartementFk",
column: x => x.IdDepartementFk,
principalTable: "CodeTableDepartements",
principalColumn: "IdDepartement",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CodeTableEmployees_CodeTableEmployees_GenderIdEmployee",
column: x => x.GenderIdEmployee,
principalTable: "CodeTableEmployees",
principalColumn: "IdEmployee",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_CodeTableEmployees_CodeTableJobs_IdJobFk",
column: x => x.IdJobFk,
principalTable: "CodeTableJobs",
principalColumn: "IdJob",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Documents",
columns: table => new
{
IdDocument = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdDocumentTypeFk = table.Column<int>(type: "int", nullable: false),
IdReferenceFk = table.Column<int>(type: "int", nullable: false),
ExpirationDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
Number = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Reference = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Documents", x => x.IdDocument);
table.ForeignKey(
name: "FK_Documents_DocumentTypes_IdDocumentTypeFk",
column: x => x.IdDocumentTypeFk,
principalTable: "DocumentTypes",
principalColumn: "IdDocumentType",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "IdentityUserClaims",
columns: table => new
{
IdUserClaim = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdUserFk = table.Column<int>(type: "int", nullable: false),
ClaimType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ClaimValue = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityUserClaims", x => x.IdUserClaim);
table.ForeignKey(
name: "FK_IdentityUserClaims_IdentityUser_IdUserFk",
column: x => x.IdUserFk,
principalTable: "IdentityUser",
principalColumn: "IdUser",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "IdentityUserLogins",
columns: table => new
{
LoginProvider = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ProviderKey = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ProviderDisplayName = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IdUserFk = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityUserLogins", x => new { x.LoginProvider, x.ProviderKey });
table.ForeignKey(
name: "FK_IdentityUserLogins_IdentityUser_IdUserFk",
column: x => x.IdUserFk,
principalTable: "IdentityUser",
principalColumn: "IdUser",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "IdentityUserRoles",
columns: table => new
{
IdUserFk = table.Column<int>(type: "int", nullable: false),
IdRoleFk = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityUserRoles", x => new { x.IdUserFk, x.IdRoleFk });
table.ForeignKey(
name: "FK_IdentityUserRoles_IdentityRole_IdRoleFk",
column: x => x.IdRoleFk,
principalTable: "IdentityRole",
principalColumn: "IdRole",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_IdentityUserRoles_IdentityUser_IdUserFk",
column: x => x.IdUserFk,
principalTable: "IdentityUser",
principalColumn: "IdUser",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "IdentityUserTokens",
columns: table => new
{
IdUserFk = table.Column<int>(type: "int", nullable: false),
LoginProvider = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Name = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Value = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityUserTokens", x => new { x.IdUserFk, x.LoginProvider, x.Name });
table.ForeignKey(
name: "FK_IdentityUserTokens_IdentityUser_IdUserFk",
column: x => x.IdUserFk,
principalTable: "IdentityUser",
principalColumn: "IdUser",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "InvoiceItems",
columns: table => new
{
IdInvoiceItem = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdInvoiceFk = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_InvoiceItems", x => x.IdInvoiceItem);
table.ForeignKey(
name: "FK_InvoiceItems_Invoices_IdInvoiceFk",
column: x => x.IdInvoiceFk,
principalTable: "Invoices",
principalColumn: "IdProject",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ProjectParts",
columns: table => new
{
IdProjectPart = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdProjectFk = table.Column<int>(type: "int", nullable: false),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Status = table.Column<int>(type: "int", nullable: false),
FinishedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ShippedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProjectParts", x => x.IdProjectPart);
table.ForeignKey(
name: "FK_ProjectParts_Projects_IdProjectFk",
column: x => x.IdProjectFk,
principalTable: "Projects",
principalColumn: "IdProject",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Vehicles",
columns: table => new
{
IdVehicle = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
IdVehicleTypeFk = table.Column<int>(type: "int", nullable: false),
IdMakeFk = table.Column<int>(type: "int", nullable: true),
Model = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Year = table.Column<int>(type: "int", nullable: false),
VinNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
EngineNumber = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IdFuelTypeFk = table.Column<int>(type: "int", nullable: true),
IdDepartementFk = table.Column<int>(type: "int", nullable: true),
IdVehicleGroupFk = table.Column<int>(type: "int", nullable: true),
Title = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
VehicleMeterType = table.Column<int>(type: "int", nullable: false),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
RegistrationNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Vehicles", x => x.IdVehicle);
table.ForeignKey(
name: "FK_Vehicles_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Vehicles_CodeTableDepartements_IdDepartementFk",
column: x => x.IdDepartementFk,
principalTable: "CodeTableDepartements",
principalColumn: "IdDepartement");
table.ForeignKey(
name: "FK_Vehicles_VehicleFuelTypes_IdFuelTypeFk",
column: x => x.IdFuelTypeFk,
principalTable: "VehicleFuelTypes",
principalColumn: "IdVehicleFuelType");
table.ForeignKey(
name: "FK_Vehicles_VehicleGroups_IdVehicleGroupFk",
column: x => x.IdVehicleGroupFk,
principalTable: "VehicleGroups",
principalColumn: "IdVehicleGroup");
table.ForeignKey(
name: "FK_Vehicles_VehicleMakes_IdMakeFk",
column: x => x.IdMakeFk,
principalTable: "VehicleMakes",
principalColumn: "IdVehicleMake");
table.ForeignKey(
name: "FK_Vehicles_VehicleTypes_IdVehicleTypeFk",
column: x => x.IdVehicleTypeFk,
principalTable: "VehicleTypes",
principalColumn: "IdVehicleType",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleBreakdowns",
columns: table => new
{
IdVehicleBreakdown = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
IdVehicleFk = table.Column<int>(type: "int", nullable: false),
DateBreakdown = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Reference = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Meter = table.Column<int>(type: "int", nullable: false),
Description = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
EmployeeIdEmployee = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleBreakdowns", x => x.IdVehicleBreakdown);
table.ForeignKey(
name: "FK_VehicleBreakdowns_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_VehicleBreakdowns_CodeTableEmployees_EmployeeIdEmployee",
column: x => x.EmployeeIdEmployee,
principalTable: "CodeTableEmployees",
principalColumn: "IdEmployee");
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ProjectPartItems",
columns: table => new
{
IdProjectPartItem = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdProjectPartFk = table.Column<int>(type: "int", nullable: false),
IdItemFk = table.Column<int>(type: "int", nullable: true),
NumberOfItems = table.Column<float>(type: "float", nullable: false),
NumberOfSets = table.Column<float>(type: "float", nullable: false),
IdMaterialFk = table.Column<int>(type: "int", nullable: true),
MaterialDimensions = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IdMaterialSupplierFk = table.Column<int>(type: "int", nullable: false),
MaterialPrice = table.Column<float>(type: "float", nullable: false),
WorkPrice = table.Column<float>(type: "float", nullable: false),
NumberOfItemsFinished = table.Column<float>(type: "float", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
FinishedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
ShippingDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ProjectPartItems", x => x.IdProjectPartItem);
table.ForeignKey(
name: "FK_ProjectPartItems_CodeTableItems_IdItemFk",
column: x => x.IdItemFk,
principalTable: "CodeTableItems",
principalColumn: "IdItem",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_ProjectPartItems_CodeTableItems_IdMaterialFk",
column: x => x.IdMaterialFk,
principalTable: "CodeTableItems",
principalColumn: "IdItem",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_ProjectPartItems_CodeTablePartners_IdMaterialSupplierFk",
column: x => x.IdMaterialSupplierFk,
principalTable: "CodeTablePartners",
principalColumn: "IdPartner",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ProjectPartItems_ProjectParts_IdProjectPartFk",
column: x => x.IdProjectPartFk,
principalTable: "ProjectParts",
principalColumn: "IdProjectPart",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "GeneralNotes",
columns: table => new
{
IdNote = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
IdEmployeeFk = table.Column<int>(type: "int", nullable: true),
IdVehicleFk = table.Column<int>(type: "int", nullable: true),
DateSubmitted = table.Column<DateTime>(type: "datetime(6)", nullable: false),
DateReminder = table.Column<DateTime>(type: "datetime(6)", nullable: true),
Description = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_GeneralNotes", x => x.IdNote);
table.ForeignKey(
name: "FK_GeneralNotes_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_GeneralNotes_CodeTableEmployees_IdEmployeeFk",
column: x => x.IdEmployeeFk,
principalTable: "CodeTableEmployees",
principalColumn: "IdEmployee");
table.ForeignKey(
name: "FK_GeneralNotes_Vehicles_IdVehicleFk",
column: x => x.IdVehicleFk,
principalTable: "Vehicles",
principalColumn: "IdVehicle",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "TransportLoadingOrders",
columns: table => new
{
IdTransportLoadingOrder = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
IdPartnerFk = table.Column<int>(type: "int", nullable: false),
OrderNumber = table.Column<int>(type: "int", nullable: false),
OrderYear = table.Column<int>(type: "int", nullable: false),
OrderCity = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
OrderDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
PreText = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
PostText = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IdVehicleFk = table.Column<int>(type: "int", nullable: true),
VehicleText = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Total = table.Column<float>(type: "float", nullable: false),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_TransportLoadingOrders", x => x.IdTransportLoadingOrder);
table.ForeignKey(
name: "FK_TransportLoadingOrders_CodeTableCompanies_IdCompanyFk",
column: x => x.IdCompanyFk,
principalTable: "CodeTableCompanies",
principalColumn: "IdCompany",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_TransportLoadingOrders_CodeTablePartners_IdPartnerFk",
column: x => x.IdPartnerFk,
principalTable: "CodeTablePartners",
principalColumn: "IdPartner",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_TransportLoadingOrders_Vehicles_IdVehicleFk",
column: x => x.IdVehicleFk,
principalTable: "Vehicles",
principalColumn: "IdVehicle",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleDrivers",
columns: table => new
{
IdVehicleDriver = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdEmployeeFk = table.Column<int>(type: "int", nullable: false),
IdVehicleFk = table.Column<int>(type: "int", nullable: false),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleDrivers", x => x.IdVehicleDriver);
table.ForeignKey(
name: "FK_VehicleDrivers_CodeTableEmployees_IdEmployeeFk",
column: x => x.IdEmployeeFk,
principalTable: "CodeTableEmployees",
principalColumn: "IdEmployee",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_VehicleDrivers_Vehicles_IdVehicleFk",
column: x => x.IdVehicleFk,
principalTable: "Vehicles",
principalColumn: "IdVehicle",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleDrives",
columns: table => new
{
IdVehicleDrive = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdEmployeeFk = table.Column<int>(type: "int", nullable: false),
IdVehicleFk = table.Column<int>(type: "int", nullable: false),
DateStart = table.Column<DateTime>(type: "datetime(6)", nullable: false),
DateEnd = table.Column<DateTime>(type: "datetime(6)", nullable: false),
MileageStart = table.Column<int>(type: "int", nullable: false),
MileageEnd = table.Column<int>(type: "int", nullable: false),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleDrives", x => x.IdVehicleDrive);
table.ForeignKey(
name: "FK_VehicleDrives_CodeTableEmployees_IdEmployeeFk",
column: x => x.IdEmployeeFk,
principalTable: "CodeTableEmployees",
principalColumn: "IdEmployee",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_VehicleDrives_Vehicles_IdVehicleFk",
column: x => x.IdVehicleFk,
principalTable: "Vehicles",
principalColumn: "IdVehicle",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleFuelings",
columns: table => new
{
IdVehicleFueling = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdVehicleFk = table.Column<int>(type: "int", nullable: false),
IdEmployeeFk = table.Column<int>(type: "int", nullable: false),
DateOfFueling = table.Column<DateTime>(type: "datetime(6)", nullable: false),
IdVehicleFuelingCardFk = table.Column<int>(type: "int", nullable: true),
FuelingCardInvoiceDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
FuelingCardInvoiceNumber = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IdVehicleFuelTypeFk = table.Column<int>(type: "int", nullable: false),
Quantity = table.Column<double>(type: "double", nullable: false),
Mileage = table.Column<int>(type: "int", nullable: false),
FullTank = table.Column<bool>(type: "tinyint(1)", nullable: false),
Amount = table.Column<double>(type: "double", nullable: false),
IdCountryFk = table.Column<int>(type: "int", nullable: false),
City = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Reference = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleFuelings", x => x.IdVehicleFueling);
table.ForeignKey(
name: "FK_VehicleFuelings_CodeTableCountries_IdCountryFk",
column: x => x.IdCountryFk,
principalTable: "CodeTableCountries",
principalColumn: "IdCountry",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_VehicleFuelings_CodeTableEmployees_IdEmployeeFk",
column: x => x.IdEmployeeFk,
principalTable: "CodeTableEmployees",
principalColumn: "IdEmployee",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_VehicleFuelings_VehicleFuelingCards_IdVehicleFuelingCardFk",
column: x => x.IdVehicleFuelingCardFk,
principalTable: "VehicleFuelingCards",
principalColumn: "IdFuelingCard");
table.ForeignKey(
name: "FK_VehicleFuelings_VehicleFuelTypes_IdVehicleFuelTypeFk",
column: x => x.IdVehicleFuelTypeFk,
principalTable: "VehicleFuelTypes",
principalColumn: "IdVehicleFuelType",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_VehicleFuelings_Vehicles_IdVehicleFk",
column: x => x.IdVehicleFk,
principalTable: "Vehicles",
principalColumn: "IdVehicle",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleIncidents",
columns: table => new
{
IdVehicleIncident = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdEmployeeFk = table.Column<int>(type: "int", nullable: false),
IdVehicleFk = table.Column<int>(type: "int", nullable: false),
Date = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Reference = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleIncidents", x => x.IdVehicleIncident);
table.ForeignKey(
name: "FK_VehicleIncidents_CodeTableEmployees_IdEmployeeFk",
column: x => x.IdEmployeeFk,
principalTable: "CodeTableEmployees",
principalColumn: "IdEmployee",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_VehicleIncidents_Vehicles_IdVehicleFk",
column: x => x.IdVehicleFk,
principalTable: "Vehicles",
principalColumn: "IdVehicle",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleIssues",
columns: table => new
{
IdVehicleIssue = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Priority = table.Column<int>(type: "int", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
IdEmployeeFk = table.Column<int>(type: "int", nullable: true),
IdVehicleFk = table.Column<int>(type: "int", nullable: false),
DateReported = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Description = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleIssues", x => x.IdVehicleIssue);
table.ForeignKey(
name: "FK_VehicleIssues_CodeTableEmployees_IdEmployeeFk",
column: x => x.IdEmployeeFk,
principalTable: "CodeTableEmployees",
principalColumn: "IdEmployee");
table.ForeignKey(
name: "FK_VehicleIssues_Vehicles_IdVehicleFk",
column: x => x.IdVehicleFk,
principalTable: "Vehicles",
principalColumn: "IdVehicle",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "VehicleMeterReadings",
columns: table => new
{
IdVehicle = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdVehicleFk = table.Column<int>(type: "int", nullable: false),
Mileage = table.Column<int>(type: "int", nullable: false),
CreatedBy = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
DateAdded = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Note = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleMeterReadings", x => x.IdVehicle);
table.ForeignKey(
name: "FK_VehicleMeterReadings_Vehicles_IdVehicleFk",
column: x => x.IdVehicleFk,
principalTable: "Vehicles",
principalColumn: "IdVehicle",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "TransportLoadingOrderLoadUnloads",
columns: table => new
{
IdTransportLoadingOrderLoadUnload = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdTransportLoadingOrderFk = table.Column<int>(type: "int", nullable: false),
IdLoadingFk = table.Column<int>(type: "int", nullable: true),
LoadingText = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LoadingDateFrom = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LoadingDateTo = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LoadingReference = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LoadingNote = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IdUnloadingFk = table.Column<int>(type: "int", nullable: true),
UnloadingText = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
UnloadingDateFrom = table.Column<DateTime>(type: "datetime(6)", nullable: true),
UnloadingDateTo = table.Column<DateTime>(type: "datetime(6)", nullable: true),
UnloadingReference = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
UnloadingNote = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CargoDescription = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_TransportLoadingOrderLoadUnloads", x => x.IdTransportLoadingOrderLoadUnload);
table.ForeignKey(
name: "FK_TransportLoadingOrderLoadUnloads_CodeTablePartners_IdLoading~",
column: x => x.IdLoadingFk,
principalTable: "CodeTablePartners",
principalColumn: "IdPartner");
table.ForeignKey(
name: "FK_TransportLoadingOrderLoadUnloads_CodeTablePartners_IdUnloadi~",
column: x => x.IdUnloadingFk,
principalTable: "CodeTablePartners",
principalColumn: "IdPartner");
table.ForeignKey(
name: "FK_TransportLoadingOrderLoadUnloads_TransportLoadingOrders_IdTr~",
column: x => x.IdTransportLoadingOrderFk,
principalTable: "TransportLoadingOrders",
principalColumn: "IdTransportLoadingOrder",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_CodeTableCompanies_IdCountryFk",
table: "CodeTableCompanies",
column: "IdCountryFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTableDepartements_IdCompanyFk",
table: "CodeTableDepartements",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTableEmployees_GenderIdEmployee",
table: "CodeTableEmployees",
column: "GenderIdEmployee");
migrationBuilder.CreateIndex(
name: "IX_CodeTableEmployees_IdCitizenshipFk",
table: "CodeTableEmployees",
column: "IdCitizenshipFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTableEmployees_IdCompanyFk",
table: "CodeTableEmployees",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTableEmployees_IdCountryFk",
table: "CodeTableEmployees",
column: "IdCountryFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTableEmployees_IdDepartementFk",
table: "CodeTableEmployees",
column: "IdDepartementFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTableEmployees_IdJobFk",
table: "CodeTableEmployees",
column: "IdJobFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTableEmployees_IdTemporaryCountryFk",
table: "CodeTableEmployees",
column: "IdTemporaryCountryFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTableItems_IdCompanyFk",
table: "CodeTableItems",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTableJobs_IdCompanyFk",
table: "CodeTableJobs",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTablePartners_IdCompanyFk",
table: "CodeTablePartners",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTablePartners_IdCountryFk",
table: "CodeTablePartners",
column: "IdCountryFk");
migrationBuilder.CreateIndex(
name: "IX_CodeTablePrePostText_IdCompanyFk",
table: "CodeTablePrePostText",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_Documents_IdDocumentTypeFk",
table: "Documents",
column: "IdDocumentTypeFk");
migrationBuilder.CreateIndex(
name: "IX_DocumentTypes_IdCompanyFk",
table: "DocumentTypes",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_Files_IdCompanyFk",
table: "Files",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_GeneralNotes_IdCompanyFk",
table: "GeneralNotes",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_GeneralNotes_IdEmployeeFk",
table: "GeneralNotes",
column: "IdEmployeeFk");
migrationBuilder.CreateIndex(
name: "IX_GeneralNotes_IdVehicleFk",
table: "GeneralNotes",
column: "IdVehicleFk");
migrationBuilder.CreateIndex(
name: "RoleNameIndex",
table: "IdentityRole",
column: "NormalizedName",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_IdentityRoleClaims_IdRoleFk",
table: "IdentityRoleClaims",
column: "IdRoleFk");
migrationBuilder.CreateIndex(
name: "EmailIndex",
table: "IdentityUser",
column: "NormalizedEmail");
migrationBuilder.CreateIndex(
name: "IX_IdentityUser_IdCompanyFk",
table: "IdentityUser",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "UserNameIndex",
table: "IdentityUser",
column: "NormalizedUserName",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_IdentityUserClaims_IdUserFk",
table: "IdentityUserClaims",
column: "IdUserFk");
migrationBuilder.CreateIndex(
name: "IX_IdentityUserLogins_IdUserFk",
table: "IdentityUserLogins",
column: "IdUserFk");
migrationBuilder.CreateIndex(
name: "IX_IdentityUserRoles_IdRoleFk",
table: "IdentityUserRoles",
column: "IdRoleFk");
migrationBuilder.CreateIndex(
name: "IX_InvoiceItems_IdInvoiceFk",
table: "InvoiceItems",
column: "IdInvoiceFk");
migrationBuilder.CreateIndex(
name: "IX_Invoices_IdCompanyFk",
table: "Invoices",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_ProjectPartItems_IdItemFk",
table: "ProjectPartItems",
column: "IdItemFk");
migrationBuilder.CreateIndex(
name: "IX_ProjectPartItems_IdMaterialFk",
table: "ProjectPartItems",
column: "IdMaterialFk");
migrationBuilder.CreateIndex(
name: "IX_ProjectPartItems_IdMaterialSupplierFk",
table: "ProjectPartItems",
column: "IdMaterialSupplierFk");
migrationBuilder.CreateIndex(
name: "IX_ProjectPartItems_IdProjectPartFk",
table: "ProjectPartItems",
column: "IdProjectPartFk");
migrationBuilder.CreateIndex(
name: "IX_ProjectParts_IdProjectFk",
table: "ProjectParts",
column: "IdProjectFk");
migrationBuilder.CreateIndex(
name: "IX_Projects_IdCompanyFk",
table: "Projects",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_TransportLoadingOrderLoadUnloads_IdLoadingFk",
table: "TransportLoadingOrderLoadUnloads",
column: "IdLoadingFk");
migrationBuilder.CreateIndex(
name: "IX_TransportLoadingOrderLoadUnloads_IdTransportLoadingOrderFk",
table: "TransportLoadingOrderLoadUnloads",
column: "IdTransportLoadingOrderFk");
migrationBuilder.CreateIndex(
name: "IX_TransportLoadingOrderLoadUnloads_IdUnloadingFk",
table: "TransportLoadingOrderLoadUnloads",
column: "IdUnloadingFk");
migrationBuilder.CreateIndex(
name: "IX_TransportLoadingOrders_IdCompanyFk",
table: "TransportLoadingOrders",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_TransportLoadingOrders_IdPartnerFk",
table: "TransportLoadingOrders",
column: "IdPartnerFk");
migrationBuilder.CreateIndex(
name: "IX_TransportLoadingOrders_IdVehicleFk",
table: "TransportLoadingOrders",
column: "IdVehicleFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleBreakdowns_EmployeeIdEmployee",
table: "VehicleBreakdowns",
column: "EmployeeIdEmployee");
migrationBuilder.CreateIndex(
name: "IX_VehicleBreakdowns_IdCompanyFk",
table: "VehicleBreakdowns",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleDrivers_IdEmployeeFk",
table: "VehicleDrivers",
column: "IdEmployeeFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleDrivers_IdVehicleFk",
table: "VehicleDrivers",
column: "IdVehicleFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleDrives_IdEmployeeFk",
table: "VehicleDrives",
column: "IdEmployeeFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleDrives_IdVehicleFk",
table: "VehicleDrives",
column: "IdVehicleFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleFuelingCards_IdCompanyFk",
table: "VehicleFuelingCards",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleFuelings_IdCountryFk",
table: "VehicleFuelings",
column: "IdCountryFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleFuelings_IdEmployeeFk",
table: "VehicleFuelings",
column: "IdEmployeeFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleFuelings_IdVehicleFk",
table: "VehicleFuelings",
column: "IdVehicleFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleFuelings_IdVehicleFuelingCardFk",
table: "VehicleFuelings",
column: "IdVehicleFuelingCardFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleFuelings_IdVehicleFuelTypeFk",
table: "VehicleFuelings",
column: "IdVehicleFuelTypeFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleFuelTypes_IdCompanyFk",
table: "VehicleFuelTypes",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleGroups_IdCompanyFk",
table: "VehicleGroups",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleIncidents_IdEmployeeFk",
table: "VehicleIncidents",
column: "IdEmployeeFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleIncidents_IdVehicleFk",
table: "VehicleIncidents",
column: "IdVehicleFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleIssues_IdEmployeeFk",
table: "VehicleIssues",
column: "IdEmployeeFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleIssues_IdVehicleFk",
table: "VehicleIssues",
column: "IdVehicleFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleMakes_IdCompanyFk",
table: "VehicleMakes",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleMeterReadings_IdVehicleFk",
table: "VehicleMeterReadings",
column: "IdVehicleFk");
migrationBuilder.CreateIndex(
name: "IX_Vehicles_IdCompanyFk",
table: "Vehicles",
column: "IdCompanyFk");
migrationBuilder.CreateIndex(
name: "IX_Vehicles_IdDepartementFk",
table: "Vehicles",
column: "IdDepartementFk");
migrationBuilder.CreateIndex(
name: "IX_Vehicles_IdFuelTypeFk",
table: "Vehicles",
column: "IdFuelTypeFk");
migrationBuilder.CreateIndex(
name: "IX_Vehicles_IdMakeFk",
table: "Vehicles",
column: "IdMakeFk");
migrationBuilder.CreateIndex(
name: "IX_Vehicles_IdVehicleGroupFk",
table: "Vehicles",
column: "IdVehicleGroupFk");
migrationBuilder.CreateIndex(
name: "IX_Vehicles_IdVehicleTypeFk",
table: "Vehicles",
column: "IdVehicleTypeFk");
migrationBuilder.CreateIndex(
name: "IX_VehicleTypes_IdCompanyFk",
table: "VehicleTypes",
column: "IdCompanyFk");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CodeTablePrePostText");
migrationBuilder.DropTable(
name: "Documents");
migrationBuilder.DropTable(
name: "Files");
migrationBuilder.DropTable(
name: "GeneralNotes");
migrationBuilder.DropTable(
name: "IdentityRoleClaims");
migrationBuilder.DropTable(
name: "IdentityUserClaims");
migrationBuilder.DropTable(
name: "IdentityUserLogins");
migrationBuilder.DropTable(
name: "IdentityUserRoles");
migrationBuilder.DropTable(
name: "IdentityUserTokens");
migrationBuilder.DropTable(
name: "InvoiceItems");
migrationBuilder.DropTable(
name: "ProjectPartItems");
migrationBuilder.DropTable(
name: "TransportLoadingOrderLoadUnloads");
migrationBuilder.DropTable(
name: "VehicleBreakdowns");
migrationBuilder.DropTable(
name: "VehicleDrivers");
migrationBuilder.DropTable(
name: "VehicleDrives");
migrationBuilder.DropTable(
name: "VehicleFuelings");
migrationBuilder.DropTable(
name: "VehicleIncidents");
migrationBuilder.DropTable(
name: "VehicleIssues");
migrationBuilder.DropTable(
name: "VehicleMeterReadings");
migrationBuilder.DropTable(
name: "DocumentTypes");
migrationBuilder.DropTable(
name: "IdentityRole");
migrationBuilder.DropTable(
name: "IdentityUser");
migrationBuilder.DropTable(
name: "Invoices");
migrationBuilder.DropTable(
name: "CodeTableItems");
migrationBuilder.DropTable(
name: "ProjectParts");
migrationBuilder.DropTable(
name: "TransportLoadingOrders");
migrationBuilder.DropTable(
name: "VehicleFuelingCards");
migrationBuilder.DropTable(
name: "CodeTableEmployees");
migrationBuilder.DropTable(
name: "Projects");
migrationBuilder.DropTable(
name: "CodeTablePartners");
migrationBuilder.DropTable(
name: "Vehicles");
migrationBuilder.DropTable(
name: "CodeTableJobs");
migrationBuilder.DropTable(
name: "CodeTableDepartements");
migrationBuilder.DropTable(
name: "VehicleFuelTypes");
migrationBuilder.DropTable(
name: "VehicleGroups");
migrationBuilder.DropTable(
name: "VehicleMakes");
migrationBuilder.DropTable(
name: "VehicleTypes");
migrationBuilder.DropTable(
name: "CodeTableCompanies");
migrationBuilder.DropTable(
name: "CodeTableCountries");
}
}
}