Add migrations

This commit is contained in:
Rishabh Singh 2019-08-18 22:58:27 +05:30
parent 8b2f2b538e
commit e3f175d55a
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,11 @@
class CreateBoothGroup < ActiveRecord::Migration[5.2]
def change
create_table :booth_groups do |t|
t.references :program
t.string :name, null: false
t.timestamps
end
add_reference :booths, :booth_group, index: true
end
end

View file

@ -0,0 +1,5 @@
class AddColorToBoothGroup < ActiveRecord::Migration[5.2]
def change
add_column :booth_groups, :color, :string, default: '#000000'
end
end