forked from sanchezvem/PyroFetes
Firs fixes like price into PDF
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,52 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixingDatabase : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "References",
|
||||
table: "Products");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SellingPrice",
|
||||
table: "Products");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Reference",
|
||||
table: "Products",
|
||||
type: "nvarchar(20)",
|
||||
maxLength: 20,
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Reference",
|
||||
table: "Products");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "References",
|
||||
table: "Products",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "SellingPrice",
|
||||
table: "Products",
|
||||
type: "decimal(18,2)",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,755 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddingEntitiesInDatabase : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ContactServiceProvider_Contacts_ContactId",
|
||||
table: "ContactServiceProvider");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ContactServiceProvider_Providers_ServiceProviderId",
|
||||
table: "ContactServiceProvider");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Contract_Providers_ServiceProviderId",
|
||||
table: "Contract");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Contract_Shows_ShowId",
|
||||
table: "Contract");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MaterialWarehouse_Materials_MaterialId",
|
||||
table: "MaterialWarehouse");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MaterialWarehouse_Warehouses_WarehouseId",
|
||||
table: "MaterialWarehouse");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProductTimecode_Products_ProductId",
|
||||
table: "ProductTimecode");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProductTimecode_Shows_ShowId",
|
||||
table: "ProductTimecode");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProviderContacts_Providers_ProviderId",
|
||||
table: "ProviderContacts");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Providers_ProviderTypes_ProviderTypeId",
|
||||
table: "Providers");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowMaterial_Materials_MaterialId",
|
||||
table: "ShowMaterial");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowMaterial_Shows_ShowId",
|
||||
table: "ShowMaterial");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Shows_City_CityId",
|
||||
table: "Shows");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowStaff_Shows_ShowId",
|
||||
table: "ShowStaff");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowStaff_Staffs_StaffId",
|
||||
table: "ShowStaff");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowTruck_Shows_ShowId",
|
||||
table: "ShowTruck");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowTruck_Trucks_TruckId",
|
||||
table: "ShowTruck");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ShowTruck",
|
||||
table: "ShowTruck");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ShowStaff",
|
||||
table: "ShowStaff");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ShowMaterial",
|
||||
table: "ShowMaterial");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Providers",
|
||||
table: "Providers");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ProductTimecode",
|
||||
table: "ProductTimecode");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_MaterialWarehouse",
|
||||
table: "MaterialWarehouse");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Contract",
|
||||
table: "Contract");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ContactServiceProvider",
|
||||
table: "ContactServiceProvider");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_City",
|
||||
table: "City");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ShowTruck",
|
||||
newName: "ShowTrucks");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ShowStaff",
|
||||
newName: "ShowStaffs");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ShowMaterial",
|
||||
newName: "ShowMaterials");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Providers",
|
||||
newName: "ServiceProviders");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ProductTimecode",
|
||||
newName: "ProductTimecodes");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "MaterialWarehouse",
|
||||
newName: "MaterialWarehouses");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Contract",
|
||||
newName: "Contracts");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ContactServiceProvider",
|
||||
newName: "ContactServiceProviders");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "City",
|
||||
newName: "Cities");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ShowTruck_TruckId",
|
||||
table: "ShowTrucks",
|
||||
newName: "IX_ShowTrucks_TruckId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ShowStaff_ShowId",
|
||||
table: "ShowStaffs",
|
||||
newName: "IX_ShowStaffs_ShowId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ShowMaterial_MaterialId",
|
||||
table: "ShowMaterials",
|
||||
newName: "IX_ShowMaterials_MaterialId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_Providers_ProviderTypeId",
|
||||
table: "ServiceProviders",
|
||||
newName: "IX_ServiceProviders_ProviderTypeId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ProductTimecode_ShowId",
|
||||
table: "ProductTimecodes",
|
||||
newName: "IX_ProductTimecodes_ShowId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_MaterialWarehouse_WarehouseId",
|
||||
table: "MaterialWarehouses",
|
||||
newName: "IX_MaterialWarehouses_WarehouseId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_Contract_ServiceProviderId",
|
||||
table: "Contracts",
|
||||
newName: "IX_Contracts_ServiceProviderId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ContactServiceProvider_ServiceProviderId",
|
||||
table: "ContactServiceProviders",
|
||||
newName: "IX_ContactServiceProviders_ServiceProviderId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ShowTrucks",
|
||||
table: "ShowTrucks",
|
||||
columns: new[] { "ShowId", "TruckId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ShowStaffs",
|
||||
table: "ShowStaffs",
|
||||
columns: new[] { "StaffId", "ShowId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ShowMaterials",
|
||||
table: "ShowMaterials",
|
||||
columns: new[] { "ShowId", "MaterialId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ServiceProviders",
|
||||
table: "ServiceProviders",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ProductTimecodes",
|
||||
table: "ProductTimecodes",
|
||||
columns: new[] { "ProductId", "ShowId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_MaterialWarehouses",
|
||||
table: "MaterialWarehouses",
|
||||
columns: new[] { "MaterialId", "WarehouseId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Contracts",
|
||||
table: "Contracts",
|
||||
columns: new[] { "ShowId", "ServiceProviderId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ContactServiceProviders",
|
||||
table: "ContactServiceProviders",
|
||||
columns: new[] { "ContactId", "ServiceProviderId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Cities",
|
||||
table: "Cities",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ShowServiceProviders",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ShowServiceProviders", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ContactServiceProviders_Contacts_ContactId",
|
||||
table: "ContactServiceProviders",
|
||||
column: "ContactId",
|
||||
principalTable: "Contacts",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ContactServiceProviders_ServiceProviders_ServiceProviderId",
|
||||
table: "ContactServiceProviders",
|
||||
column: "ServiceProviderId",
|
||||
principalTable: "ServiceProviders",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contracts_ServiceProviders_ServiceProviderId",
|
||||
table: "Contracts",
|
||||
column: "ServiceProviderId",
|
||||
principalTable: "ServiceProviders",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contracts_Shows_ShowId",
|
||||
table: "Contracts",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MaterialWarehouses_Materials_MaterialId",
|
||||
table: "MaterialWarehouses",
|
||||
column: "MaterialId",
|
||||
principalTable: "Materials",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MaterialWarehouses_Warehouses_WarehouseId",
|
||||
table: "MaterialWarehouses",
|
||||
column: "WarehouseId",
|
||||
principalTable: "Warehouses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProductTimecodes_Products_ProductId",
|
||||
table: "ProductTimecodes",
|
||||
column: "ProductId",
|
||||
principalTable: "Products",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProductTimecodes_Shows_ShowId",
|
||||
table: "ProductTimecodes",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProviderContacts_ServiceProviders_ProviderId",
|
||||
table: "ProviderContacts",
|
||||
column: "ProviderId",
|
||||
principalTable: "ServiceProviders",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ServiceProviders_ProviderTypes_ProviderTypeId",
|
||||
table: "ServiceProviders",
|
||||
column: "ProviderTypeId",
|
||||
principalTable: "ProviderTypes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowMaterials_Materials_MaterialId",
|
||||
table: "ShowMaterials",
|
||||
column: "MaterialId",
|
||||
principalTable: "Materials",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowMaterials_Shows_ShowId",
|
||||
table: "ShowMaterials",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Shows_Cities_CityId",
|
||||
table: "Shows",
|
||||
column: "CityId",
|
||||
principalTable: "Cities",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowStaffs_Shows_ShowId",
|
||||
table: "ShowStaffs",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowStaffs_Staffs_StaffId",
|
||||
table: "ShowStaffs",
|
||||
column: "StaffId",
|
||||
principalTable: "Staffs",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowTrucks_Shows_ShowId",
|
||||
table: "ShowTrucks",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowTrucks_Trucks_TruckId",
|
||||
table: "ShowTrucks",
|
||||
column: "TruckId",
|
||||
principalTable: "Trucks",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ContactServiceProviders_Contacts_ContactId",
|
||||
table: "ContactServiceProviders");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ContactServiceProviders_ServiceProviders_ServiceProviderId",
|
||||
table: "ContactServiceProviders");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Contracts_ServiceProviders_ServiceProviderId",
|
||||
table: "Contracts");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Contracts_Shows_ShowId",
|
||||
table: "Contracts");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MaterialWarehouses_Materials_MaterialId",
|
||||
table: "MaterialWarehouses");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_MaterialWarehouses_Warehouses_WarehouseId",
|
||||
table: "MaterialWarehouses");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProductTimecodes_Products_ProductId",
|
||||
table: "ProductTimecodes");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProductTimecodes_Shows_ShowId",
|
||||
table: "ProductTimecodes");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProviderContacts_ServiceProviders_ProviderId",
|
||||
table: "ProviderContacts");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ServiceProviders_ProviderTypes_ProviderTypeId",
|
||||
table: "ServiceProviders");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowMaterials_Materials_MaterialId",
|
||||
table: "ShowMaterials");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowMaterials_Shows_ShowId",
|
||||
table: "ShowMaterials");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Shows_Cities_CityId",
|
||||
table: "Shows");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowStaffs_Shows_ShowId",
|
||||
table: "ShowStaffs");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowStaffs_Staffs_StaffId",
|
||||
table: "ShowStaffs");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowTrucks_Shows_ShowId",
|
||||
table: "ShowTrucks");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ShowTrucks_Trucks_TruckId",
|
||||
table: "ShowTrucks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ShowServiceProviders");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ShowTrucks",
|
||||
table: "ShowTrucks");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ShowStaffs",
|
||||
table: "ShowStaffs");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ShowMaterials",
|
||||
table: "ShowMaterials");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ServiceProviders",
|
||||
table: "ServiceProviders");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ProductTimecodes",
|
||||
table: "ProductTimecodes");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_MaterialWarehouses",
|
||||
table: "MaterialWarehouses");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Contracts",
|
||||
table: "Contracts");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_ContactServiceProviders",
|
||||
table: "ContactServiceProviders");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Cities",
|
||||
table: "Cities");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ShowTrucks",
|
||||
newName: "ShowTruck");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ShowStaffs",
|
||||
newName: "ShowStaff");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ShowMaterials",
|
||||
newName: "ShowMaterial");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ServiceProviders",
|
||||
newName: "Providers");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ProductTimecodes",
|
||||
newName: "ProductTimecode");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "MaterialWarehouses",
|
||||
newName: "MaterialWarehouse");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Contracts",
|
||||
newName: "Contract");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "ContactServiceProviders",
|
||||
newName: "ContactServiceProvider");
|
||||
|
||||
migrationBuilder.RenameTable(
|
||||
name: "Cities",
|
||||
newName: "City");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ShowTrucks_TruckId",
|
||||
table: "ShowTruck",
|
||||
newName: "IX_ShowTruck_TruckId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ShowStaffs_ShowId",
|
||||
table: "ShowStaff",
|
||||
newName: "IX_ShowStaff_ShowId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ShowMaterials_MaterialId",
|
||||
table: "ShowMaterial",
|
||||
newName: "IX_ShowMaterial_MaterialId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ServiceProviders_ProviderTypeId",
|
||||
table: "Providers",
|
||||
newName: "IX_Providers_ProviderTypeId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ProductTimecodes_ShowId",
|
||||
table: "ProductTimecode",
|
||||
newName: "IX_ProductTimecode_ShowId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_MaterialWarehouses_WarehouseId",
|
||||
table: "MaterialWarehouse",
|
||||
newName: "IX_MaterialWarehouse_WarehouseId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_Contracts_ServiceProviderId",
|
||||
table: "Contract",
|
||||
newName: "IX_Contract_ServiceProviderId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_ContactServiceProviders_ServiceProviderId",
|
||||
table: "ContactServiceProvider",
|
||||
newName: "IX_ContactServiceProvider_ServiceProviderId");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ShowTruck",
|
||||
table: "ShowTruck",
|
||||
columns: new[] { "ShowId", "TruckId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ShowStaff",
|
||||
table: "ShowStaff",
|
||||
columns: new[] { "StaffId", "ShowId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ShowMaterial",
|
||||
table: "ShowMaterial",
|
||||
columns: new[] { "ShowId", "MaterialId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Providers",
|
||||
table: "Providers",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ProductTimecode",
|
||||
table: "ProductTimecode",
|
||||
columns: new[] { "ProductId", "ShowId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_MaterialWarehouse",
|
||||
table: "MaterialWarehouse",
|
||||
columns: new[] { "MaterialId", "WarehouseId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Contract",
|
||||
table: "Contract",
|
||||
columns: new[] { "ShowId", "ServiceProviderId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_ContactServiceProvider",
|
||||
table: "ContactServiceProvider",
|
||||
columns: new[] { "ContactId", "ServiceProviderId" });
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_City",
|
||||
table: "City",
|
||||
column: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ContactServiceProvider_Contacts_ContactId",
|
||||
table: "ContactServiceProvider",
|
||||
column: "ContactId",
|
||||
principalTable: "Contacts",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ContactServiceProvider_Providers_ServiceProviderId",
|
||||
table: "ContactServiceProvider",
|
||||
column: "ServiceProviderId",
|
||||
principalTable: "Providers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contract_Providers_ServiceProviderId",
|
||||
table: "Contract",
|
||||
column: "ServiceProviderId",
|
||||
principalTable: "Providers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Contract_Shows_ShowId",
|
||||
table: "Contract",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MaterialWarehouse_Materials_MaterialId",
|
||||
table: "MaterialWarehouse",
|
||||
column: "MaterialId",
|
||||
principalTable: "Materials",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MaterialWarehouse_Warehouses_WarehouseId",
|
||||
table: "MaterialWarehouse",
|
||||
column: "WarehouseId",
|
||||
principalTable: "Warehouses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProductTimecode_Products_ProductId",
|
||||
table: "ProductTimecode",
|
||||
column: "ProductId",
|
||||
principalTable: "Products",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProductTimecode_Shows_ShowId",
|
||||
table: "ProductTimecode",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProviderContacts_Providers_ProviderId",
|
||||
table: "ProviderContacts",
|
||||
column: "ProviderId",
|
||||
principalTable: "Providers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Providers_ProviderTypes_ProviderTypeId",
|
||||
table: "Providers",
|
||||
column: "ProviderTypeId",
|
||||
principalTable: "ProviderTypes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowMaterial_Materials_MaterialId",
|
||||
table: "ShowMaterial",
|
||||
column: "MaterialId",
|
||||
principalTable: "Materials",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowMaterial_Shows_ShowId",
|
||||
table: "ShowMaterial",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Shows_City_CityId",
|
||||
table: "Shows",
|
||||
column: "CityId",
|
||||
principalTable: "City",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowStaff_Shows_ShowId",
|
||||
table: "ShowStaff",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowStaff_Staffs_StaffId",
|
||||
table: "ShowStaff",
|
||||
column: "StaffId",
|
||||
principalTable: "Staffs",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowTruck_Shows_ShowId",
|
||||
table: "ShowTruck",
|
||||
column: "ShowId",
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ShowTruck_Trucks_TruckId",
|
||||
table: "ShowTruck",
|
||||
column: "TruckId",
|
||||
principalTable: "Trucks",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixedNullableValue : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateOnly>(
|
||||
name: "RealDeliveryDate",
|
||||
table: "DeliveryNotes",
|
||||
type: "date",
|
||||
nullable: true,
|
||||
oldClrType: typeof(DateOnly),
|
||||
oldType: "date");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateOnly>(
|
||||
name: "RealDeliveryDate",
|
||||
table: "DeliveryNotes",
|
||||
type: "date",
|
||||
nullable: false,
|
||||
defaultValue: new DateOnly(1, 1, 1),
|
||||
oldClrType: typeof(DateOnly),
|
||||
oldType: "date",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,68 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixTypeErrors : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ZipCode",
|
||||
table: "Suppliers",
|
||||
type: "nvarchar(5)",
|
||||
maxLength: 5,
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Caliber",
|
||||
table: "Products",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(18,2)");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ApprovalNumber",
|
||||
table: "Products",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ZipCode",
|
||||
table: "Suppliers",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(5)",
|
||||
oldMaxLength: 5);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "Caliber",
|
||||
table: "Products",
|
||||
type: "decimal(18,2)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ApprovalNumber",
|
||||
table: "Products",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,36 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class UpdatedDatabaseProductType : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ApprovalNumber",
|
||||
table: "Products",
|
||||
type: "nvarchar(100)",
|
||||
maxLength: 100,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ApprovalNumber",
|
||||
table: "Products",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(100)",
|
||||
oldMaxLength: 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class UpdatedLengthOfPassword : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Password",
|
||||
table: "Users",
|
||||
type: "nvarchar(60)",
|
||||
maxLength: 60,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(50)",
|
||||
oldMaxLength: 50);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Password",
|
||||
table: "Users",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(60)",
|
||||
oldMaxLength: 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
1967
PyroFetes/Migrations/20251127133430_FixZipCode.Designer.cs
generated
1967
PyroFetes/Migrations/20251127133430_FixZipCode.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,52 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixZipCode : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ZipCode",
|
||||
table: "Warehouses",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ZipCode",
|
||||
table: "Suppliers",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(5)",
|
||||
oldMaxLength: 5);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ZipCode",
|
||||
table: "Warehouses",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ZipCode",
|
||||
table: "Suppliers",
|
||||
type: "nvarchar(5)",
|
||||
maxLength: 5,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixProductTypes : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,8 @@ using PyroFetes;
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
[DbContext(typeof(PyroFetesDbContext))]
|
||||
[Migration("20251213103736_FixProductTypes")]
|
||||
partial class FixProductTypes
|
||||
[Migration("20260326145104_AddSupplierToPurchaseOrder")]
|
||||
partial class AddSupplierToPurchaseOrder
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@@ -698,8 +698,13 @@ namespace PyroFetes.Migrations
|
||||
.HasMaxLength(300)
|
||||
.HasColumnType("nvarchar(300)");
|
||||
|
||||
b.Property<int>("SupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SupplierId");
|
||||
|
||||
b.ToTable("PurchaseOrders");
|
||||
});
|
||||
|
||||
@@ -1548,6 +1553,17 @@ namespace PyroFetes.Migrations
|
||||
b.Navigation("Provider");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PyroFetes.Models.PurchaseOrder", b =>
|
||||
{
|
||||
b.HasOne("PyroFetes.Models.Supplier", "Supplier")
|
||||
.WithMany()
|
||||
.HasForeignKey("SupplierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Supplier");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PyroFetes.Models.PurchaseProduct", b =>
|
||||
{
|
||||
b.HasOne("PyroFetes.Models.Product", "Product")
|
||||
@@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitialDatabase : Migration
|
||||
public partial class AddSupplierToPurchaseOrder : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
@@ -28,7 +28,7 @@ namespace PyroFetes.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "City",
|
||||
name: "Cities",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
@@ -38,7 +38,7 @@ namespace PyroFetes.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_City", x => x.Id);
|
||||
table.PrimaryKey("PK_Cities", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
@@ -146,19 +146,6 @@ namespace PyroFetes.Migrations
|
||||
table.PrimaryKey("PK_ProviderTypes", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PurchaseOrders",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
PurchaseConditions = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PurchaseOrders", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Settings",
|
||||
columns: table => new
|
||||
@@ -173,6 +160,18 @@ namespace PyroFetes.Migrations
|
||||
table.PrimaryKey("PK_Settings", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ShowServiceProviders",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ShowServiceProviders", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SoundCategories",
|
||||
columns: table => new
|
||||
@@ -214,7 +213,7 @@ namespace PyroFetes.Migrations
|
||||
Email = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Phone = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
|
||||
Address = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
ZipCode = table.Column<int>(type: "int", nullable: false),
|
||||
ZipCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
City = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
DeliveryDelay = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
@@ -246,7 +245,7 @@ namespace PyroFetes.Migrations
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Password = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Password = table.Column<string>(type: "nvarchar(60)", maxLength: 60, nullable: false),
|
||||
Salt = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Email = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Fonction = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false)
|
||||
@@ -267,7 +266,7 @@ namespace PyroFetes.Migrations
|
||||
Current = table.Column<int>(type: "int", nullable: false),
|
||||
MinWeight = table.Column<int>(type: "int", nullable: false),
|
||||
Address = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
ZipCode = table.Column<int>(type: "int", nullable: false),
|
||||
ZipCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
City = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
@@ -292,9 +291,9 @@ namespace PyroFetes.Migrations
|
||||
{
|
||||
table.PrimaryKey("PK_Shows", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Shows_City_CityId",
|
||||
name: "FK_Shows_Cities_CityId",
|
||||
column: x => x.CityId,
|
||||
principalTable: "City",
|
||||
principalTable: "Cities",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
@@ -329,7 +328,7 @@ namespace PyroFetes.Migrations
|
||||
DelivererId = table.Column<int>(type: "int", nullable: false),
|
||||
EstimateDeliveryDate = table.Column<DateOnly>(type: "date", nullable: false),
|
||||
ExpeditionDate = table.Column<DateOnly>(type: "date", nullable: false),
|
||||
RealDeliveryDate = table.Column<DateOnly>(type: "date", nullable: false)
|
||||
RealDeliveryDate = table.Column<DateOnly>(type: "date", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -343,7 +342,7 @@ namespace PyroFetes.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Providers",
|
||||
name: "ServiceProviders",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
@@ -353,9 +352,9 @@ namespace PyroFetes.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Providers", x => x.Id);
|
||||
table.PrimaryKey("PK_ServiceProviders", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Providers_ProviderTypes_ProviderTypeId",
|
||||
name: "FK_ServiceProviders_ProviderTypes_ProviderTypeId",
|
||||
column: x => x.ProviderTypeId,
|
||||
principalTable: "ProviderTypes",
|
||||
principalColumn: "Id",
|
||||
@@ -456,6 +455,26 @@ namespace PyroFetes.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PurchaseOrders",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
PurchaseConditions = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: false),
|
||||
SupplierId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PurchaseOrders", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PurchaseOrders_Suppliers_SupplierId",
|
||||
column: x => x.SupplierId,
|
||||
principalTable: "Suppliers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Materials",
|
||||
columns: table => new
|
||||
@@ -508,7 +527,7 @@ namespace PyroFetes.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ShowStaff",
|
||||
name: "ShowStaffs",
|
||||
columns: table => new
|
||||
{
|
||||
StaffId = table.Column<int>(type: "int", nullable: false),
|
||||
@@ -516,15 +535,15 @@ namespace PyroFetes.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ShowStaff", x => new { x.StaffId, x.ShowId });
|
||||
table.PrimaryKey("PK_ShowStaffs", x => new { x.StaffId, x.ShowId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ShowStaff_Shows_ShowId",
|
||||
name: "FK_ShowStaffs_Shows_ShowId",
|
||||
column: x => x.ShowId,
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ShowStaff_Staffs_StaffId",
|
||||
name: "FK_ShowStaffs_Staffs_StaffId",
|
||||
column: x => x.StaffId,
|
||||
principalTable: "Staffs",
|
||||
principalColumn: "Id",
|
||||
@@ -532,7 +551,7 @@ namespace PyroFetes.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ShowTruck",
|
||||
name: "ShowTrucks",
|
||||
columns: table => new
|
||||
{
|
||||
ShowId = table.Column<int>(type: "int", nullable: false),
|
||||
@@ -540,15 +559,15 @@ namespace PyroFetes.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ShowTruck", x => new { x.ShowId, x.TruckId });
|
||||
table.PrimaryKey("PK_ShowTrucks", x => new { x.ShowId, x.TruckId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ShowTruck_Shows_ShowId",
|
||||
name: "FK_ShowTrucks_Shows_ShowId",
|
||||
column: x => x.ShowId,
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ShowTruck_Trucks_TruckId",
|
||||
name: "FK_ShowTrucks_Trucks_TruckId",
|
||||
column: x => x.TruckId,
|
||||
principalTable: "Trucks",
|
||||
principalColumn: "Id",
|
||||
@@ -604,7 +623,7 @@ namespace PyroFetes.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Contract",
|
||||
name: "Contracts",
|
||||
columns: table => new
|
||||
{
|
||||
ShowId = table.Column<int>(type: "int", nullable: false),
|
||||
@@ -613,15 +632,15 @@ namespace PyroFetes.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Contract", x => new { x.ShowId, x.ServiceProviderId });
|
||||
table.PrimaryKey("PK_Contracts", x => new { x.ShowId, x.ServiceProviderId });
|
||||
table.ForeignKey(
|
||||
name: "FK_Contract_Providers_ServiceProviderId",
|
||||
name: "FK_Contracts_ServiceProviders_ServiceProviderId",
|
||||
column: x => x.ServiceProviderId,
|
||||
principalTable: "Providers",
|
||||
principalTable: "ServiceProviders",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Contract_Shows_ShowId",
|
||||
name: "FK_Contracts_Shows_ShowId",
|
||||
column: x => x.ShowId,
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
@@ -655,7 +674,7 @@ namespace PyroFetes.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MaterialWarehouse",
|
||||
name: "MaterialWarehouses",
|
||||
columns: table => new
|
||||
{
|
||||
MaterialId = table.Column<int>(type: "int", nullable: false),
|
||||
@@ -663,15 +682,15 @@ namespace PyroFetes.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MaterialWarehouse", x => new { x.MaterialId, x.WarehouseId });
|
||||
table.PrimaryKey("PK_MaterialWarehouses", x => new { x.MaterialId, x.WarehouseId });
|
||||
table.ForeignKey(
|
||||
name: "FK_MaterialWarehouse_Materials_MaterialId",
|
||||
name: "FK_MaterialWarehouses_Materials_MaterialId",
|
||||
column: x => x.MaterialId,
|
||||
principalTable: "Materials",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_MaterialWarehouse_Warehouses_WarehouseId",
|
||||
name: "FK_MaterialWarehouses_Warehouses_WarehouseId",
|
||||
column: x => x.WarehouseId,
|
||||
principalTable: "Warehouses",
|
||||
principalColumn: "Id",
|
||||
@@ -679,7 +698,7 @@ namespace PyroFetes.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ShowMaterial",
|
||||
name: "ShowMaterials",
|
||||
columns: table => new
|
||||
{
|
||||
ShowId = table.Column<int>(type: "int", nullable: false),
|
||||
@@ -687,15 +706,15 @@ namespace PyroFetes.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ShowMaterial", x => new { x.ShowId, x.MaterialId });
|
||||
table.PrimaryKey("PK_ShowMaterials", x => new { x.ShowId, x.MaterialId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ShowMaterial_Materials_MaterialId",
|
||||
name: "FK_ShowMaterials_Materials_MaterialId",
|
||||
column: x => x.MaterialId,
|
||||
principalTable: "Materials",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ShowMaterial_Shows_ShowId",
|
||||
name: "FK_ShowMaterials_Shows_ShowId",
|
||||
column: x => x.ShowId,
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
@@ -708,14 +727,13 @@ namespace PyroFetes.Migrations
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
References = table.Column<int>(type: "int", nullable: false),
|
||||
Reference = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Duration = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||
Caliber = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||
ApprovalNumber = table.Column<int>(type: "int", nullable: false),
|
||||
Caliber = table.Column<int>(type: "int", nullable: false),
|
||||
ApprovalNumber = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||
Weight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||
Nec = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||
SellingPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||
Image = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Link = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||
MinimalQuantity = table.Column<int>(type: "int", nullable: false),
|
||||
@@ -769,7 +787,7 @@ namespace PyroFetes.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ContactServiceProvider",
|
||||
name: "ContactServiceProviders",
|
||||
columns: table => new
|
||||
{
|
||||
ContactId = table.Column<int>(type: "int", nullable: false),
|
||||
@@ -777,17 +795,17 @@ namespace PyroFetes.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ContactServiceProvider", x => new { x.ContactId, x.ServiceProviderId });
|
||||
table.PrimaryKey("PK_ContactServiceProviders", x => new { x.ContactId, x.ServiceProviderId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ContactServiceProvider_Contacts_ContactId",
|
||||
name: "FK_ContactServiceProviders_Contacts_ContactId",
|
||||
column: x => x.ContactId,
|
||||
principalTable: "Contacts",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ContactServiceProvider_Providers_ServiceProviderId",
|
||||
name: "FK_ContactServiceProviders_ServiceProviders_ServiceProviderId",
|
||||
column: x => x.ServiceProviderId,
|
||||
principalTable: "Providers",
|
||||
principalTable: "ServiceProviders",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
@@ -809,9 +827,9 @@ namespace PyroFetes.Migrations
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProviderContacts_Providers_ProviderId",
|
||||
name: "FK_ProviderContacts_ServiceProviders_ProviderId",
|
||||
column: x => x.ProviderId,
|
||||
principalTable: "Providers",
|
||||
principalTable: "ServiceProviders",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
@@ -959,7 +977,7 @@ namespace PyroFetes.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProductTimecode",
|
||||
name: "ProductTimecodes",
|
||||
columns: table => new
|
||||
{
|
||||
ProductId = table.Column<int>(type: "int", nullable: false),
|
||||
@@ -969,15 +987,15 @@ namespace PyroFetes.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProductTimecode", x => new { x.ProductId, x.ShowId });
|
||||
table.PrimaryKey("PK_ProductTimecodes", x => new { x.ProductId, x.ShowId });
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductTimecode_Products_ProductId",
|
||||
name: "FK_ProductTimecodes_Products_ProductId",
|
||||
column: x => x.ProductId,
|
||||
principalTable: "Products",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProductTimecode_Shows_ShowId",
|
||||
name: "FK_ProductTimecodes_Shows_ShowId",
|
||||
column: x => x.ShowId,
|
||||
principalTable: "Shows",
|
||||
principalColumn: "Id",
|
||||
@@ -1075,13 +1093,13 @@ namespace PyroFetes.Migrations
|
||||
column: "CustomerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ContactServiceProvider_ServiceProviderId",
|
||||
table: "ContactServiceProvider",
|
||||
name: "IX_ContactServiceProviders_ServiceProviderId",
|
||||
table: "ContactServiceProviders",
|
||||
column: "ServiceProviderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Contract_ServiceProviderId",
|
||||
table: "Contract",
|
||||
name: "IX_Contracts_ServiceProviderId",
|
||||
table: "Contracts",
|
||||
column: "ServiceProviderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
@@ -1105,8 +1123,8 @@ namespace PyroFetes.Migrations
|
||||
column: "WarehouseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_MaterialWarehouse_WarehouseId",
|
||||
table: "MaterialWarehouse",
|
||||
name: "IX_MaterialWarehouses_WarehouseId",
|
||||
table: "MaterialWarehouses",
|
||||
column: "WarehouseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
@@ -1155,8 +1173,8 @@ namespace PyroFetes.Migrations
|
||||
column: "ProductCategoryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProductTimecode_ShowId",
|
||||
table: "ProductTimecode",
|
||||
name: "IX_ProductTimecodes_ShowId",
|
||||
table: "ProductTimecodes",
|
||||
column: "ShowId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
@@ -1165,9 +1183,9 @@ namespace PyroFetes.Migrations
|
||||
column: "ProviderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Providers_ProviderTypeId",
|
||||
table: "Providers",
|
||||
column: "ProviderTypeId");
|
||||
name: "IX_PurchaseOrders_SupplierId",
|
||||
table: "PurchaseOrders",
|
||||
column: "SupplierId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PurchaseProducts_PurchaseOrderId",
|
||||
@@ -1185,8 +1203,13 @@ namespace PyroFetes.Migrations
|
||||
column: "CustomerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ShowMaterial_MaterialId",
|
||||
table: "ShowMaterial",
|
||||
name: "IX_ServiceProviders_ProviderTypeId",
|
||||
table: "ServiceProviders",
|
||||
column: "ProviderTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ShowMaterials_MaterialId",
|
||||
table: "ShowMaterials",
|
||||
column: "MaterialId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
@@ -1195,13 +1218,13 @@ namespace PyroFetes.Migrations
|
||||
column: "CityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ShowStaff_ShowId",
|
||||
table: "ShowStaff",
|
||||
name: "IX_ShowStaffs_ShowId",
|
||||
table: "ShowStaffs",
|
||||
column: "ShowId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ShowTruck_TruckId",
|
||||
table: "ShowTruck",
|
||||
name: "IX_ShowTrucks_TruckId",
|
||||
table: "ShowTrucks",
|
||||
column: "TruckId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
@@ -1245,16 +1268,16 @@ namespace PyroFetes.Migrations
|
||||
name: "Communications");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ContactServiceProvider");
|
||||
name: "ContactServiceProviders");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Contract");
|
||||
name: "Contracts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ExperienceLevels");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "MaterialWarehouse");
|
||||
name: "MaterialWarehouses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Prices");
|
||||
@@ -1269,7 +1292,7 @@ namespace PyroFetes.Migrations
|
||||
name: "ProductEffects");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProductTimecode");
|
||||
name: "ProductTimecodes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProviderContacts");
|
||||
@@ -1284,13 +1307,16 @@ namespace PyroFetes.Migrations
|
||||
name: "Settings");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ShowMaterial");
|
||||
name: "ShowMaterials");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ShowStaff");
|
||||
name: "ShowServiceProviders");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ShowTruck");
|
||||
name: "ShowStaffs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ShowTrucks");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SoundTimecodes");
|
||||
@@ -1310,9 +1336,6 @@ namespace PyroFetes.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "WarehouseProducts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Suppliers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Colors");
|
||||
|
||||
@@ -1323,7 +1346,7 @@ namespace PyroFetes.Migrations
|
||||
name: "Effects");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Providers");
|
||||
name: "ServiceProviders");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PurchaseOrders");
|
||||
@@ -1365,7 +1388,10 @@ namespace PyroFetes.Migrations
|
||||
name: "ProviderTypes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "City");
|
||||
name: "Suppliers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Cities");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SoundCategories");
|
||||
@@ -695,8 +695,13 @@ namespace PyroFetes.Migrations
|
||||
.HasMaxLength(300)
|
||||
.HasColumnType("nvarchar(300)");
|
||||
|
||||
b.Property<int>("SupplierId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SupplierId");
|
||||
|
||||
b.ToTable("PurchaseOrders");
|
||||
});
|
||||
|
||||
@@ -1545,6 +1550,17 @@ namespace PyroFetes.Migrations
|
||||
b.Navigation("Provider");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PyroFetes.Models.PurchaseOrder", b =>
|
||||
{
|
||||
b.HasOne("PyroFetes.Models.Supplier", "Supplier")
|
||||
.WithMany()
|
||||
.HasForeignKey("SupplierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Supplier");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PyroFetes.Models.PurchaseProduct", b =>
|
||||
{
|
||||
b.HasOne("PyroFetes.Models.Product", "Product")
|
||||
|
||||
Reference in New Issue
Block a user