product commission transaction in commissioner
This commit is contained in:
@@ -4,7 +4,7 @@ class CreateProductCommissions < ActiveRecord::Migration[5.1]
|
||||
create_table :product_commissions do |t|
|
||||
t.string :product_type
|
||||
t.string :product_code
|
||||
t.integer :commission_id
|
||||
t.string :commission_id
|
||||
t.integer :commissioner_id
|
||||
t.decimal :qty, precision: 10, scale: 2, default: 0.00
|
||||
t.string :sale_id
|
||||
|
||||
@@ -5,7 +5,7 @@ class CreateCommissioners < ActiveRecord::Migration[5.1]
|
||||
t.string :name
|
||||
t.string :emp_id
|
||||
t.string :created_by
|
||||
t.integer :commission_id
|
||||
t.string :commission_id
|
||||
t.datetime :joined_date
|
||||
t.datetime :resigned_date
|
||||
t.boolean :is_active, default: true
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
class CreateCommissions < ActiveRecord::Migration[5.1]
|
||||
# rake db:migrate:down VERSION=20170825093252
|
||||
def change
|
||||
create_table :commissions do |t|
|
||||
create_table :commissions, id: false do |t|
|
||||
t.string :commission_id, limit: 16, primary_key: true # custom primary key
|
||||
|
||||
t.string :product_type
|
||||
t.string :product_code
|
||||
t.string :commission_type
|
||||
|
||||
Reference in New Issue
Block a user