Files
site/db/migrate/20210528125553_create_wow_guilds.rb
2021-05-28 17:04:31 +02:00

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