Search code examples
javaandroiddatabasesqlitedbflow

How to make migrations with DBFlow?


I'm developing an Android application. For local database in the application I'm using DBFlow ORM library. When updating application, some new changes of the local database are not updated in the new version. I'm changing version of the AppDatabase but changes like new column, changed column name or type, etc. are not visible. Like the migrations are not executed. This is my code for app database:

@Database(name = AppDatabase.NAME, version = AppDatabase.VERSION)
public class AppDatabase {
    public static final String NAME = "BaseName"; // we will add the .db extension
    public static final int VERSION = 2;
}

Do you know maybe what is the problem? Or am I missing something here? Thanks for your help and time.


Solution

  • Please go ahead to below mentioned link and find here the complete guidelines of how to do database migration in DBFlow library.

    DBFlow database migration