From 1cd1396441fc2cfda474422c188ee871eecde87d Mon Sep 17 00:00:00 2001 From: Nick Phura Date: Mon, 25 Feb 2019 14:25:49 -0800 Subject: [PATCH] PRC-1037: add database migration to remove decision description field. --- data_migration/removeDecisionDescription.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 data_migration/removeDecisionDescription.js diff --git a/data_migration/removeDecisionDescription.js b/data_migration/removeDecisionDescription.js new file mode 100644 index 0000000..abfba17 --- /dev/null +++ b/data_migration/removeDecisionDescription.js @@ -0,0 +1,12 @@ +// database migration script +// deletes description field from Decision collection +// run this any time after description was removed: PRC-1029-2 for api/public AND PRC-1029 for admin +// is safe to run multiple times +// NOTE: code below requires MongoDB 3.4 + +// steps: +// 1. open Robo 3T +// 2. paste the following in a shell +// 3. press F5 to execute + +db.decisions.updateMany( {}, { $unset: { description: 1 } } ); \ No newline at end of file