autobus-api_old/AutobusApi.Infrastructure/Data/Migrations/20231201120217_AddDepartureAndArrivalAddressIdsToTicket.cs

45 lines
1.3 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AutobusApi.Infrastructure.Data.Migrations
{
/// <inheritdoc />
public partial class AddDepartureAndArrivalAddressIdsToTicket : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "ArrivalAddressId",
schema: "domain",
table: "tickets",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "DepartureAddressId",
schema: "domain",
table: "tickets",
type: "integer",
nullable: false,
defaultValue: 0);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ArrivalAddressId",
schema: "domain",
table: "tickets");
migrationBuilder.DropColumn(
name: "DepartureAddressId",
schema: "domain",
table: "tickets");
}
}
}