22 lines
472 B
Ruby
22 lines
472 B
Ruby
class CreateWowGuilds < ActiveRecord::Migration[6.1]
|
|
def change
|
|
create_table :wow_guilds do |t|
|
|
t.string :name
|
|
t.integer :guild_id
|
|
t.integer :achievement_points
|
|
t.integer :member_count
|
|
t.string :faction
|
|
t.jsonb :translated_faction
|
|
t.belongs_to :wow_realm
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :wow_guilds, :guild_id, unique: true
|
|
|
|
change_table :wow_characters do |t|
|
|
t.belongs_to :wow_guild
|
|
end
|
|
end
|
|
end
|