2024-01-14 22:28:10 -06:00
|
|
|
# This file is auto-generated from the current state of the database. Instead
|
|
|
|
# of editing this file, please use the migrations feature of Active Record to
|
|
|
|
# incrementally modify your database, and then regenerate this schema definition.
|
|
|
|
#
|
|
|
|
# This file is the source Rails uses to define your schema when running `bin/rails
|
|
|
|
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
|
|
|
# be faster and is potentially less error prone than running all of your
|
|
|
|
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
|
|
# migrations use external dependencies or application code.
|
|
|
|
#
|
|
|
|
# It's strongly recommended that you check this file into your version control system.
|
|
|
|
|
2024-02-06 17:36:08 -06:00
|
|
|
ActiveRecord::Schema[7.1].define(version: 2024_02_06_215805) do
|
2024-02-02 23:12:36 -06:00
|
|
|
create_table "employer_records", force: :cascade do |t|
|
|
|
|
t.integer "participant_id", null: false
|
|
|
|
t.integer "employer_id", null: false
|
|
|
|
t.date "start_date"
|
|
|
|
t.date "end_date"
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
t.index ["employer_id"], name: "index_employer_records_on_employer_id"
|
|
|
|
t.index ["participant_id"], name: "index_employer_records_on_participant_id"
|
|
|
|
end
|
|
|
|
|
2024-01-16 20:54:44 -06:00
|
|
|
create_table "employers", force: :cascade do |t|
|
2024-01-29 22:04:56 -06:00
|
|
|
t.string "first_name"
|
2024-01-16 20:54:44 -06:00
|
|
|
t.string "phone"
|
|
|
|
t.string "email"
|
|
|
|
t.string "tin"
|
|
|
|
t.date "dob"
|
|
|
|
t.string "ssn"
|
|
|
|
t.string "gender"
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
2024-01-29 22:04:56 -06:00
|
|
|
t.string "last_name"
|
2024-01-29 23:51:42 -06:00
|
|
|
t.string "address_line_1"
|
|
|
|
t.string "address_line_2"
|
|
|
|
t.string "city"
|
|
|
|
t.string "state"
|
|
|
|
t.string "zip"
|
2024-02-06 17:36:08 -06:00
|
|
|
t.index ["ssn"], name: "index_employers_on_ssn", unique: true
|
|
|
|
t.index ["tin"], name: "index_employers_on_tin", unique: true
|
2024-01-16 20:54:44 -06:00
|
|
|
end
|
|
|
|
|
|
|
|
create_table "employers_vendors", id: false, force: :cascade do |t|
|
|
|
|
t.integer "vendor_id", null: false
|
|
|
|
t.integer "employer_id", null: false
|
|
|
|
end
|
|
|
|
|
2024-01-22 22:57:37 -06:00
|
|
|
create_table "employments", force: :cascade do |t|
|
|
|
|
t.integer "worker_id", null: false
|
|
|
|
t.integer "participant_id", null: false
|
|
|
|
t.date "start_date"
|
|
|
|
t.date "end_date"
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
t.index ["participant_id"], name: "index_employments_on_participant_id"
|
|
|
|
t.index ["worker_id"], name: "index_employments_on_worker_id"
|
|
|
|
end
|
|
|
|
|
2024-01-16 20:54:44 -06:00
|
|
|
create_table "participants", force: :cascade do |t|
|
2024-01-20 00:28:17 -06:00
|
|
|
t.string "first_name"
|
2024-01-16 20:54:44 -06:00
|
|
|
t.string "phone"
|
|
|
|
t.string "email"
|
|
|
|
t.string "mci"
|
|
|
|
t.date "dob"
|
|
|
|
t.string "ssn"
|
|
|
|
t.string "gender"
|
|
|
|
t.integer "employer_id", null: false
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
2024-01-19 23:38:15 -06:00
|
|
|
t.integer "worker_id"
|
2024-01-20 00:28:17 -06:00
|
|
|
t.string "last_name"
|
2024-01-29 23:51:42 -06:00
|
|
|
t.string "address_line_1"
|
|
|
|
t.string "address_line_2"
|
|
|
|
t.string "city"
|
|
|
|
t.string "state"
|
|
|
|
t.string "zip"
|
2024-02-02 23:12:36 -06:00
|
|
|
t.date "start_date"
|
|
|
|
t.date "end_date"
|
2024-01-16 20:54:44 -06:00
|
|
|
t.index ["employer_id"], name: "index_participants_on_employer_id"
|
|
|
|
t.index ["worker_id"], name: "index_participants_on_worker_id"
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table "participants_programs", id: false, force: :cascade do |t|
|
|
|
|
t.integer "participant_id", null: false
|
|
|
|
t.integer "program_id", null: false
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table "participants_vendors", id: false, force: :cascade do |t|
|
|
|
|
t.integer "vendor_id", null: false
|
|
|
|
t.integer "participant_id", null: false
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table "programs", force: :cascade do |t|
|
|
|
|
t.string "name"
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
end
|
|
|
|
|
2024-01-31 02:19:24 -06:00
|
|
|
create_table "service_contracts", force: :cascade do |t|
|
|
|
|
t.integer "participant_id", null: false
|
|
|
|
t.integer "vendor_id", null: false
|
|
|
|
t.date "start_date"
|
|
|
|
t.date "end_date"
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
t.index ["participant_id"], name: "index_service_contracts_on_participant_id"
|
|
|
|
t.index ["vendor_id"], name: "index_service_contracts_on_vendor_id"
|
|
|
|
end
|
|
|
|
|
2024-01-14 22:28:10 -06:00
|
|
|
create_table "users", force: :cascade do |t|
|
|
|
|
t.string "email", 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.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
t.index ["email"], name: "index_users_on_email", unique: true
|
|
|
|
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
|
|
|
end
|
|
|
|
|
2024-01-16 20:54:44 -06:00
|
|
|
create_table "vendors", force: :cascade do |t|
|
|
|
|
t.string "name"
|
|
|
|
t.string "phone"
|
|
|
|
t.string "email"
|
|
|
|
t.string "dba"
|
|
|
|
t.string "tin"
|
|
|
|
t.string "contact_name"
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
2024-01-21 22:43:27 -06:00
|
|
|
t.string "contact"
|
2024-01-29 23:51:42 -06:00
|
|
|
t.string "address_line_1"
|
|
|
|
t.string "address_line_2"
|
|
|
|
t.string "city"
|
|
|
|
t.string "state"
|
|
|
|
t.string "zip"
|
2024-02-06 17:36:08 -06:00
|
|
|
t.index ["tin"], name: "index_vendors_on_tin", unique: true
|
2024-01-16 20:54:44 -06:00
|
|
|
end
|
|
|
|
|
|
|
|
create_table "workers", force: :cascade do |t|
|
|
|
|
t.string "name"
|
|
|
|
t.string "phone"
|
|
|
|
t.string "email"
|
|
|
|
t.date "dob"
|
|
|
|
t.string "ssn"
|
|
|
|
t.string "gender"
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
2024-01-23 19:14:58 -06:00
|
|
|
t.string "first_name"
|
|
|
|
t.string "last_name"
|
2024-01-29 23:51:42 -06:00
|
|
|
t.string "address_line_1"
|
|
|
|
t.string "address_line_2"
|
|
|
|
t.string "city"
|
|
|
|
t.string "state"
|
|
|
|
t.string "zip"
|
2024-02-06 17:36:08 -06:00
|
|
|
t.index ["ssn"], name: "index_workers_on_ssn", unique: true
|
2024-01-16 20:54:44 -06:00
|
|
|
end
|
|
|
|
|
2024-02-02 23:12:36 -06:00
|
|
|
add_foreign_key "employer_records", "employers"
|
|
|
|
add_foreign_key "employer_records", "participants"
|
2024-01-22 22:57:37 -06:00
|
|
|
add_foreign_key "employments", "participants"
|
|
|
|
add_foreign_key "employments", "workers"
|
2024-01-16 20:54:44 -06:00
|
|
|
add_foreign_key "participants", "employers"
|
|
|
|
add_foreign_key "participants", "workers"
|
2024-01-31 02:19:24 -06:00
|
|
|
add_foreign_key "service_contracts", "participants"
|
|
|
|
add_foreign_key "service_contracts", "vendors"
|
2024-01-14 22:28:10 -06:00
|
|
|
end
|