using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace watcher_monitoring.Migrations { /// public partial class AddApiKeys : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ApiKeys", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), Key = table.Column(type: "TEXT", maxLength: 64, nullable: false), Name = table.Column(type: "TEXT", maxLength: 100, nullable: false), Description = table.Column(type: "TEXT", nullable: true), CreatedAt = table.Column(type: "TEXT", nullable: false), ExpiresAt = table.Column(type: "TEXT", nullable: true), LastUsedAt = table.Column(type: "TEXT", nullable: true), IsActive = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ApiKeys", x => x.Id); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ApiKeys"); } } }