Snootalogue/Migrations/20200917125618_InitialCreate.cs

40 lines
1.5 KiB
C#
Raw Normal View History

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),
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),
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");
}
}
}