55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace PARR.DAL.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class tblTemplateRenamePendingAddDateModifiedRemUniqueIndex : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_TemplateRenamePendings_OldName",
|
|
schema: "template",
|
|
table: "TemplateRenamePendings");
|
|
|
|
migrationBuilder.AddColumn<DateTimeOffset>(
|
|
name: "DateModified",
|
|
schema: "template",
|
|
table: "TemplateRenamePendings",
|
|
type: "timestamp with time zone",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_TemplateRenamePendings_OldName",
|
|
schema: "template",
|
|
table: "TemplateRenamePendings",
|
|
column: "OldName");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_TemplateRenamePendings_OldName",
|
|
schema: "template",
|
|
table: "TemplateRenamePendings");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DateModified",
|
|
schema: "template",
|
|
table: "TemplateRenamePendings");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_TemplateRenamePendings_OldName",
|
|
schema: "template",
|
|
table: "TemplateRenamePendings",
|
|
column: "OldName",
|
|
unique: true);
|
|
}
|
|
}
|
|
}
|