Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
336 changes: 336 additions & 0 deletions app/schemas/com.anod.appwatcher.database.AppsDatabase/20.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,336 @@
{
"formatVersion": 1,
"database": {
"version": 20,
"identityHash": "5f512b5daa6022e167f0a9d6c437b984",
"entities": [
{
"tableName": "app_list",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER NOT NULL, `app_id` TEXT NOT NULL, `package` TEXT NOT NULL, `ver_num` INTEGER NOT NULL, `ver_name` TEXT NOT NULL, `title` TEXT NOT NULL, `creator` TEXT NOT NULL, `iconUrl` TEXT NOT NULL, `status` INTEGER NOT NULL, `upload_date` TEXT NOT NULL, `details_url` TEXT, `update_date` INTEGER NOT NULL, `app_type` TEXT NOT NULL, `sync_version` INTEGER NOT NULL, `price_text` TEXT NOT NULL, `price_currency` TEXT NOT NULL, `price_micros` INTEGER, PRIMARY KEY(`_id`))",
"fields": [
{
"fieldPath": "rowId",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "appId",
"columnName": "app_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "packageName",
"columnName": "package",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "versionNumber",
"columnName": "ver_num",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "versionName",
"columnName": "ver_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "creator",
"columnName": "creator",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "iconUrl",
"columnName": "iconUrl",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "status",
"columnName": "status",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "uploadDate",
"columnName": "upload_date",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "detailsUrl",
"columnName": "details_url",
"affinity": "TEXT"
},
{
"fieldPath": "uploadTime",
"columnName": "update_date",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "appType",
"columnName": "app_type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "syncTime",
"columnName": "sync_version",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "price.text",
"columnName": "price_text",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "price.cur",
"columnName": "price_currency",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "price.micros",
"columnName": "price_micros",
"affinity": "INTEGER"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"_id"
]
}
},
{
"tableName": "changelog",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER NOT NULL, `app_id` TEXT NOT NULL, `code` INTEGER NOT NULL, `name` TEXT NOT NULL, `details` TEXT NOT NULL, `upload_date` TEXT NOT NULL, `no_new_details` INTEGER NOT NULL, PRIMARY KEY(`_id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "appId",
"columnName": "app_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "versionCode",
"columnName": "code",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "versionName",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "details",
"columnName": "details",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "uploadDate",
"columnName": "upload_date",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "noNewDetails",
"columnName": "no_new_details",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"_id"
]
},
"indices": [
{
"name": "index_changelog_app_id_code",
"unique": true,
"columnNames": [
"app_id",
"code"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_changelog_app_id_code` ON `${TABLE_NAME}` (`app_id`, `code`)"
}
]
},
{
"tableName": "app_tags",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER NOT NULL, `app_id` TEXT NOT NULL, `tags_id` INTEGER NOT NULL, PRIMARY KEY(`_id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "appId",
"columnName": "app_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "tagId",
"columnName": "tags_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"_id"
]
},
"indices": [
{
"name": "index_app_tags_app_id_tags_id",
"unique": true,
"columnNames": [
"app_id",
"tags_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_app_tags_app_id_tags_id` ON `${TABLE_NAME}` (`app_id`, `tags_id`)"
}
]
},
{
"tableName": "tags",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `color` INTEGER NOT NULL, `status` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`_id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "color",
"columnName": "color",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "status",
"columnName": "status",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"_id"
]
}
},
{
"tableName": "schedules",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER NOT NULL, `start` INTEGER NOT NULL, `finish` INTEGER NOT NULL, `reason` INTEGER NOT NULL, `result` INTEGER NOT NULL, `checked` INTEGER NOT NULL, `found` INTEGER NOT NULL, `unavailable` INTEGER NOT NULL, `notified` INTEGER NOT NULL, PRIMARY KEY(`_id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "start",
"columnName": "start",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "finish",
"columnName": "finish",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "reason",
"columnName": "reason",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "result",
"columnName": "result",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "checked",
"columnName": "checked",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "found",
"columnName": "found",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "unavailable",
"columnName": "unavailable",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "notified",
"columnName": "notified",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"_id"
]
}
}
],
"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, '5f512b5daa6022e167f0a9d6c437b984')"
]
}
}
6 changes: 4 additions & 2 deletions app/src/main/java/com/anod/appwatcher/AppWatcherActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ class AppWatcherActivity : BaseComposeActivity(), KoinComponent {
tag = Tag(
id = extraTagId,
name = "",
color = extraTagColor
color = extraTagColor,
status = Tag.STATUS_NORMAL
)
))
}
Expand All @@ -177,7 +178,8 @@ class AppWatcherActivity : BaseComposeActivity(), KoinComponent {
tag = Tag(
id = extraTagId,
name = "",
color = extras.getInt(EXTRA_LIST_TAG_COLOR)
color = extras.getInt(EXTRA_LIST_TAG_COLOR),
status = Tag.STATUS_NORMAL
)
)
} else if (extras.containsKey(EXTRA_GDRIVE_SIGNIN)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TagJsonObject(val tag: Tag?) {
reader.endObject()

if (id > 0) {
return Tag(id, name, color)
return Tag(id, name, color, Tag.STATUS_NORMAL)
}
return null
}
Expand Down
Loading
Loading