Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #466 from alphagov/data-migration
Browse files Browse the repository at this point in the history
Data migration to remove empty summary records
  • Loading branch information
leelongmore committed Jul 12, 2016
2 parents 4b27fa3 + 278b935 commit ba45e21
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/delete_empty_summary_records.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
From the backdrop repository, run:
mongo tools/delete_empty_summary_records.js
*/

conn = new Mongo();
db = conn.getDB("backdrop");

printjson({"Record count before remove": db.transactional_services_summaries.count()})

db.transactional_services_summaries.remove({"service_id": ""})

printjson({"Record count after remove": db.transactional_services_summaries.count()})

0 comments on commit ba45e21

Please sign in to comment.