53 lines
1.8 KiB
C#
53 lines
1.8 KiB
C#
|
|
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");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|