Store themed attribute per icon pack icon

This commit is contained in:
MM20
2023-02-15 20:59:13 +01:00
parent f4c1bcf5aa
commit c71fec59ac
7 changed files with 18 additions and 7 deletions
@@ -2,7 +2,7 @@
"formatVersion": 1,
"database": {
"version": 20,
"identityHash": "0e23c747bfe32759849ee85dcd5d23cb",
"identityHash": "5b1104c3916482efde9b715c1f3c1273",
"entities": [
{
"tableName": "forecasts",
@@ -222,7 +222,7 @@
},
{
"tableName": "Icons",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`type` TEXT NOT NULL, `componentName` TEXT, `drawable` TEXT, `iconPack` TEXT NOT NULL, `name` TEXT, `id` INTEGER PRIMARY KEY AUTOINCREMENT)",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`type` TEXT NOT NULL, `componentName` TEXT, `drawable` TEXT, `iconPack` TEXT NOT NULL, `name` TEXT, `themed` INTEGER NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT)",
"fields": [
{
"fieldPath": "type",
@@ -254,6 +254,12 @@
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "themed",
"columnName": "themed",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "id",
"columnName": "id",
@@ -468,7 +474,7 @@
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '0e23c747bfe32759849ee85dcd5d23cb')"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5b1104c3916482efde9b715c1f3c1273')"
]
}
}
@@ -11,5 +11,6 @@ data class IconEntity(
val drawable: String?,
val iconPack: String,
val name: String?,
val themed: Boolean = false,
@PrimaryKey(autoGenerate = true) val id : Long? = null
)
@@ -13,6 +13,7 @@ class Migration_19_20: Migration(19, 20) {
`drawable` TEXT,
`iconPack` TEXT NOT NULL,
`name` TEXT,
`themed` INTEGER NOT NULL DEFAULT 0,
`id` INTEGER PRIMARY KEY AUTOINCREMENT)
""")
database.execSQL("INSERT INTO `Icons` (`type`, `componentName`, `drawable`, `iconPack`, `themed`, `name`) SELECT `type`, `componentName`, `drawable`, `iconPack`, null FROM `Icons_old`")