Snootalogue/Migrations/20200920033715_InitialCreat...

39 lines
1.4 KiB
C#

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<string>(nullable: false),
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),
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)
},
constraints: table =>
{
table.PrimaryKey("PK_Document", x => x.ID);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Document");
}
}
}