mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1017242 - Part D: remove API 8 code from BrowserDatabaseHelper. r=margaret
This commit is contained in:
parent
25edd0e517
commit
d4dffd58c3
@ -74,14 +74,6 @@ final class BrowserDatabaseHelper extends SQLiteOpenHelper {
|
||||
private void createBookmarksTable(SQLiteDatabase db) {
|
||||
debug("Creating " + TABLE_BOOKMARKS + " table");
|
||||
|
||||
// Android versions older than Froyo ship with an sqlite
|
||||
// that doesn't support foreign keys.
|
||||
String foreignKeyOnParent = null;
|
||||
if (Build.VERSION.SDK_INT >= 8) {
|
||||
foreignKeyOnParent = ", FOREIGN KEY (" + Bookmarks.PARENT +
|
||||
") REFERENCES " + TABLE_BOOKMARKS + "(" + Bookmarks._ID + ")";
|
||||
}
|
||||
|
||||
db.execSQL("CREATE TABLE " + TABLE_BOOKMARKS + "(" +
|
||||
Bookmarks._ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
|
||||
Bookmarks.TITLE + " TEXT," +
|
||||
@ -95,8 +87,9 @@ final class BrowserDatabaseHelper extends SQLiteOpenHelper {
|
||||
Bookmarks.DATE_CREATED + " INTEGER," +
|
||||
Bookmarks.DATE_MODIFIED + " INTEGER," +
|
||||
Bookmarks.GUID + " TEXT NOT NULL," +
|
||||
Bookmarks.IS_DELETED + " INTEGER NOT NULL DEFAULT 0" +
|
||||
(foreignKeyOnParent != null ? foreignKeyOnParent : "") +
|
||||
Bookmarks.IS_DELETED + " INTEGER NOT NULL DEFAULT 0, " +
|
||||
"FOREIGN KEY (" + Bookmarks.PARENT + ") REFERENCES " +
|
||||
TABLE_BOOKMARKS + "(" + Bookmarks._ID + ")" +
|
||||
");");
|
||||
|
||||
db.execSQL("CREATE INDEX bookmarks_url_index ON " + TABLE_BOOKMARKS + "("
|
||||
@ -112,14 +105,6 @@ final class BrowserDatabaseHelper extends SQLiteOpenHelper {
|
||||
private void createBookmarksTableOn13(SQLiteDatabase db) {
|
||||
debug("Creating " + TABLE_BOOKMARKS + " table");
|
||||
|
||||
// Android versions older than Froyo ship with an sqlite
|
||||
// that doesn't support foreign keys.
|
||||
String foreignKeyOnParent = null;
|
||||
if (Build.VERSION.SDK_INT >= 8) {
|
||||
foreignKeyOnParent = ", FOREIGN KEY (" + Bookmarks.PARENT +
|
||||
") REFERENCES " + TABLE_BOOKMARKS + "(" + Bookmarks._ID + ")";
|
||||
}
|
||||
|
||||
db.execSQL("CREATE TABLE " + TABLE_BOOKMARKS + "(" +
|
||||
Bookmarks._ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
|
||||
Bookmarks.TITLE + " TEXT," +
|
||||
@ -134,8 +119,9 @@ final class BrowserDatabaseHelper extends SQLiteOpenHelper {
|
||||
Bookmarks.DATE_CREATED + " INTEGER," +
|
||||
Bookmarks.DATE_MODIFIED + " INTEGER," +
|
||||
Bookmarks.GUID + " TEXT NOT NULL," +
|
||||
Bookmarks.IS_DELETED + " INTEGER NOT NULL DEFAULT 0" +
|
||||
(foreignKeyOnParent != null ? foreignKeyOnParent : "") +
|
||||
Bookmarks.IS_DELETED + " INTEGER NOT NULL DEFAULT 0, " +
|
||||
"FOREIGN KEY (" + Bookmarks.PARENT + ") REFERENCES " +
|
||||
TABLE_BOOKMARKS + "(" + Bookmarks._ID + ")" +
|
||||
");");
|
||||
|
||||
db.execSQL("CREATE INDEX bookmarks_url_index ON " + TABLE_BOOKMARKS + "("
|
||||
|
Loading…
Reference in New Issue
Block a user