init
This commit is contained in:
46
SecureBank.Database/Migrations/20240115084527_Migration3.cs
Normal file
46
SecureBank.Database/Migrations/20240115084527_Migration3.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SecureBank.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Migration3 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AccountLoginRequests",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
AccountPasswordId = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
ValidTo = table.Column<DateTime>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AccountLoginRequests", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_AccountLoginRequests_AccountPasswords_AccountPasswordId",
|
||||
column: x => x.AccountPasswordId,
|
||||
principalTable: "AccountPasswords",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AccountLoginRequests_AccountPasswordId",
|
||||
table: "AccountLoginRequests",
|
||||
column: "AccountPasswordId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AccountLoginRequests");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user