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