using Microsoft.EntityFrameworkCore.Migrations; namespace Content.Server.Database.Migrations { public partial class InitialCreate : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( "Preferences", table => new { PrefsId = table.Column() .Annotation("Sqlite:Autoincrement", true), Username = table.Column(), SelectedCharacterSlot = table.Column() }, constraints: table => { table.PrimaryKey("PK_Preferences", x => x.PrefsId); }); migrationBuilder.CreateTable( "HumanoidProfile", table => new { HumanoidProfileId = table.Column() .Annotation("Sqlite:Autoincrement", true), Slot = table.Column(), SlotName = table.Column(), CharacterName = table.Column(), Age = table.Column(), Sex = table.Column(), HairName = table.Column(), HairColor = table.Column(), FacialHairName = table.Column(), FacialHairColor = table.Column(), EyeColor = table.Column(), SkinColor = table.Column(), PrefsId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_HumanoidProfile", x => x.HumanoidProfileId); table.ForeignKey( "FK_HumanoidProfile_Preferences_PrefsId", x => x.PrefsId, "Preferences", "PrefsId", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( "IX_HumanoidProfile_PrefsId", "HumanoidProfile", "PrefsId"); migrationBuilder.CreateIndex( "IX_Preferences_Username", "Preferences", "Username", unique: true); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( "HumanoidProfile"); migrationBuilder.DropTable( "Preferences"); } } }