1
0

20201006223000_SelectedCharacterSlotFk.cs 689 B

12345678910111213141516171819
  1. using Microsoft.EntityFrameworkCore.Infrastructure;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. namespace Content.Server.Database.Migrations.Postgres
  4. {
  5. [DbContext(typeof(PostgresServerDbContext))]
  6. [Migration("20201006223000_SelectedCharacterSlotFk")]
  7. public class SelectedCharacterSlotFk : Migration
  8. {
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.Sql(@"ALTER TABLE preference
  12. ADD CONSTRAINT ""FK_preference_profile_selected_character_slot_preference_id""
  13. FOREIGN KEY (selected_character_slot, preference_id)
  14. REFERENCES profile (slot, preference_id)
  15. DEFERRABLE INITIALLY DEFERRED;");
  16. }
  17. }
  18. }