zone and seat_table models
This commit is contained in:
9
db/migrate/20170324135138_create_zones.rb
Normal file
9
db/migrate/20170324135138_create_zones.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateZones < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :zones do |t|
|
||||
t.string :name, :null => false
|
||||
t.boolean :is_active, :default => true
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
15
db/migrate/20170324135335_create_seat_tables.rb
Normal file
15
db/migrate/20170324135335_create_seat_tables.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateSeatTables < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :seat_tables do |t|
|
||||
t.references :zone, foreign_key: true
|
||||
t.string :name, :null => false
|
||||
t.integer :order_by
|
||||
t.integer :no_of_seater, :null => false, :default => 2
|
||||
t.string :table_type, :null => false, :default => "square"
|
||||
t.float :position_x, :null => false, :default => 0.0
|
||||
t.float :position_y, :null => false, :default => 0.0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user