This is used to export types used in various places for database interactions in personal projects.
Project-specific documents can be held in a single collection. So those should inherit from the BaseDocumentWithType
class.
When different document types are held under a specific collection, they should get their own folder.
- Note that documents cannot have really special types or classes with functions. For example
Set
cannot be used.
If a property is being moved or a new required property is added, then take the following steps
- Update the document
- Update the validator
- Push the changes to NPM
- Go to
be-ts-db-lib
and update the versions there withyarn upgrade:core
- Update the migration service in that repo and double check it looks okay
- Run the migration with
yarn migrate:dry
thenyarn migrate
- Run validation to ensure everything is alright with
yarn validate:dry
thenyarn validate
if needed - Run tests
- Update tests if needed then re-validate
- Push a new version of the
be-ts-db-lib
to NPM - Pull the new versions into
digital-ocean-functions
and deploy - Pull the new versions into
core-ts-api-lib
and push to NPM - Pull the new versions into any relevant frontends and deploy
- Test out the frontends to make sure it works okay and double check MongoDB directly