add WowGuild model

This commit is contained in:
2021-05-28 17:04:31 +02:00
parent 558cc52de9
commit f8c539bb87
7 changed files with 108 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
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