You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up the discussion had here, mongoose adapter needs a way to adapt possible schema changes to ensure that previous users of the adapter have a possibility reliable and documented way to upgrade to a new version.
This requires some thinking and design. However the bare minimum should involve:
Migrations are done via transactions if available.
You should be able to downgrade a migration as well. Incase there are some something goes wrong.
Adapter should probably check that each migration is done before being operational.
Migrations should be put under tests.
The text was updated successfully, but these errors were encountered:
Adapter needs to identify that database schema is old and needs to be updated before use. migrate-mongo would take care of the update and then adapter would work as expected.
I think in this particular case it would just update (up()) all documents with p_type to ptype and possibility to downgrade (down()), converting all documents back to p_type. This should be quite reliable with MongoDB transactions.
Following up the discussion had here, mongoose adapter needs a way to adapt possible schema changes to ensure that previous users of the adapter have a possibility reliable and documented way to upgrade to a new version.
This requires some thinking and design. However the bare minimum should involve:
The text was updated successfully, but these errors were encountered: