42 lines
2.8 KiB
C#
42 lines
2.8 KiB
C#
namespace Weee.Migrations
|
|
{
|
|
using System;
|
|
using System.Data.Entity.Migrations;
|
|
|
|
public partial class move_sheet : DbMigration
|
|
{
|
|
public override void Up()
|
|
{
|
|
|
|
DropForeignKey("dbo.ProductLCAFabSurveyForm_GasolineEquipments", "LCAID", "dbo.ProductLCA");
|
|
DropForeignKey("dbo.ProductLCAFabSurveyForm_Kitchens", "LCAID", "dbo.ProductLCA");
|
|
DropForeignKey("dbo.ProductLCAFabSurveyForm_WorkHours", "LCAID", "dbo.ProductLCA");
|
|
DropForeignKey("dbo.ProductLCAFabSurveyForm_FireEquipments", "LCAID", "dbo.ProductLCA");
|
|
RenameTable(name: "dbo.ProductLCAFabSurveyForm_FireEquipments", newName: "LCACommonSurveyForm_FireEquipments");
|
|
RenameTable(name: "dbo.ProductLCAFabSurveyForm_GasolineEquipments", newName: "LCACommonSurveyForm_GasolineEquipments");
|
|
RenameTable(name: "dbo.ProductLCAFabSurveyForm_Kitchens", newName: "LCACommonSurveyForm_Kitchens");
|
|
RenameTable(name: "dbo.ProductLCAFabSurveyForm_WorkHours", newName: "LCACommonSurveyForm_WorkHours");
|
|
AddForeignKey("dbo.LCACommonSurveyForm_FireEquipments", "LCAID", "dbo.LCAs", "ID", cascadeDelete: true);
|
|
AddForeignKey("dbo.LCACommonSurveyForm_GasolineEquipments", "LCAID", "dbo.LCAs", "ID", cascadeDelete: true);
|
|
AddForeignKey("dbo.LCACommonSurveyForm_Kitchens", "LCAID", "dbo.LCAs", "ID", cascadeDelete: true);
|
|
AddForeignKey("dbo.LCACommonSurveyForm_WorkHours", "LCAID", "dbo.LCAs", "ID", cascadeDelete: true);
|
|
}
|
|
|
|
public override void Down()
|
|
{
|
|
DropForeignKey("dbo.LCACommonSurveyForm_WorkHours", "LCAID", "dbo.LCAs");
|
|
DropForeignKey("dbo.LCACommonSurveyForm_Kitchens", "LCAID", "dbo.LCAs");
|
|
DropForeignKey("dbo.LCACommonSurveyForm_GasolineEquipments", "LCAID", "dbo.LCAs");
|
|
DropForeignKey("dbo.LCACommonSurveyForm_FireEquipments", "LCAID", "dbo.LCAs");
|
|
AddForeignKey("dbo.ProductLCAFabSurveyForm_WorkHours", "LCAID", "dbo.ProductLCA", "ID");
|
|
AddForeignKey("dbo.ProductLCAFabSurveyForm_Kitchens", "LCAID", "dbo.ProductLCA", "ID");
|
|
AddForeignKey("dbo.ProductLCAFabSurveyForm_GasolineEquipments", "LCAID", "dbo.ProductLCA", "ID");
|
|
AddForeignKey("dbo.ProductLCAFabSurveyForm_FireEquipments", "LCAID", "dbo.ProductLCA", "ID");
|
|
RenameTable(name: "dbo.LCACommonSurveyForm_WorkHours", newName: "ProductLCAFabSurveyForm_WorkHours");
|
|
RenameTable(name: "dbo.LCACommonSurveyForm_Kitchens", newName: "ProductLCAFabSurveyForm_Kitchens");
|
|
RenameTable(name: "dbo.LCACommonSurveyForm_GasolineEquipments", newName: "ProductLCAFabSurveyForm_GasolineEquipments");
|
|
RenameTable(name: "dbo.LCACommonSurveyForm_FireEquipments", newName: "ProductLCAFabSurveyForm_FireEquipments");
|
|
}
|
|
}
|
|
}
|