using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ClaudeDo.Data.Migrations
{
///
public partial class WeeklyReport : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "report_excluded_paths",
table: "app_settings",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn(
name: "standup_weekday",
table: "app_settings",
type: "INTEGER",
nullable: false,
defaultValue: 3);
migrationBuilder.CreateTable(
name: "daily_notes",
columns: table => new
{
id = table.Column(type: "TEXT", nullable: false),
note_date = table.Column(type: "TEXT", nullable: false),
text = table.Column(type: "TEXT", nullable: false),
sort_order = table.Column(type: "INTEGER", nullable: false),
created_at = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_daily_notes", x => x.id);
});
migrationBuilder.CreateTable(
name: "week_reports",
columns: table => new
{
id = table.Column(type: "TEXT", nullable: false),
start_date = table.Column(type: "TEXT", nullable: false),
end_date = table.Column(type: "TEXT", nullable: false),
markdown = table.Column(type: "TEXT", nullable: false),
generated_at = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_week_reports", x => x.id);
});
migrationBuilder.UpdateData(
table: "app_settings",
keyColumn: "id",
keyValue: 1,
columns: new[] { "report_excluded_paths", "standup_weekday" },
values: new object[] { null, 3 });
migrationBuilder.CreateIndex(
name: "IX_daily_notes_note_date",
table: "daily_notes",
column: "note_date");
migrationBuilder.CreateIndex(
name: "IX_week_reports_start_date_end_date",
table: "week_reports",
columns: new[] { "start_date", "end_date" },
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "daily_notes");
migrationBuilder.DropTable(
name: "week_reports");
migrationBuilder.DropColumn(
name: "report_excluded_paths",
table: "app_settings");
migrationBuilder.DropColumn(
name: "standup_weekday",
table: "app_settings");
}
}
}