Added down for creating table

This commit is contained in:
Justin Edmund 2023-06-05 00:16:59 -07:00
parent 2001bbcb34
commit 6d74ccc0b9

View file

@ -1,4 +1,5 @@
class AddRaidGroupsTable < ActiveRecord::Migration[7.0] class AddRaidGroupsTable < ActiveRecord::Migration[7.0]
def up
create_table :raid_groups, id: :uuid, default: -> { "gen_random_uuid()" } do |t| create_table :raid_groups, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.string :name_en, null: false t.string :name_en, null: false
t.string :name_jp, null: false t.string :name_jp, null: false
@ -7,4 +8,9 @@ class AddRaidGroupsTable < ActiveRecord::Migration[7.0]
t.integer :section, default: 1, null: false t.integer :section, default: 1, null: false
t.boolean :extra, default: false, null: false t.boolean :extra, default: false, null: false
end end
end
def down
drop_table :raid_groups
end
end end