Miese Corona Zeiten push für Lenhardt
This commit is contained in:
@@ -4,50 +4,50 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class House : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "HouseId",
|
||||
table: "Users",
|
||||
nullable: true);
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "HouseId",
|
||||
table: "Users",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Houses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Type = table.Column<string>(nullable: true),
|
||||
Price = table.Column<int>(nullable: false),
|
||||
UserId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Houses", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Houses_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Houses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Type = table.Column<string>(nullable: true),
|
||||
Price = table.Column<int>(nullable: false),
|
||||
UserId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Houses", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Houses_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Houses_UserId",
|
||||
table: "Houses",
|
||||
column: "UserId",
|
||||
unique: true);
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Houses_UserId",
|
||||
table: "Houses",
|
||||
column: "UserId",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HouseId",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HouseId",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user