Skip to content

Commit

Permalink
Merge pull request #10406 from DFE-Digital/cv/add-status-to-pool-invite
Browse files Browse the repository at this point in the history
Add status to pool invite
  • Loading branch information
CatalinVoineag authored Feb 20, 2025
2 parents ffd4a0e + 62ab157 commit a6f03c3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/models/pool/invite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ class Pool::Invite < ApplicationRecord
belongs_to :provider
belongs_to :invited_by, class_name: 'ProviderUser'
belongs_to :course

enum :status, {
draft: 'draft',
published: 'published',
}
end
1 change: 1 addition & 0 deletions config/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ shared:
- provider_id
- invited_by_id
- course_id
- status
- created_at
- updated_at
pool_dismissals:
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20250220113656_add_status_to_pool_invite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddStatusToPoolInvite < ActiveRecord::Migration[8.0]
def change
add_column :pool_invites, :status, :string, null: false, default: 'draft'
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[8.0].define(version: 2025_02_17_144509) do
ActiveRecord::Schema[8.0].define(version: 2025_02_20_113656) do
create_sequence "qualifications_public_id_seq", start: 120000

# These are extensions that must be enabled in order to support this database
Expand Down Expand Up @@ -681,6 +681,7 @@
t.bigint "course_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "status", default: "draft", null: false
t.index ["candidate_id"], name: "index_pool_invites_on_candidate_id"
t.index ["course_id"], name: "index_pool_invites_on_course_id"
t.index ["invited_by_id"], name: "index_pool_invites_on_invited_by_id"
Expand Down
Binary file modified docs/domain-model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a6f03c3

Please sign in to comment.