69 lines
2.2 KiB
C#
69 lines
2.2 KiB
C#
using line_gestao_api.Data;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace line_gestao_api.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
[Migration("20260227120000_AddVigenciaAutoRenewal")]
|
|
public partial class AddVigenciaAutoRenewal : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "AutoRenewConfiguredAt",
|
|
table: "VigenciaLines",
|
|
type: "timestamp with time zone",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "AutoRenewReferenceEndDate",
|
|
table: "VigenciaLines",
|
|
type: "timestamp with time zone",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "AutoRenewYears",
|
|
table: "VigenciaLines",
|
|
type: "integer",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "LastAutoRenewedAt",
|
|
table: "VigenciaLines",
|
|
type: "timestamp with time zone",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_VigenciaLines_AutoRenewReferenceEndDate",
|
|
table: "VigenciaLines",
|
|
column: "AutoRenewReferenceEndDate");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_VigenciaLines_AutoRenewReferenceEndDate",
|
|
table: "VigenciaLines");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "AutoRenewConfiguredAt",
|
|
table: "VigenciaLines");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "AutoRenewReferenceEndDate",
|
|
table: "VigenciaLines");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "AutoRenewYears",
|
|
table: "VigenciaLines");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LastAutoRenewedAt",
|
|
table: "VigenciaLines");
|
|
}
|
|
}
|
|
}
|