hensei-api/db/migrate/20250302080243_create_summon_calls.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

18 lines
672 B
Ruby

class CreateSummonCalls < ActiveRecord::Migration[8.0]
def change
create_table :summon_calls, id: :uuid do |t|
t.string :summon_granblue_id, null: false
t.references :skill, type: :uuid, null: false
t.integer :cooldown
t.integer :uncap_level # 0, 3, 4, 5 for uncap level
t.references :alt_skill, type: :uuid
t.text :alt_condition # condition for alt version
t.timestamps null: false
end
add_foreign_key :summon_calls, :skills
add_foreign_key :summon_calls, :skills, column: :alt_skill_id
add_index :summon_calls, %i[summon_granblue_id uncap_level]
add_index :summon_calls, :summon_granblue_id
end
end