94 lines
3.2 KiB
C#
94 lines
3.2 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace AAIntegration.SimmonsBank.API.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class ModifiedTranscationEntity : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_InnerTransactions_InnerTransactions_InnerTransactionId",
|
|
table: "InnerTransactions");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_InnerTransactions_InnerTransactionId",
|
|
table: "InnerTransactions");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CreatedOn",
|
|
table: "InnerTransactions");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ExternalId",
|
|
table: "InnerTransactions");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "InnerTransactionId",
|
|
table: "InnerTransactions");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "UpdatedOn",
|
|
table: "InnerTransactions");
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "Date",
|
|
table: "OuterTransactions",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Date",
|
|
table: "OuterTransactions");
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "CreatedOn",
|
|
table: "InnerTransactions",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "ExternalId",
|
|
table: "InnerTransactions",
|
|
type: "text",
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "InnerTransactionId",
|
|
table: "InnerTransactions",
|
|
type: "integer",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "UpdatedOn",
|
|
table: "InnerTransactions",
|
|
type: "timestamp with time zone",
|
|
nullable: false,
|
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_InnerTransactions_InnerTransactionId",
|
|
table: "InnerTransactions",
|
|
column: "InnerTransactionId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_InnerTransactions_InnerTransactions_InnerTransactionId",
|
|
table: "InnerTransactions",
|
|
column: "InnerTransactionId",
|
|
principalTable: "InnerTransactions",
|
|
principalColumn: "Id");
|
|
}
|
|
}
|
|
}
|