onaio / steps-app

WHO STEPS App
Apache License 2.0
2 stars 2 forks source link

Fix: Can't downgrade database from version #177

Open owais-vd opened 2 years ago

owais-vd commented 2 years ago

close #168

ekigamba commented 2 years ago

I'm going to reject this because it is a potential danger. Could you explain why we have upgrade statements but no downgrade statements? Why would a downgrade also happen?

The app will crash if either upgrade or downgrade fails until the issue is fixed to prevent data loss.

owais-vd commented 2 years ago

For now, we are not going to downgrade the database version and I think we don't need to handle it. However, we add downgrade checks in future if required and we need to add some extra columns in db that's why added the upgrade function.

ekigamba commented 2 years ago

So we don't need this PR. If the app requires to downgrade, the we should write actual downgrade queries.

Handling the downgrade and doing nothing allows the downgrade to happen

owais-vd commented 2 years ago

I've overridden the downgrade method is just to suppress the runtime crash