Skip to content

Commit

Permalink
Cleanup after uploads refactor/malware scan
Browse files Browse the repository at this point in the history
- Delete Azure-related blob data jobs/tasks
- Delete the referral_evidences table and its associations
- Delete unused test files
- Delete unnecessary keep files
  • Loading branch information
zarembas committed Jun 15, 2023
1 parent cfdd057 commit 103714e
Show file tree
Hide file tree
Showing 24 changed files with 10 additions and 242 deletions.
Empty file removed app/assets/builds/.keep
Empty file.
Empty file removed app/assets/images/.keep
Empty file.
Empty file removed app/controllers/concerns/.keep
Empty file.
16 changes: 0 additions & 16 deletions app/jobs/resend_stored_blob_data_job.rb

This file was deleted.

52 changes: 0 additions & 52 deletions app/lib/malware/resend_stored_blob_data.rb

This file was deleted.

Empty file removed app/models/concerns/.keep
Empty file.
4 changes: 0 additions & 4 deletions app/models/referral.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ class Referral < ApplicationRecord

has_many :uploads, as: :uploadable

# TODO: This is a temporary association to allow us to delete referrals that have been created
# but not submitted. Once we delete the referral_evidences table we can remove this association.
has_many :referral_evidences, dependent: :destroy

has_one :allegation_upload,
-> { where(section: "allegation").order(created_at: :desc) },
class_name: "Upload",
Expand Down
6 changes: 0 additions & 6 deletions config/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ shared:
- job_title
- last_name
- complete
:referral_evidences:
- id
- filename
- referral_id
- created_at
- updated_at
:referrals:
- id
- created_at
Expand Down
2 changes: 0 additions & 2 deletions config/analytics_pii.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
- first_name
- phone
- last_name
:referral_evidences:
- filename
:referrals:
- first_name
- last_name
Expand Down
9 changes: 9 additions & 0 deletions db/migrate/20230615115253_delete_referral_evidences.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class DeleteReferralEvidences < ActiveRecord::Migration[7.0]
def change
drop_table :referral_evidences, if_exists: true do |t|
t.references :referral, index: true, foreign_key: true
t.string :filename
t.timestamps
end
end
end
11 changes: 1 addition & 10 deletions 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[7.0].define(version: 2023_06_05_104919) do
ActiveRecord::Schema[7.0].define(version: 2023_06_15_115253) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"

Expand Down Expand Up @@ -78,14 +78,6 @@
t.index ["referral_id"], name: "index_organisations_on_referral_id"
end

create_table "referral_evidences", force: :cascade do |t|
t.string "filename"
t.bigint "referral_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["referral_id"], name: "index_referral_evidences_on_referral_id"
end

create_table "referrals", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
Expand Down Expand Up @@ -253,7 +245,6 @@
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "organisations", "referrals"
add_foreign_key "referral_evidences", "referrals"
add_foreign_key "referrals", "eligibility_checks"
add_foreign_key "referrals", "users"
add_foreign_key "referrers", "referrals"
Expand Down
Empty file removed lib/tasks/.keep
Empty file.
12 changes: 0 additions & 12 deletions lib/tasks/malware_scan.rake

This file was deleted.

33 changes: 0 additions & 33 deletions lib/tasks/transfer_attachments.rake

This file was deleted.

67 changes: 0 additions & 67 deletions spec/lib/malware/resend_stored_blob_data_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions test/application_system_test_case.rb

This file was deleted.

13 changes: 0 additions & 13 deletions test/channels/application_cable/connection_test.rb

This file was deleted.

Empty file removed test/controllers/.keep
Empty file.
7 changes: 0 additions & 7 deletions test/controllers/pages_controller_test.rb

This file was deleted.

Empty file removed test/helpers/.keep
Empty file.
Empty file removed test/integration/.keep
Empty file.
Empty file removed test/models/.keep
Empty file.
Empty file removed test/system/.keep
Empty file.
15 changes: 0 additions & 15 deletions test/test_helper.rb

This file was deleted.

0 comments on commit 103714e

Please sign in to comment.