Replace ReactiveUI

This commit is contained in:
Jöran Malek 2024-05-02 21:44:13 +02:00
parent 43b4d50e43
commit 5584ab4ec8
41 changed files with 472 additions and 1013 deletions

View file

@ -0,0 +1,92 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace InkForge.Sqlite.Migrations
{
/// <inheritdoc />
public partial class _20240401_Initial : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Blobs",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Value = table.Column<byte[]>(type: "BLOB", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Blobs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Metadata",
columns: table => new
{
Id = table.Column<string>(type: "TEXT", nullable: false),
Value = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Metadata", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Notes",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false),
Value_Created = table.Column<DateTimeOffset>(type: "TEXT", nullable: false),
Value_ContentId = table.Column<int>(type: "INTEGER", nullable: false),
Value_Deleted = table.Column<DateTimeOffset>(type: "TEXT", nullable: true),
Value_Name = table.Column<string>(type: "TEXT", nullable: false),
Value_Updated = table.Column<DateTimeOffset>(type: "TEXT", nullable: false),
ParentId = table.Column<int>(type: "INTEGER", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Notes", x => x.Id);
table.ForeignKey(
name: "FK_Notes_Blobs_Value_ContentId",
column: x => x.Value_ContentId,
principalTable: "Blobs",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Notes_Notes_ParentId",
column: x => x.ParentId,
principalTable: "Notes",
principalColumn: "Id");
});
migrationBuilder.CreateIndex(
name: "IX_Notes_ParentId",
table: "Notes",
column: "ParentId");
migrationBuilder.CreateIndex(
name: "IX_Notes_Value_ContentId",
table: "Notes",
column: "Value_ContentId",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Metadata");
migrationBuilder.DropTable(
name: "Notes");
migrationBuilder.DropTable(
name: "Blobs");
}
}
}