Add migrations
This commit is contained in:
parent
8b2f2b538e
commit
e3f175d55a
2 changed files with 16 additions and 0 deletions
11
db/migrate/20190818124036_create_booth_group.rb
Normal file
11
db/migrate/20190818124036_create_booth_group.rb
Normal 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
|
||||||
5
db/migrate/20190818135624_add_color_to_booth_group.rb
Normal file
5
db/migrate/20190818135624_add_color_to_booth_group.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddColorToBoothGroup < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
add_column :booth_groups, :color, :string, default: '#000000'
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue