DBFlow icon indicating copy to clipboard operation
DBFlow copied to clipboard

Delete/reset database.

Open italopaolo opened this issue 10 years ago • 4 comments

I'm using dbflow to store some data that I download in server. The "id" (primary key) of my entities is defined in server. When I logout of app, I call FlowManager().getDatabase(NAME).reset(context); When I login again, with the same user return SQLiteConstraintException, because id must be UNIQUE in database, but I reset the database. I tried deleteDatabase(NAME+".db), but the same error occurs.

What do I do to delete database and release the primary keys of my database?

italopaolo avatar Feb 24 '16 16:02 italopaolo

It is the same case of that one: #417, it still open.

I posted a workaround there.

andrecrispim avatar Feb 24 '16 16:02 andrecrispim

Another approach that works while the bug is fixed would be delete table y table.

arturonaredo avatar Feb 24 '16 17:02 arturonaredo

I tried Delete.tables(table1.class, table2.class...); but not work to.

italopaolo avatar Feb 24 '16 18:02 italopaolo

I'll close this issue, because is the same case of #417 ...

italopaolo avatar Feb 24 '16 18:02 italopaolo