using System; using Microsoft.EntityFrameworkCore.Migrations; namespace Sieve.Sample.Migrations { public partial class Initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Posts", columns: table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), Title = table.Column(nullable: true), LikeCount = table.Column(nullable: false), CommentCount = table.Column(nullable: false), DateCreated = table.Column(nullable: false), DateLastViewed = table.Column(type: "datetime", nullable: false), CategoryId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Posts", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Posts"); } } }