Skip to content

Commit

Permalink
Add database migration for using NA for unknown locations. (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronweeden authored Jun 25, 2024
1 parent 68ddd60 commit 8a8b270
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions configuration/etl/etl.d/ondemand-migration-10_5_0-11_0_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
"migration-10_5_0-11_0_0": [
{
"name": "resize-normalized-table-columns",
"description": "Resize the ua_family and ua_os_family columns before adding the new unique index to avoid SQL error '1071 Specified key was too long'",
"description": "Resize the ua_family and ua_os_family columns before adding the new unique index to avoid SQL error '1071 Specified key was too long'. Also replace unknown with NA in location table",
"class": "ExecuteSql",
"sql_file_list": [
"ood/ondemand-migration-10_5_0-11_0_0-resize-normalized-columns.sql"
"ood/ondemand-migration-10_5_0-11_0_0-resize-normalized-columns.sql",
"ood/ondemand-migration-10_5_0-11_0_0-replace-unknown-location.sql"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
UPDATE modw_ondemand.location
SET
city = 'NA',
state = 'NA',
country = 'NA'
WHERE city = 'unknown'
AND state = 'unknown'
AND country = 'unknown'

0 comments on commit 8a8b270

Please sign in to comment.