Skip to content

Migration? #2

@riccione

Description

@riccione

Hi.

I was trying to update the database. I did this by increasing the number of version inside AppDatabase. In this case I got an error that I must setup migrations. I tried to do it in this way

Room.databaseBuilder(context.getApplicationContext(),
AppDatabase.class, "database.db")
.fallbackToDestructiveMigration()
.openHelperFactory(new AssetSQLiteOpenHelperFactory())
.build();

And in result I get an empty database?! How can I solve this? Where is my mistake?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions