using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DorkNet.Server.Migrations
{
///
public partial class AddMessageRoomId : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "IsCommunityTeam",
table: "Players",
type: "INTEGER",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn(
name: "RoomId",
table: "Messages",
type: "INTEGER",
nullable: true);
migrationBuilder.AddColumn(
name: "Type",
table: "Messages",
type: "INTEGER",
nullable: false,
defaultValue: 30);
migrationBuilder.CreateTable(
name: "ServerSettings",
columns: table => new
{
Id = table.Column(type: "INTEGER", nullable: false),
SignupsDisabled = table.Column(type: "INTEGER", nullable: false),
UpdatedAt = table.Column(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ServerSettings", x => x.Id);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ServerSettings");
migrationBuilder.DropColumn(
name: "IsCommunityTeam",
table: "Players");
migrationBuilder.DropColumn(
name: "RoomId",
table: "Messages");
migrationBuilder.DropColumn(
name: "Type",
table: "Messages");
}
}
}