diff --git a/app/blueprints/api/v1/raid_blueprint.rb b/app/blueprints/api/v1/raid_blueprint.rb index afd190b..4257a97 100644 --- a/app/blueprints/api/v1/raid_blueprint.rb +++ b/app/blueprints/api/v1/raid_blueprint.rb @@ -13,7 +13,7 @@ module Api } end - fields :slug, :level, :element + fields :slug, :level, :element, :game_id association :group, blueprint: RaidGroupBlueprint, view: :flat end diff --git a/app/controllers/api/v1/raids_controller.rb b/app/controllers/api/v1/raids_controller.rb index 9619d7c..aa75036 100644 --- a/app/controllers/api/v1/raids_controller.rb +++ b/app/controllers/api/v1/raids_controller.rb @@ -74,7 +74,7 @@ module Api end def raid_params - params.require(:raid).permit(:name_en, :name_jp, :level, :element, :slug, :group_id) + params.require(:raid).permit(:name_en, :name_jp, :level, :element, :slug, :group_id, :game_id) end def apply_filters(scope) diff --git a/db/migrate/20260106102045_add_game_id_to_raids.rb b/db/migrate/20260106102045_add_game_id_to_raids.rb new file mode 100644 index 0000000..fc48b69 --- /dev/null +++ b/db/migrate/20260106102045_add_game_id_to_raids.rb @@ -0,0 +1,5 @@ +class AddGameIdToRaids < ActiveRecord::Migration[8.0] + def change + add_column :raids, :game_id, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index 7bcee92..7168c1b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.0].define(version: 2026_01_05_053753) do +ActiveRecord::Schema[8.0].define(version: 2026_01_06_102045) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" enable_extension "pg_catalog.plpgsql" @@ -755,6 +755,7 @@ ActiveRecord::Schema[8.0].define(version: 2026_01_05_053753) do t.integer "element" t.string "slug" t.uuid "group_id" + t.integer "game_id" end create_table "skill_effects", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|