2020-09-15 12:31:52 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
|
|
namespace snootalogue.Migrations
|
|
|
|
|
{
|
|
|
|
|
public partial class InitialCreate : Migration
|
|
|
|
|
{
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "Document",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
ID = table.Column<int>(nullable: false)
|
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
Filename = table.Column<string>(nullable: true),
|
|
|
|
|
Hash = table.Column<string>(nullable: true),
|
|
|
|
|
Size = table.Column<long>(nullable: false),
|
|
|
|
|
Title = table.Column<string>(nullable: true),
|
2020-09-17 13:37:11 +00:00
|
|
|
|
Authors = table.Column<string>(type: "jsonb", nullable: true),
|
2020-09-15 12:31:52 +00:00
|
|
|
|
Category = table.Column<string>(nullable: true),
|
|
|
|
|
DateAdded = table.Column<DateTime>(nullable: false),
|
2020-09-17 13:37:11 +00:00
|
|
|
|
Tags = table.Column<string>(type: "jsonb", nullable: true),
|
|
|
|
|
Read = table.Column<bool>(nullable: false),
|
|
|
|
|
Notes = table.Column<string>(nullable: true)
|
2020-09-15 12:31:52 +00:00
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_Document", x => x.ID);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "Document");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|