2025-11-21 15:27:54 +00:00
|
|
|
# This file is auto-generated from the current state of the database. Instead
|
|
|
|
|
# of editing this file, please use the migrations feature of Active Record to
|
|
|
|
|
# incrementally modify your database, and then regenerate this schema definition.
|
|
|
|
|
#
|
|
|
|
|
# This file is the source Rails uses to define your schema when running `bin/rails
|
|
|
|
|
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
|
|
|
|
# be faster and is potentially less error prone than running all of your
|
|
|
|
|
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
|
|
|
# migrations use external dependencies or application code.
|
|
|
|
|
#
|
|
|
|
|
# It's strongly recommended that you check this file into your version control system.
|
|
|
|
|
|
2026-02-12 14:35:14 +00:00
|
|
|
ActiveRecord::Schema[7.2].define(version: 2026_02_11_132735) do
|
2025-11-25 15:20:05 +00:00
|
|
|
create_table "break_escape_cyboks", force: :cascade do |t|
|
|
|
|
|
t.string "ka"
|
|
|
|
|
t.string "topic"
|
|
|
|
|
t.string "keywords"
|
|
|
|
|
t.string "cybokable_type"
|
|
|
|
|
t.integer "cybokable_id"
|
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
|
t.index ["cybokable_id"], name: "index_break_escape_cyboks_on_cybokable_id"
|
|
|
|
|
t.index ["cybokable_type", "cybokable_id"], name: "index_break_escape_cyboks_on_cybokable_type_and_cybokable_id"
|
|
|
|
|
t.index ["ka"], name: "index_break_escape_cyboks_on_ka"
|
|
|
|
|
end
|
|
|
|
|
|
2025-11-21 15:27:54 +00:00
|
|
|
create_table "break_escape_demo_users", force: :cascade do |t|
|
|
|
|
|
t.string "handle", null: false
|
|
|
|
|
t.string "role", default: "user", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.datetime "created_at", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
|
t.index ["handle"], name: "index_break_escape_demo_users_on_handle", unique: true
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
create_table "break_escape_games", force: :cascade do |t|
|
|
|
|
|
t.string "player_type", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.integer "player_id", null: false
|
|
|
|
|
t.integer "mission_id", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.json "scenario_data", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.json "player_state", default: "{\"currentRoom\":null,\"unlockedRooms\":[],\"unlockedObjects\":[],\"inventory\":[],\"encounteredNPCs\":[],\"globalVariables\":{},\"biometricSamples\":[],\"biometricUnlocks\":[],\"bluetoothDevices\":[],\"notes\":[],\"health\":100}", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.string "status", default: "in_progress", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.datetime "started_at"
|
|
|
|
|
t.datetime "completed_at"
|
|
|
|
|
t.integer "score", default: 0, null: false
|
|
|
|
|
t.datetime "created_at", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.datetime "updated_at", null: false
|
2025-11-26 00:50:32 +00:00
|
|
|
t.integer "objectives_completed", default: 0
|
|
|
|
|
t.integer "tasks_completed", default: 0
|
2025-11-21 15:27:54 +00:00
|
|
|
t.index ["mission_id"], name: "index_break_escape_games_on_mission_id"
|
2025-11-28 15:36:10 +00:00
|
|
|
t.index ["player_type", "player_id", "mission_id"], name: "index_games_on_player_and_mission_non_unique"
|
2025-11-21 15:27:54 +00:00
|
|
|
t.index ["player_type", "player_id"], name: "index_break_escape_games_on_player"
|
|
|
|
|
t.index ["status"], name: "index_break_escape_games_on_status"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
create_table "break_escape_missions", force: :cascade do |t|
|
|
|
|
|
t.string "name", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.string "display_name", null: false
|
|
|
|
|
t.text "description"
|
2025-11-21 15:27:54 +00:00
|
|
|
t.boolean "published", default: false, null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.integer "difficulty_level", default: 1, null: false
|
|
|
|
|
t.datetime "created_at", null: false
|
2025-11-21 15:27:54 +00:00
|
|
|
t.datetime "updated_at", null: false
|
2025-11-25 15:20:05 +00:00
|
|
|
t.string "secgen_scenario"
|
|
|
|
|
t.string "collection", default: "default"
|
|
|
|
|
t.index ["collection"], name: "index_break_escape_missions_on_collection"
|
2025-11-21 15:27:54 +00:00
|
|
|
t.index ["name"], name: "index_break_escape_missions_on_name", unique: true
|
|
|
|
|
t.index ["published"], name: "index_break_escape_missions_on_published"
|
|
|
|
|
end
|
|
|
|
|
|
2026-02-12 14:35:14 +00:00
|
|
|
create_table "break_escape_player_preferences", force: :cascade do |t|
|
|
|
|
|
t.string "player_type", null: false
|
|
|
|
|
t.integer "player_id", null: false
|
|
|
|
|
t.string "selected_sprite"
|
|
|
|
|
t.string "in_game_name", default: "Zero", null: false
|
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
|
t.index ["player_type", "player_id"], name: "index_break_escape_player_preferences_on_player"
|
|
|
|
|
t.index ["player_type", "player_id"], name: "index_player_prefs_on_player", unique: true
|
|
|
|
|
end
|
|
|
|
|
|
2025-11-21 15:27:54 +00:00
|
|
|
add_foreign_key "break_escape_games", "break_escape_missions", column: "mission_id"
|
|
|
|
|
end
|