Files
parr_api/PARR.DAL/Migrations/20260203055426_tblRenameFields.cs

53 lines
1.8 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class tblRenameFields : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "TimeOffset",
schema: "schedule",
table: "ResponseAreaTimeOffsets",
newName: "EsppValue");
migrationBuilder.RenameColumn(
name: "IsWorkGroupTimezone",
schema: "job",
table: "Groups",
newName: "IsResponseAreaTimezone");
migrationBuilder.InsertData(
table: "Settings",
columns: new[] { "Name", "Description", "Value" },
values: new object[] { "DefaultResponseAreaToTimeOffset", "Зона ответственности для получения тайм зоны по умолчанию для расписаний", "17-МСК" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Settings",
keyColumn: "Name",
keyValue: "DefaultResponseAreaToTimeOffset");
migrationBuilder.RenameColumn(
name: "EsppValue",
schema: "schedule",
table: "ResponseAreaTimeOffsets",
newName: "TimeOffset");
migrationBuilder.RenameColumn(
name: "IsResponseAreaTimezone",
schema: "job",
table: "Groups",
newName: "IsWorkGroupTimezone");
}
}
}