Skip to content

Commit

Permalink
fix: add script to update bad db data
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent 42aaf81 commit 1e478c5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/sql/scripts/029-update-sandbox-export-urls.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
rollback;
begin;

-- These values should be swapped after running the script
-- netsuite=> select count(export_url) from expense_groups where export_url like '%_sb%';
-- count
-- -------
-- 240
-- (1 row)

-- netsuite=> select count(export_url) from expense_groups where export_url like '%-sb%';
-- count
-- -------
-- 0
-- (1 row)

update expense_groups set export_url = replace(export_url, '_sb', '-sb');

0 comments on commit 1e478c5

Please sign in to comment.