17 lines
579 B
Ruby
17 lines
579 B
Ruby
class CreateSaleAudits < ActiveRecord::Migration[5.0]
|
|
def change
|
|
create_table :sale_audits, :id => false do |t|
|
|
t.string :sale_audit_id, :limit => 16, :primary_key => true #custom primary key - to ensure consistence for cloud syncing
|
|
|
|
t.string :sale_id, foreign_key: true, :limit => 16
|
|
t.string :action, :null => false
|
|
t.datetime :action_at, :null => false
|
|
t.string :action_by, :null => false
|
|
t.string :approved_by, :null => false
|
|
t.datetime :approved_by, :null => false
|
|
t.string :remark
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|