Upcoming database changes RELEASE 22 APRIL 2021

-ActiveRecord::Schema.define(version: 2021_03_25_000633) do
+ActiveRecord::Schema.define(version: 2021_04_07_024256) do

@@ -1926,9 +1926,2 @@ create_table "site_groupings", id: :serial, force: :cascade do |t|

- create_table "site_groupings_users", id: false, force: :cascade do |t|
- t.integer "site_grouping_id", null: false
- t.integer "user_id", null: false
- t.index ["site_grouping_id"], name: "index_site_groupings_users_on_site_grouping_id"
- t.index ["user_id"], name: "index_site_groupings_users_on_user_id"
- end
-
create_table "sites", id: :serial, force: :cascade do |t|
@@ -2219,2 +2212,17 @@ create_table "user_expense_approval_limits", id: :serial, force: :cascade do |t|

+ create_table "user_sets", force: :cascade do |t|
+ t.string "object_type", null: false
+ t.bigint "object_id", null: false
+ t.string "type", null: false
+ t.string "programme"
+ t.bigint "user_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["object_id", "object_type", "type", "programme", "user_id"], name: "index_user_sets_identity", unique: true
+ t.index ["object_type", "object_id"], name: "index_user_sets_on_object_type_and_object_id"
+ t.index ["programme"], name: "index_user_sets_on_programme"
+ t.index ["type"], name: "index_user_sets_on_type"
+ t.index ["user_id"], name: "index_user_sets_on_user_id"
+ end
+
create_table "users", id: :serial, force: :cascade do |t|
@@ -2463,2 +2471,4 @@ create_table "wage_subsidy_requests", force: :cascade do |t|
t.datetime "updated_at", null: false
+ t.string "status", default: "draft"
+ t.bigint "requested_by_id"
t.index ["custom_expense_type_id"], name: "index_wage_subsidy_requests_on_custom_expense_type_id"
@@ -2466,2 +2476,3 @@ create_table "wage_subsidy_requests", force: :cascade do |t|
t.index ["placement_id"], name: "index_wage_subsidy_requests_on_placement_id"
+ t.index ["requested_by_id"], name: "index_wage_subsidy_requests_on_requested_by_id"
t.index ["wage_subsidy_agreement_id"], name: "index_wage_subsidy_requests_on_wage_subsidy_agreement_id"
@@ -2545,2 +2556,3 @@ create_table "widget_configurations", id: :serial, force: :cascade do |t|
add_foreign_key "user_expense_approval_limits", "users"
+ add_foreign_key "user_sets", "users"
add_foreign_key "users", "sites"
@@ -2557,2 +2569,3 @@ create_table "widget_configurations", id: :serial, force: :cascade do |t|
add_foreign_key "wage_subsidy_requests", "placements"
+ add_foreign_key "wage_subsidy_requests", "users", column: "requested_by_id"
add_foreign_key "wage_subsidy_requests", "wage_subsidy_agreements"

Did you find it helpful? Yes No

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