mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-20 13:50:46 +00:00
- Introduced a lab workstation popup in the game interface for accessing lab sheets via an iframe. - Implemented JavaScript functions to create, open, and close the lab workstation, enhancing user interaction. - Updated CSS styles for the lab workstation popup to ensure a seamless visual experience. - Enhanced interaction handling to allow players to open lab workstations from inventory items. - Added new scenario files for the Linux Fundamentals and Security Lab, including detailed instructions and objectives for players. - Updated scenario schema to include the new lab workstation type, ensuring proper integration into the game mechanics.
23 lines
721 B
Ruby
23 lines
721 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Remove unique constraint on games to allow multiple games per player+mission
|
|
# This is needed for VM/CTF flag integration where each VM set gets its own game instance
|
|
class RemoveUniqueGameConstraint < ActiveRecord::Migration[7.0]
|
|
def change
|
|
# Remove the unique index
|
|
remove_index :break_escape_games,
|
|
name: 'index_games_on_player_and_mission',
|
|
if_exists: true
|
|
|
|
# Add non-unique index for performance
|
|
# This maintains query performance without enforcing uniqueness
|
|
add_index :break_escape_games,
|
|
[:player_type, :player_id, :mission_id],
|
|
name: 'index_games_on_player_and_mission_non_unique'
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|