From a1ce39643b4b217db51be5dce7b007739f4ab209 Mon Sep 17 00:00:00 2001 From: Rishabh Singh Date: Sat, 17 Aug 2019 18:09:00 +0530 Subject: [PATCH] Create migration file --- db/migrate/20190817094930_create_booth_types.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/migrate/20190817094930_create_booth_types.rb diff --git a/db/migrate/20190817094930_create_booth_types.rb b/db/migrate/20190817094930_create_booth_types.rb new file mode 100644 index 00000000..59549746 --- /dev/null +++ b/db/migrate/20190817094930_create_booth_types.rb @@ -0,0 +1,12 @@ +class CreateBoothTypes < ActiveRecord::Migration[5.2] + def change + create_table :booth_types do |t| + t.references :program + t.string :title, null: false + t.string :description + + t.timestamps + end + add_reference :booths, :booth_type, index: true + end +end