What is the use of fallBackToDestructiveMigration() here when we create our database object???
Please explain the given function
@KetanPandey lets suppose you have changed some schema in your database
Example: adding another column in your table and when you update the version of your database and run the app, the app crashes as you have not provided any migration.
When you use the function fallBackToDestructiveMigration() you can prevent the crash when you don’t want to provide any migration. Here the app doesn’t crash but loses all the data.
1 Like
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.