Skip to content

Commit 119557d

Browse files
committed
Add nhs_immunisations_api_etag to vaccinations
These will be used when updating or deleting later. Jira-Issue: MAV-1477
1 parent aa26b14 commit 119557d

5 files changed

Lines changed: 16 additions & 0 deletions

File tree

app/models/vaccination_record.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# dose_sequence :integer
1313
# full_dose :boolean
1414
# location_name :string
15+
# nhs_immunisations_api_etag :string
1516
# nhs_immunisations_api_synced_at :datetime
1617
# notes :text
1718
# outcome :integer not null
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
class AddNHSImmunisationsAPIEtagToVaccinationRecord < ActiveRecord::Migration[
4+
8.0
5+
]
6+
def change
7+
add_column :vaccination_records,
8+
:nhs_immunisations_api_etag,
9+
:string,
10+
null: true
11+
end
12+
end

db/schema.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,7 @@
822822
t.boolean "full_dose"
823823
t.datetime "nhs_immunisations_api_synced_at"
824824
t.string "nhs_immunisations_api_id"
825+
t.string "nhs_immunisations_api_etag"
825826
t.index ["batch_id"], name: "index_vaccination_records_on_batch_id"
826827
t.index ["discarded_at"], name: "index_vaccination_records_on_discarded_at"
827828
t.index ["nhs_immunisations_api_id"], name: "index_vaccination_records_on_nhs_immunisations_api_id", unique: true

spec/factories/vaccination_records.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# dose_sequence :integer
1313
# full_dose :boolean
1414
# location_name :string
15+
# nhs_immunisations_api_etag :string
1516
# nhs_immunisations_api_synced_at :datetime
1617
# notes :text
1718
# outcome :integer not null

spec/models/vaccination_record_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# dose_sequence :integer
1313
# full_dose :boolean
1414
# location_name :string
15+
# nhs_immunisations_api_etag :string
1516
# nhs_immunisations_api_synced_at :datetime
1617
# notes :text
1718
# outcome :integer not null

0 commit comments

Comments
 (0)