2018-05-15 01:34:37 +02:00
|
|
|
|
using System;
|
2018-01-27 06:20:57 +01:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
2021-05-13 14:04:18 +02:00
|
|
|
|
namespace Sieve.Sample.Migrations
|
2018-01-27 06:20:57 +01:00
|
|
|
|
{
|
2021-05-13 14:04:18 +02:00
|
|
|
|
public partial class Initial : Migration
|
2018-01-27 06:20:57 +01:00
|
|
|
|
{
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "Posts",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
Id = table.Column<int>(nullable: false)
|
2021-05-13 14:04:18 +02:00
|
|
|
|
.Annotation("Sqlite:Autoincrement", true),
|
|
|
|
|
Title = table.Column<string>(nullable: true),
|
|
|
|
|
LikeCount = table.Column<int>(nullable: false),
|
2018-01-27 06:20:57 +01:00
|
|
|
|
CommentCount = table.Column<int>(nullable: false),
|
|
|
|
|
DateCreated = table.Column<DateTimeOffset>(nullable: false),
|
2021-05-13 14:04:18 +02:00
|
|
|
|
DateLastViewed = table.Column<DateTime>(type: "datetime", nullable: false),
|
2018-05-28 03:32:21 +02:00
|
|
|
|
CategoryId = table.Column<int>(nullable: true)
|
2018-01-27 06:20:57 +01:00
|
|
|
|
},
|
2021-05-13 14:04:18 +02:00
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_Posts", x => x.Id);
|
|
|
|
|
});
|
2018-01-27 06:20:57 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "Posts");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|