🐞 Fix upgrading from version <= 1.0.1 to a current version

This commit is contained in:
Stefan Niedermann 2020-05-11 11:47:25 +02:00
parent cefb6a9df2
commit 0676b195fb
2 changed files with 13 additions and 2 deletions

View file

@ -160,7 +160,17 @@ abstract class AbstractNotesDatabase extends SQLiteOpenHelper {
} }
if (oldVersion < 9) { if (oldVersion < 9) {
// Create accounts table // Create accounts table
createAccountTable(db); db.execSQL("CREATE TABLE " + table_accounts + " ( " +
key_id + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
key_url + " TEXT, " +
key_username + " TEXT, " +
key_account_name + " TEXT UNIQUE, " +
key_etag + " TEXT, " +
key_modified + " INTEGER, " +
key_color + " VARCHAR(6) NOT NULL DEFAULT '000000', " +
key_text_color + " VARCHAR(6) NOT NULL DEFAULT '0082C9', " +
key_capabilities_etag + " TEXT)");
createAccountIndexes(db);
// Add accountId to notes table // Add accountId to notes table
db.execSQL("ALTER TABLE " + table_notes + " ADD COLUMN " + key_account_id + " INTEGER NOT NULL DEFAULT 0"); db.execSQL("ALTER TABLE " + table_notes + " ADD COLUMN " + key_account_id + " INTEGER NOT NULL DEFAULT 0");

View file

@ -1 +1,2 @@
- ⚡️ Speed up synchronization by supporting ETags for capabilities endpoint - ⚡️ Speed up synchronization by supporting ETags for capabilities endpoint
- 🐞 Fix upgrading from version <= 1.0.1 to a current version