Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Migration_6_7.java « migration « persistence « notes « owncloud « niedermann « it « java « main « src « app - github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3003e7f193bad8341b9b97f2a8a6817ff871d88b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package it.niedermann.owncloud.notes.persistence.migration;

import android.database.sqlite.SQLiteDatabase;

import it.niedermann.owncloud.notes.util.DatabaseIndexUtil;

public class Migration_6_7 {
    public Migration_6_7(SQLiteDatabase db, int oldVersion) {
        if (oldVersion < 7) {
            DatabaseIndexUtil.dropIndexes(db);
            db.execSQL("ALTER TABLE NOTES ADD COLUMN CATEGORY TEXT NOT NULL DEFAULT ''");
            db.execSQL("ALTER TABLE NOTES ADD COLUMN ETAG TEXT");
            DatabaseIndexUtil.createIndex(db, "NOTES", "REMOTEID", "STATUS", "FAVORITE", "CATEGORY", "MODIFIED");
        }
    }
}