using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Flypaper.Storage.Migrations
{
///
public partial class AddMcpTokens : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "McpTokens",
columns: table => new
{
Id = table.Column(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Name = table.Column(type: "TEXT", maxLength: 100, nullable: false),
TokenHash = table.Column(type: "TEXT", maxLength: 64, nullable: false),
CreatedAt = table.Column(type: "TEXT", nullable: false),
LastUsedAt = table.Column(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_McpTokens", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_McpTokens_TokenHash",
table: "McpTokens",
column: "TokenHash",
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "McpTokens");
}
}
}