WithFlyingColors
WithFlyingColors

Reputation: 2760

Can't upgrade database version

It tells me that my database version must be 0 >= 1 and if I put 1 it tells me that it can't upgrade it from 0 to 1.

myDB constructor:

public database(Context context) {
    super(context, DB_Name, null, DB_Version);   // DB_Version doesn't work if it is 0 or 1
    // TODO Auto-generated constructor stub
}

An instance is created like this from another class:

dbClass = new database(this);

Upvotes: 0

Views: 165

Answers (1)

Caner
Caner

Reputation: 59168

Delete the db and recreate with version = 1 initially.

Upvotes: 2

Related Questions