19 lines
638 B
Ruby
Executable File
19 lines
638 B
Ruby
Executable File
class CreateDiningFacilities < ActiveRecord::Migration[5.1]
|
|
def change
|
|
create_table :dining_facilities do |t|
|
|
t.references :zone, foreign_key: true
|
|
t.string :name, :null => false
|
|
t.string :status, :null => false, :default => "available", :index => true
|
|
t.string :type, :null => false, :default => "Table", :index => true
|
|
t.integer :seater, :null => false, :default => 2
|
|
t.integer :order_by
|
|
|
|
t.string :created_by
|
|
t.boolean :is_active, :null => false, :default => true, :index => true
|
|
|
|
t.timestamps
|
|
end
|
|
add_index :dining_facilities, [:status, :type, :is_active]
|
|
end
|
|
end
|