104 lines
3.3 KiB
Ruby
104 lines
3.3 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_01_20_051441) do
|
|
create_table "employers", force: :cascade do |t|
|
|
t.string "name"
|
|
t.string "address"
|
|
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
|
|
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 "participants", force: :cascade do |t|
|
|
t.string "name"
|
|
t.string "address"
|
|
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.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 "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 "address"
|
|
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
|
|
end
|
|
|
|
create_table "workers", force: :cascade do |t|
|
|
t.string "name"
|
|
t.string "address"
|
|
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
|
|
end
|
|
|
|
add_foreign_key "participants", "employers"
|
|
add_foreign_key "participants", "workers"
|
|
end
|