summaryrefslogtreecommitdiffstats
path: root/res/raw
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-12-07 11:43:47 -0800
committerSunny Goyal <sunnygoyal@google.com>2018-12-10 11:43:35 -0800
commitc5939393a92e3a07fbd6e17527b8b2a1d108f1d7 (patch)
treeda3dc6b9b4e87ffd670d9828de485a77f3f2b1a1 /res/raw
parent415f17333123eb40e7677cf0766f59e7af3f7418 (diff)
downloadandroid_packages_apps_Trebuchet-c5939393a92e3a07fbd6e17527b8b2a1d108f1d7.tar.gz
android_packages_apps_Trebuchet-c5939393a92e3a07fbd6e17527b8b2a1d108f1d7.tar.bz2
android_packages_apps_Trebuchet-c5939393a92e3a07fbd6e17527b8b2a1d108f1d7.zip
Bye bye workspace screens table
Removing a separate table for workspace screens. List of screens are automatically parsed using the items in the favorites DB. Order of the screen based on the screen id and rearranging screens is no longer supported. In case the screens need to be rearranged, all the items in the favorites db will need to be updated with new screen ids. This makes backing up the DB (in the same database) easier as only one table needs to be duplicates. Change-Id: I8ba947a898f637d780e2f49925e78604263126e8
Diffstat (limited to 'res/raw')
-rw-r--r--res/raw/downgrade_schema.json6
1 files changed, 5 insertions, 1 deletions
diff --git a/res/raw/downgrade_schema.json b/res/raw/downgrade_schema.json
index 3c1b64f92..8f1780e5f 100644
--- a/res/raw/downgrade_schema.json
+++ b/res/raw/downgrade_schema.json
@@ -2,8 +2,12 @@
// Note: Comments are not supported in JSON schema, but android parser is lenient.
// Maximum DB version supported by this schema
- "version" : 27,
+ "version" : 28,
+ "downgrade_to_27" : [
+ "CREATE TABLE workspaceScreens (_id INTEGER PRIMARY KEY,screenRank INTEGER,modified INTEGER NOT NULL DEFAULT 0)",
+ "insert into workspaceScreens (_id, screenRank) select screen as _id, screen as screenRank from favorites where container = -100 group by screen order by screen"
+ ],
// Downgrade from 27 to 26. Empty array indicates, the DB is compatible
"downgrade_to_26" : [],
"downgrade_to_25" : [],