Upcoming database changes RELEASE 18 July 2023

-ActiveRecord::Schema.define(version: 2023_06_26_055808) do
+ActiveRecord::Schema.define(version: 2023_07_06_133416) do

   # These are extensions that must be enabled in order to support this database
   enable_extension "citext"
@@ -732,7 +732,7 @@
   end

   create_table "contact_portal_users", force: :cascade do |t|
-    t.string "contact_id", null: false
+    t.integer "contact_id", null: false
     t.boolean "active", default: false, null: false
     t.string "email", null: false
     t.string "crypted_password"
@@ -1669,8 +1669,8 @@
     t.boolean "unsubscribed_from_bulk_emails", default: false
     t.boolean "unsubscribed_from_bulk_sms", default: false
     t.bigint "lead_substatus_id"
-    t.string "reason_for_closing"
     t.string "reason_for_holding"
+    t.string "reason_for_closing"
     t.boolean "potential_duplicate", default: false
     t.index ["created_by_id"], name: "index_jobseeker_leads_on_created_by_id"
     t.index ["lead_manager_id"], name: "index_jobseeker_leads_on_lead_manager_id"
@@ -2436,6 +2436,7 @@
     t.bigint "expense_payment_type_id"
     t.boolean "expense_gst_applied", default: false
     t.boolean "no_expense"
+    t.boolean "enable_custom_cost", default: false, null: false
     t.index ["custom_expense_type_id"], name: "index_program_referral_types_on_custom_expense_type_id"
     t.index ["expense_payment_type_id"], name: "index_program_referral_types_on_expense_payment_type_id"
   end
@@ -2931,8 +2932,13 @@
     t.string "document_type"
     t.datetime "created_at", precision: 6, null: false
     t.datetime "updated_at", precision: 6, null: false
+    t.string "type", default: "JobseekerRequestedAttachmentHistory", null: false
+    t.bigint "contact_id"
+    t.bigint "placement_id"
     t.index ["attachment_id"], name: "index_requested_attachment_histories_on_attachment_id"
+    t.index ["contact_id"], name: "index_requested_attachment_histories_on_contact_id"
     t.index ["jobseeker_id"], name: "index_requested_attachment_histories_on_jobseeker_id"
+    t.index ["placement_id"], name: "index_requested_attachment_histories_on_placement_id"
     t.index ["requested_by_id"], name: "index_requested_attachment_histories_on_requested_by_id"
   end

@@ -2947,8 +2953,13 @@
     t.jsonb "additional_data", default: {}, null: false
     t.datetime "created_at", precision: 6, null: false
     t.datetime "updated_at", precision: 6, null: false
+    t.string "type", default: "JobseekerRequestedSignatureHistory", null: false
+    t.bigint "contact_id"
+    t.bigint "placement_id"
     t.index ["attachment_id"], name: "index_requested_signature_histories_on_attachment_id"
+    t.index ["contact_id"], name: "index_requested_signature_histories_on_contact_id"
     t.index ["jobseeker_id"], name: "index_requested_signature_histories_on_jobseeker_id"
+    t.index ["placement_id"], name: "index_requested_signature_histories_on_placement_id"
     t.index ["requested_by_id"], name: "index_requested_signature_histories_on_requested_by_id"
     t.index ["signed_attachment_id"], name: "index_requested_signature_histories_on_signed_attachment_id"
   end
@@ -4149,11 +4160,15 @@
   add_foreign_key "reminders", "users", column: "completed_by_id"
   add_foreign_key "reminders", "users", column: "created_by_id"
   add_foreign_key "requested_attachment_histories", "attachments"
+  add_foreign_key "requested_attachment_histories", "contacts"
   add_foreign_key "requested_attachment_histories", "jobseekers"
+  add_foreign_key "requested_attachment_histories", "placements"
   add_foreign_key "requested_attachment_histories", "users", column: "requested_by_id"
   add_foreign_key "requested_signature_histories", "attachments"
   add_foreign_key "requested_signature_histories", "attachments", column: "signed_attachment_id"
+  add_foreign_key "requested_signature_histories", "contacts"
   add_foreign_key "requested_signature_histories", "jobseekers"
+  add_foreign_key "requested_signature_histories", "placements"
   add_foreign_key "requested_signature_histories", "users", column: "requested_by_id"
   add_foreign_key "scanned_document_images", "scanned_documents"
   add_foreign_key "scanned_documents", "batches"
(END)

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.