using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Flypaper.Storage.Migrations { /// public partial class AddResearch : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "CanWrite", table: "McpTokens", type: "INTEGER", nullable: false, defaultValue: false); migrationBuilder.CreateTable( name: "Ideas", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), Title = table.Column(type: "TEXT", maxLength: 200, nullable: false), Effort = table.Column(type: "TEXT", maxLength: 16, nullable: false), Efficiency = table.Column(type: "TEXT", maxLength: 16, nullable: false), Rationale = table.Column(type: "TEXT", maxLength: 20000, nullable: false), Status = table.Column(type: "TEXT", maxLength: 16, nullable: false), ImplementedOn = table.Column(type: "TEXT", nullable: true), Commit = table.Column(type: "TEXT", maxLength: 64, nullable: true), CreatedAt = table.Column(type: "TEXT", nullable: false), UpdatedAt = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Ideas", x => x.Id); }); migrationBuilder.CreateTable( name: "LabEntries", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), Date = table.Column(type: "TEXT", nullable: false), Title = table.Column(type: "TEXT", maxLength: 200, nullable: false), Kind = table.Column(type: "TEXT", maxLength: 16, nullable: false), Text = table.Column(type: "TEXT", maxLength: 20000, nullable: false), Commit = table.Column(type: "TEXT", maxLength: 64, nullable: true), Strategies = table.Column(type: "TEXT", maxLength: 512, nullable: true), CreatedAt = table.Column(type: "TEXT", nullable: false), UpdatedAt = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_LabEntries", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_LabEntries_Date", table: "LabEntries", column: "Date"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Ideas"); migrationBuilder.DropTable( name: "LabEntries"); migrationBuilder.DropColumn( name: "CanWrite", table: "McpTokens"); } } }