oh hell no
This commit is contained in:
95
Modelo/.Migrations_old/20240907203054_funcatodo.cs
Normal file
95
Modelo/.Migrations_old/20240907203054_funcatodo.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Modelo.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class funcatodo : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_DetallesFacturas_Producto_IdProducto",
|
||||
table: "DetallesFacturas");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdProducto",
|
||||
table: "Lotes");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdProducto",
|
||||
table: "DetallePresupuestos");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdProducto",
|
||||
table: "DetalleOrdenDeCompras");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "IdProducto",
|
||||
table: "DetallesFacturas",
|
||||
newName: "ProductoId");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_DetallesFacturas_IdProducto",
|
||||
table: "DetallesFacturas",
|
||||
newName: "IX_DetallesFacturas_ProductoId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DetallesFacturas_Producto_ProductoId",
|
||||
table: "DetallesFacturas",
|
||||
column: "ProductoId",
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_DetallesFacturas_Producto_ProductoId",
|
||||
table: "DetallesFacturas");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ProductoId",
|
||||
table: "DetallesFacturas",
|
||||
newName: "IdProducto");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_DetallesFacturas_ProductoId",
|
||||
table: "DetallesFacturas",
|
||||
newName: "IX_DetallesFacturas_IdProducto");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdProducto",
|
||||
table: "Lotes",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdProducto",
|
||||
table: "DetallePresupuestos",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdProducto",
|
||||
table: "DetalleOrdenDeCompras",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_DetallesFacturas_Producto_IdProducto",
|
||||
table: "DetallesFacturas",
|
||||
column: "IdProducto",
|
||||
principalTable: "Producto",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user