+
+ // Upgrade from schema version 9.
+ case 9:
+ // Add the wide viewport column. This defaults to `0`, which is `System default`, so a separate step isn't needed to populate the column.
+ domainsDatabase.execSQL("ALTER TABLE " + DOMAINS_TABLE + " ADD COLUMN " + WIDE_VIEWPORT + " INTEGER");
+
+ // Upgrade from schema version 10.
+ case 10:
+ // Add the UltraList column.
+ domainsDatabase.execSQL("ALTER TABLE " + DOMAINS_TABLE + " ADD COLUMN " + ULTRALIST + " BOOLEAN");
+
+ // Enable it for all existing rows.
+ domainsDatabase.execSQL("UPDATE " + DOMAINS_TABLE + " SET " + ULTRALIST + " = " + 1);
+
+ // Upgrade from schema version 11.
+ case 11:
+ // Add the WebView theme column. This defaults to `0`, which is `System default`, so a separate step isn't needed to populate the column.
+ domainsDatabase.execSQL("ALTER TABLE " + DOMAINS_TABLE + " ADD COLUMN " + WEBVIEW_THEME + " INTEGER");
+
+ // SQLite amazingly doesn't include an easy command to delete a column. <https://www.sqlite.org/lang_altertable.html>
+ // Although a new table could be created and all the data copied to it, I think I will just leave the old night mode column. It will be wiped out the next time an import is run.
+
+ // Upgrade from schema version 12.
+ case 12:
+ // Add the cookies column.
+ domainsDatabase.execSQL("ALTER TABLE " + DOMAINS_TABLE + " ADD COLUMN " + COOKIES + " BOOLEAN");
+
+ // Copy the data from the old column to the new one.
+ domainsDatabase.execSQL("UPDATE " + DOMAINS_TABLE + " SET " + COOKIES + " = enablefirstpartycookies");