rename game_id to enemy_id, add summon_id

This commit is contained in:
Justin Edmund 2026-01-06 02:43:24 -08:00
parent cd14c923ac
commit 31045324f7
5 changed files with 15 additions and 4 deletions

View file

@ -13,7 +13,7 @@ module Api
}
end
fields :slug, :level, :element, :game_id
fields :slug, :level, :element, :enemy_id, :summon_id
association :group, blueprint: RaidGroupBlueprint, view: :flat
end

View file

@ -74,7 +74,7 @@ module Api
end
def raid_params
params.require(:raid).permit(:name_en, :name_jp, :level, :element, :slug, :group_id, :game_id)
params.require(:raid).permit(:name_en, :name_jp, :level, :element, :slug, :group_id, :enemy_id, :summon_id)
end
def apply_filters(scope)

View file

@ -0,0 +1,5 @@
class RenameGameIdToEnemyIdOnRaids < ActiveRecord::Migration[8.0]
def change
rename_column :raids, :game_id, :enemy_id
end
end

View file

@ -0,0 +1,5 @@
class AddSummonIdToRaids < ActiveRecord::Migration[8.0]
def change
add_column :raids, :summon_id, :bigint
end
end

View file

@ -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_06_102045) do
ActiveRecord::Schema[8.0].define(version: 2026_01_06_104115) do
# These are extensions that must be enabled in order to support this database
enable_extension "btree_gin"
enable_extension "pg_catalog.plpgsql"
@ -755,7 +755,8 @@ ActiveRecord::Schema[8.0].define(version: 2026_01_06_102045) do
t.integer "element"
t.string "slug"
t.uuid "group_id"
t.integer "game_id"
t.integer "enemy_id"
t.bigint "summon_id"
end
create_table "skill_effects", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|