Fix table creation

This commit is contained in:
Stefan Niedermann 2020-05-23 11:29:16 +02:00
parent 012800e028
commit 625ca9ca5f

View file

@ -121,7 +121,7 @@ abstract class AbstractNotesDatabase extends SQLiteOpenHelper {
key_color + " VARCHAR(6) NOT NULL DEFAULT '000000', " +
key_text_color + " VARCHAR(6) NOT NULL DEFAULT '0082C9', " +
key_capabilities_etag + " TEXT, " +
" FOREIGN KEY(" + key_id + ") REFERENCES " + table_category + "(" + key_category_account_id + "));");
"FOREIGN KEY(" + key_id + ") REFERENCES " + table_category + "(" + key_category_account_id + "));");
DatabaseIndexUtil.createIndex(db, table_accounts, key_url, key_username, key_account_name, key_etag, key_modified);
}
@ -130,8 +130,8 @@ abstract class AbstractNotesDatabase extends SQLiteOpenHelper {
key_category_id + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
key_category_account_id + " INTEGER NOT NULL, " +
key_category_title + " TEXT NOT NULL, " +
" UNIQUE( " + key_category_account_id + " , " + key_category_title + "), " +
" FOREIGN KEY(" + key_id + ") REFERENCES " + table_category + "(" + key_category_account_id + "));");
"UNIQUE( " + key_category_account_id + " , " + key_category_title + "), " +
"FOREIGN KEY(" + key_category_account_id + ") REFERENCES " + table_category + "(" + key_id + "));");
DatabaseIndexUtil.createIndex(db, table_category, key_category_id, key_category_account_id, key_category_title);
}