| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace Infrastructure.Persistence.Migrations
- {
- /// <inheritdoc />
- public partial class AddNiceAuthSession : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "NiceAuthSession",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- DeveloperID = table.Column<int>(type: "int", nullable: false),
- SessionToken = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false),
- RequestNo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
- TransactionID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- WebTransactionID = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
- Ticket = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
- Iterators = table.Column<int>(type: "int", nullable: false),
- Status = table.Column<int>(type: "int", nullable: false),
- FailReason = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- ExpiresAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- CompletedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_NiceAuthSession", x => x.ID);
- table.ForeignKey(
- name: "FK_NiceAuthSession_Developer_DeveloperID",
- column: x => x.DeveloperID,
- principalTable: "Developer",
- principalColumn: "ID",
- onDelete: ReferentialAction.Cascade);
- },
- comment: "NICE 통합인증 1회 진행 세션");
- migrationBuilder.CreateIndex(
- name: "IX_NiceAuthSession_DeveloperID_CreatedAt",
- table: "NiceAuthSession",
- columns: new[] { "DeveloperID", "CreatedAt" });
- migrationBuilder.CreateIndex(
- name: "IX_NiceAuthSession_SessionToken",
- table: "NiceAuthSession",
- column: "SessionToken",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_NiceAuthSession_Status",
- table: "NiceAuthSession",
- column: "Status");
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "NiceAuthSession");
- }
- }
- }
|