blob: e7d0eaddc4d8ca70cd4e6c33e31b0f5c30d94635 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package it.niedermann.owncloud.notes.persistence.migration;
import android.database.sqlite.SQLiteDatabase;
import androidx.annotation.NonNull;
import it.niedermann.owncloud.notes.shared.util.DatabaseIndexUtil;
public class Migration_6_7 {
/**
* Adds columns for category support and ETags
*/
public Migration_6_7(@NonNull SQLiteDatabase db) {
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");
}
}
|