drinkrate/DrinkRateAPI/Migrations/20250811190023_FixProductCompanyTableBinding.cs
martinshoob b7677bc139 Create product-company table coupling, fix one-to-one relationship
Introduce a new entity to couple product and company tables.
2025-08-11 21:03:28 +02:00

30 lines
852 B
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DrinkRateAPI.Migrations
{
/// <inheritdoc />
public partial class FixProductCompanyTableBinding : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ProductTableId",
table: "CompanyTable");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "ProductTableId",
table: "CompanyTable",
type: "uuid",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
}
}
}