add new files

This commit is contained in:
Sunandar
2017-01-24 17:45:40 +06:30
parent 2f427ae5b9
commit 2893f33a23
138 changed files with 36367 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
class CreateBatches < ActiveRecord::Migration[5.0]
def change
create_table :batches do |t|
t.datetime :date,:null => false
t.references :user
t.string :order_ref,:null => false
t.boolean :batch_start
t.boolean :batch_end
t.string :created_by,:null => false
t.integer :qty_processing,:null => false
t.integer :qty_success, :null => false
t.integer :qty_fail,:null => false
t.datetime :batch_start_time
t.datetime :batch_end_time
t.integer :export_count
t.string :remark
t.timestamps
end
end
end

View File

@@ -0,0 +1,47 @@
class DeviseCreateMembers < ActiveRecord::Migration[5.0]
def change
create_table :members do |t|
## Database authenticatable
t.references :user
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at
## Rememberable
t.datetime :remember_created_at
## Trackable
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.inet :current_sign_in_ip
t.inet :last_sign_in_ip
## Confirmable
t.string :confirmation_token
t.datetime :confirmed_at
t.datetime :confirmation_sent_at
t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
t.string :unlock_token # Only if unlock strategy is :email or :both
t.datetime :locked_at
t.timestamps null: false
## UID
t.string :uid
t.string :session_token
end
add_index :members, :email, unique: true
add_index :members, :reset_password_token, unique: true
add_index :members, :confirmation_token, unique: true
add_index :members, :unlock_token, unique: true
add_index :members, :uid, :unique => true
end
end

View File

@@ -0,0 +1,12 @@
class CreateBatchLineItems < ActiveRecord::Migration[5.0]
def change
create_table :batch_line_items do |t|
t.references :batch
t.string :serial_no , null: false
t.string :wristband_code , null: false
t.string :manufacture_uid ,null:false
t.string :card_type,:default => "child"
t.timestamps null: false
end
end
end

View File

@@ -0,0 +1,14 @@
class CreateUser < ActiveRecord::Migration[5.0]
def change
create_table :users do |t|
t.string :name,:null => false
t.string :nrc
t.string :email
t.boolean :is_active,:default =>false
t.string :phone
t.string :address
t.string :secrect_key
t.timestamps null: false
end
end
end

View File

@@ -0,0 +1,11 @@
class CreateLookups < ActiveRecord::Migration[5.0]
def change
create_table :lookups do |t|
t.string :name,:null => false
t.integer :max_value
t.string :prefix
t.integer :max_length
t.timestamps null: false
end
end
end