hensei-api/db/migrate/20250302080212_create_skill_values.rb
Justin Edmund 7b88932e2c Add migrations for skill tables
These tables allow us to store data about:
* Character and Weapon charge attacks
* Character active and support skills
* Weapon skills
* Summon calls
* Summon auras and subauras
2025-03-02 16:24:24 -08:00

14 lines
524 B
Ruby

class CreateSkillValues < ActiveRecord::Migration[8.0]
def change
create_table :skill_values, id: :uuid do |t|
t.references :skill, type: :uuid, null: false
t.integer :level, null: false, default: 1 # skill level or uncap level
t.decimal :value # numeric value for multiplier
t.string :text_value # text description for non-numeric values
t.timestamps null: false
end
add_foreign_key :skill_values, :skills
add_index :skill_values, %i[skill_id level], unique: true
end
end