Skip to content

Commit

Permalink
Clinical Errors retrieve Schema from DB (#1145)
Browse files Browse the repository at this point in the history
* Initial proposal

* Return migration errors when there is no Dictionary found

* remove logging

* Updated Logging

* Refactor

* Remove alias

* Use Options object

* Reduce Repeat Dictionary Lookups

* Improve Comments

* Refactor + Draft Handling for Dictionary not found

* Use sort $natural

* Update Create or Update to filter by version

* Draft DB changes

* Add Migration

* Missing Return

* Major Refactor round 1

* const v let

* Use FilteredErrors

* Pass complete records to exception handler

* Fix Duplicate Errors

* Update variable names

* Hoist Migration Version

* Additional Comments

* Remove 'as'

* Break Into Functions & Update Names

* Remove spread

* Extra Comment

* Make Options potentially undefined

* Remove unnecessary conditional

* Separate exception 'await' from return

* Improve if/else block
  • Loading branch information
demariadaniel authored Mar 18, 2024
1 parent 36ed4ef commit dba9bd8
Show file tree
Hide file tree
Showing 8 changed files with 277 additions and 194 deletions.
8 changes: 8 additions & 0 deletions migrations/20240312201223-remove-data-schemas-unique-name.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
async up(db, client) {
// Removing Index allows for new definition where name is not unique
await db.collection('dataschemas').dropIndex({ name: 1 });
},

async down(db, client) {},
};
Loading

0 comments on commit dba9bd8

Please sign in to comment.