170 lines
5.7 KiB
Ruby
170 lines
5.7 KiB
Ruby
# 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.
|
|
|
|
ActiveRecord::Schema[7.1].define(version: 2024_02_06_215805) do
|
|
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
|
|
|
|
create_table "employers", force: :cascade do |t|
|
|
t.string "first_name"
|
|
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
|
|
t.string "last_name"
|
|
t.string "address_line_1"
|
|
t.string "address_line_2"
|
|
t.string "city"
|
|
t.string "state"
|
|
t.string "zip"
|
|
t.index ["ssn"], name: "index_employers_on_ssn", unique: true
|
|
t.index ["tin"], name: "index_employers_on_tin", unique: true
|
|
end
|
|
|
|
create_table "employers_vendors", id: false, force: :cascade do |t|
|
|
t.integer "vendor_id", null: false
|
|
t.integer "employer_id", null: false
|
|
end
|
|
|
|
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
|
|
|
|
create_table "participants", force: :cascade do |t|
|
|
t.string "first_name"
|
|
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
|
|
t.integer "worker_id"
|
|
t.string "last_name"
|
|
t.string "address_line_1"
|
|
t.string "address_line_2"
|
|
t.string "city"
|
|
t.string "state"
|
|
t.string "zip"
|
|
t.date "start_date"
|
|
t.date "end_date"
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
t.string "contact"
|
|
t.string "address_line_1"
|
|
t.string "address_line_2"
|
|
t.string "city"
|
|
t.string "state"
|
|
t.string "zip"
|
|
t.index ["tin"], name: "index_vendors_on_tin", unique: true
|
|
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
|
|
t.string "first_name"
|
|
t.string "last_name"
|
|
t.string "address_line_1"
|
|
t.string "address_line_2"
|
|
t.string "city"
|
|
t.string "state"
|
|
t.string "zip"
|
|
t.index ["ssn"], name: "index_workers_on_ssn", unique: true
|
|
end
|
|
|
|
add_foreign_key "employer_records", "employers"
|
|
add_foreign_key "employer_records", "participants"
|
|
add_foreign_key "employments", "participants"
|
|
add_foreign_key "employments", "workers"
|
|
add_foreign_key "participants", "employers"
|
|
add_foreign_key "participants", "workers"
|
|
add_foreign_key "service_contracts", "participants"
|
|
add_foreign_key "service_contracts", "vendors"
|
|
end
|