freetubesync/FreeTubeSync/Migrations/20250731174538_AddChangeLogTracking.cs
Mario Steele 57b6f24e35 Updated Migrations
Added Migration to add Change Log Tracking.
2025-07-31 13:00:51 -05:00

37 lines
1.2 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FreeTubeSync.Migrations
{
/// <inheritdoc />
public partial class AddChangeLogTracking : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ChangeLogs",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
TableName = table.Column<string>(type: "TEXT", nullable: false),
ChangeType = table.Column<string>(type: "TEXT", nullable: false),
ChangeTime = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ChangeLogs", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ChangeLogs");
}
}
}