diff --git a/db/migrate/20190818124036_create_booth_group.rb b/db/migrate/20190818124036_create_booth_group.rb new file mode 100644 index 00000000..34b40d67 --- /dev/null +++ b/db/migrate/20190818124036_create_booth_group.rb @@ -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 diff --git a/db/migrate/20190818135624_add_color_to_booth_group.rb b/db/migrate/20190818135624_add_color_to_booth_group.rb new file mode 100644 index 00000000..c5cfc7d2 --- /dev/null +++ b/db/migrate/20190818135624_add_color_to_booth_group.rb @@ -0,0 +1,5 @@ +class AddColorToBoothGroup < ActiveRecord::Migration[5.2] + def change + add_column :booth_groups, :color, :string, default: '#000000' + end +end