employee login and authentication with session
This commit is contained in:
@@ -3,8 +3,11 @@ class CreateEmployees < ActiveRecord::Migration[5.0]
|
||||
create_table :employees do |t|
|
||||
t.string :name, :null => false
|
||||
t.string :role, :null => false, :default => "cashier"
|
||||
t.string :encrypted_access_code, :null => false
|
||||
|
||||
t.string :emp_id, :null => false
|
||||
t.string :password_digest, :null => false
|
||||
t.string :token_session
|
||||
t.datetime :session_expiry
|
||||
t.datetime :session_last_login
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
class CreateTableBookingOrders < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :table_booking_orders do |t|
|
||||
t.references :table_booking
|
||||
t.references :order, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
class CreateRoomBookingOrders < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :room_booking_orders do |t|
|
||||
t.references :room_booking
|
||||
t.references :order, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
10
db/migrate/20170414110918_create_booking_orders.rb
Normal file
10
db/migrate/20170414110918_create_booking_orders.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateBookingOrders < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :booking_orders do |t|
|
||||
t.references :booking, foreign_key: true
|
||||
t.references :order, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user