* add weapon_stat_modifiers table for ax skills and befoulments * add fk columns for ax modifiers and befoulments, replace has_ax_skills with augment_type * update models for weapon_stat_modifier fks and befoulments * update blueprints for weapon_stat_modifier serialization * update import service for weapon_stat_modifier fks and befoulments * add weapon_stat_modifiers controller and update params for fks * update tests and factories for weapon_stat_modifier fks * fix remaining has_ax_skills and ax_modifier references * add ax_modifier and befoulment_modifier to eager loading * fix ax modifier column naming and migration approach * add game_skill_ids for befoulment modifiers
24 lines
673 B
Ruby
24 lines
673 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateWeaponStatModifiers < ActiveRecord::Migration[8.0]
|
|
def change
|
|
create_table :weapon_stat_modifiers do |t|
|
|
t.string :slug, null: false
|
|
t.string :name_en, null: false
|
|
t.string :name_jp
|
|
t.string :category, null: false
|
|
t.string :stat
|
|
t.integer :polarity, default: 1, null: false
|
|
t.string :suffix
|
|
t.float :base_min
|
|
t.float :base_max
|
|
t.integer :game_skill_id
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :weapon_stat_modifiers, :slug, unique: true
|
|
add_index :weapon_stat_modifiers, :game_skill_id, unique: true
|
|
add_index :weapon_stat_modifiers, :category
|
|
end
|
|
end
|