using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ForumDatabase.Migrations
{
///
public partial class Init2 : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "CategoryId",
table: "Topics",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn(
name: "UserId",
table: "Topics",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn(
name: "TopicId",
table: "Messages",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn(
name: "UserId",
table: "Messages",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn(
name: "UserId",
table: "Categories",
type: "integer",
nullable: false,
defaultValue: 0);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CategoryId",
table: "Topics");
migrationBuilder.DropColumn(
name: "UserId",
table: "Topics");
migrationBuilder.DropColumn(
name: "TopicId",
table: "Messages");
migrationBuilder.DropColumn(
name: "UserId",
table: "Messages");
migrationBuilder.DropColumn(
name: "UserId",
table: "Categories");
}
}
}