-ActiveRecord::Schema.define(version: 2021_03_02_224215) do
+ActiveRecord::Schema.define(version: 2021_03_25_000633) do
@@ -466,2 +466,9 @@ create_table "companies", id: :serial, force: :cascade do |t|
+ create_table "companies_wage_subsidy_agreements", id: false, force: :cascade do |t|
+ t.bigint "company_id", null: false
+ t.bigint "wage_subsidy_agreement_id", null: false
+ t.index ["company_id"], name: "index_companies_wage_subsidy_agreements_on_company_id"
+ t.index ["wage_subsidy_agreement_id"], name: "index_companies_wage_subsidy_agreements_on_agreement_id"
+ end
+
create_table "company_types", force: :cascade do |t|
@@ -2435,2 +2442,29 @@ create_table "wage_histories", id: :serial, force: :cascade do |t|
+ create_table "wage_subsidy_agreements", force: :cascade do |t|
+ t.bigint "custom_expense_type_id"
+ t.uuid "quest_form_id", null: false
+ t.string "name", null: false
+ t.decimal "amount", null: false
+ t.boolean "active", default: true, null: false
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["custom_expense_type_id"], name: "index_wage_subsidy_agreements_on_custom_expense_type_id"
+ t.index ["name"], name: "index_wage_subsidy_agreements_on_name", unique: true
+ t.index ["quest_form_id"], name: "index_wage_subsidy_agreements_on_quest_form_id"
+ end
+
+ create_table "wage_subsidy_requests", force: :cascade do |t|
+ t.bigint "jobseeker_id", null: false
+ t.bigint "placement_id", null: false
+ t.bigint "wage_subsidy_agreement_id", null: false
+ t.bigint "custom_expense_type_id"
+ t.decimal "wage_subsidy_amount"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.string "status", default: "draft"
+ t.index ["custom_expense_type_id"], name: "index_wage_subsidy_requests_on_custom_expense_type_id"
+ t.index ["jobseeker_id"], name: "index_wage_subsidy_requests_on_jobseeker_id"
+ t.index ["placement_id"], name: "index_wage_subsidy_requests_on_placement_id"
+ t.index ["wage_subsidy_agreement_id"], name: "index_wage_subsidy_requests_on_wage_subsidy_agreement_id"
+ end
+
create_table "why_chooses", id: :serial, force: :cascade do |t|
@@ -2519,2 +2553,7 @@ create_table "widget_configurations", id: :serial, force: :cascade do |t|
add_foreign_key "vacancy_checklist_items", "vacancies"
+ add_foreign_key "wage_subsidy_agreements", "custom_expense_types"
+ add_foreign_key "wage_subsidy_requests", "custom_expense_types"
+ add_foreign_key "wage_subsidy_requests", "jobseekers"
+ add_foreign_key "wage_subsidy_requests", "placements"
+ add_foreign_key "wage_subsidy_requests", "wage_subsidy_agreements"
add_foreign_key "widget_configurations", "users"