ActiveRecord Schema define version 20150521224208 do create_table comm

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
ActiveRecord::Schema.define(version: 20150521224208) do
create_table "comments", force: :cascade do |t|
t.text "message"
t.integer "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "comments", ["user_id"], name: "index_comments_on_user_id", using: :btree
create_table "employees", force: :cascade do |t|
t.integer "position_id"
t.string "first_name"
t.string "middle_name"
t.string "last_name"
t.float "base_pay"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "employees", ["position_id"], name: "index_employees_on_position_id", using: :btree
create_table "machine_outputs", force: :cascade do |t|
t.string "title"
t.integer "production"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "output_products", force: :cascade do |t|
t.integer "product_id"
t.integer "output_id"
t.integer "output_amount"
t.integer "work_time"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "output_products", ["output_id"], name: "index_output_products_on_output_id", using: :btree
add_index "output_products", ["product_id"], name: "index_output_products_on_product_id", using: :btree
create_table "outputs", force: :cascade do |t|
t.date "date"
t.integer "employee_id"
t.float "salary"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "outputs", ["employee_id"], name: "index_outputs_on_employee_id", using: :btree
create_table "penalties", force: :cascade do |t|
t.integer "employee_id"
t.text "comment"
t.float "sum"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "penalties", ["employee_id"], name: "index_penalties_on_employee_id", using: :btree
create_table "positions", force: :cascade do |t|
t.string "title"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "products", force: :cascade do |t|
t.string "title"
t.integer "machine_output_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "roles", force: :cascade do |t|
t.string "name"
t.integer "resource_id"
t.string "resource_type"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id", using: :btree
add_index "roles", ["name"], name: "index_roles_on_name", using: :btree
create_table "users", force: :cascade do |t|
t.string "username", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
add_index "users", ["username"], name: "index_users_on_username", unique: true, using: :btree
create_table "users_roles", id: false, force: :cascade do |t|
t.integer "user_id"
t.integer "role_id"
end
add_index "users_roles", ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id", using: :btree
end