Skip to content

Commit

Permalink
Migrations for withdrawal reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
elceebee committed Dec 20, 2024
1 parent c20bd23 commit e3886df
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
12 changes: 12 additions & 0 deletions db/migrate/20241209145628_create_withdrawal_reasons.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class CreateWithdrawalReasons < ActiveRecord::Migration[8.0]
def change
create_table :withdrawal_reasons do |t|
t.string :reason, index: true
t.text :comment
t.string :status, default: 'draft'
t.references :application_choice, null: false, foreign_key: { on_delete: :cascade }

t.timestamps
end
end
end
14 changes: 13 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: 2024_12_05_101639) do
ActiveRecord::Schema[8.0].define(version: 2024_12_09_145628) 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 @@ -906,6 +906,17 @@
t.index ["name"], name: "index_vendors_on_name", unique: true
end

create_table "withdrawal_reasons", force: :cascade do |t|
t.string "reason"
t.text "comment"
t.string "status", default: "draft"
t.bigint "application_choice_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["application_choice_id"], name: "index_withdrawal_reasons_on_application_choice_id"
t.index ["reason"], name: "index_withdrawal_reasons_on_reason"
end

add_foreign_key "account_recovery_request_codes", "account_recovery_requests", on_delete: :cascade
add_foreign_key "account_recovery_requests", "candidates", on_delete: :cascade
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
Expand Down Expand Up @@ -941,4 +952,5 @@
add_foreign_key "rejection_feedbacks", "application_choices", on_delete: :cascade
add_foreign_key "sites", "providers"
add_foreign_key "vendor_api_tokens", "providers", on_delete: :cascade
add_foreign_key "withdrawal_reasons", "application_choices", on_delete: :cascade
end
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 e3886df

Please sign in to comment.