We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 161a7c0 + 8c2a513 commit 704a92fCopy full SHA for 704a92f
1 file changed
app/lib/mavis_cli/gias/import.rb
@@ -52,6 +52,7 @@ def call(input_file:, **)
52
53
if schools.size >= batch_size
54
import_schools(schools)
55
+ update_sites(schools)
56
schools.clear
57
end
58
@@ -116,8 +117,7 @@ def update_sites(schools)
116
117
Location.import!(
118
sites,
119
on_duplicate_key_update: {
- conflict_target: %i[id],
120
- index_predicate: "site IS NULL",
+ conflict_target: %i[urn site],
121
columns: %i[
122
gias_establishment_number
123
gias_local_authority_code
0 commit comments