Closed darkovski88 closed 9 years ago
context.deleteDatabase(MyDatabase.NAME);
@agrosner When I added this: deleteDatabase(TodoDatabase.NAME); - loged back again , and the data is not removed. Any idea?
Do you need to append ".db"? We add in the .db to the name of the database when its created. I should add that to the README
@agrosner I dont understand.. I've just appended ".db" to the database name and I get errors while compiling. Here is what I've done:
@Database(name = FavoritesDatabase.NAME, version = FavoritesDatabase.VERSION)
public class FavoritesDatabase {
public static final String NAME = "Favorites.db";
public static final int VERSION = 1;
}
and here is what I get in logcat:
/app/build/generated/source/apt/debug/com/raizlabs/android/dbflow/config/ShoppingList/db$Database.java
Error:(5, 32) error: '{' expected
Error:(8, 34) error:
Remove the .db
from your database name except for when you call context.deleteDatabase(name + ".db");
I am putting in a fix for 2.0.1 that if the name starts with .db
then it won't try to include that in the generated class name.
Hello, In my app I have 2 databases and everything is working fine, but when the user wants to log out from the app, I need to remove all the saved data. I guess I need to drop the tables or something like that.. Can anyone tell me how can I do that? I was searching for something like this but I didn't found anything.
Thanks!