using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace backend.Migrations
{
///
public partial class AddPairingCodes : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PairingCodes",
columns: table => new
{
Code = table.Column(type: "TEXT", nullable: false),
OwnerUserId = table.Column(type: "TEXT", nullable: false),
DeviceName = table.Column(type: "TEXT", nullable: false),
ExpiresAt = table.Column(type: "TEXT", nullable: false),
ConsumedAt = table.Column(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PairingCodes", x => x.Code);
});
migrationBuilder.CreateIndex(
name: "IX_PairingCodes_ExpiresAt",
table: "PairingCodes",
column: "ExpiresAt");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PairingCodes");
}
}
}