mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-25 14:53:27 +01:00
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace SieveTests.Migrations
|
|||
|
{
|
|||
|
public partial class Init : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.CreateTable(
|
|||
|
name: "Posts",
|
|||
|
columns: table => new
|
|||
|
{
|
|||
|
Id = table.Column<int>(nullable: false)
|
|||
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
|
|||
|
CommentCount = table.Column<int>(nullable: false),
|
|||
|
DateCreated = table.Column<DateTimeOffset>(nullable: false),
|
|||
|
LikeCount = table.Column<int>(nullable: false),
|
|||
|
Title = table.Column<string>(nullable: true)
|
|||
|
},
|
|||
|
constraints: table =>
|
|||
|
{
|
|||
|
table.PrimaryKey("PK_Posts", x => x.Id);
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropTable(
|
|||
|
name: "Posts");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|