Skip to content

Commit

Permalink
Add database schema
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed Mar 27, 2024
1 parent 5ff80a0 commit d7665dc
Show file tree
Hide file tree
Showing 2 changed files with 182 additions and 2 deletions.
181 changes: 181 additions & 0 deletions app/schemas/net.pipe01.pinepartner.data.AppDatabase/17.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"formatVersion": 1,
"database": {
"version": 17,
"identityHash": "37c43151eb156327b193c7e68b8dfc03",
"entities": [
{
"tableName": "Watch",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`address` TEXT NOT NULL, `name` TEXT NOT NULL, `autoConnect` INTEGER NOT NULL DEFAULT true, `reconnect` INTEGER NOT NULL DEFAULT true, PRIMARY KEY(`address`))",
"fields": [
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "autoConnect",
"columnName": "autoConnect",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "true"
},
{
"fieldPath": "reconnect",
"columnName": "reconnect",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "true"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"address"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "AllowedNotifApp",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`packageName` TEXT NOT NULL, PRIMARY KEY(`packageName`))",
"fields": [
{
"fieldPath": "packageName",
"columnName": "packageName",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"packageName"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "Plugin",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `description` TEXT, `author` TEXT, `sourceCode` TEXT NOT NULL, `checksum` TEXT NOT NULL, `permissions` TEXT NOT NULL, `parameters` TEXT NOT NULL, `downloadUrl` TEXT, `enabled` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "description",
"columnName": "description",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "author",
"columnName": "author",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "sourceCode",
"columnName": "sourceCode",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "checksum",
"columnName": "checksum",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "permissions",
"columnName": "permissions",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "parameters",
"columnName": "parameters",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "downloadUrl",
"columnName": "downloadUrl",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "enabled",
"columnName": "enabled",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "ParameterValue",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`pluginId` TEXT NOT NULL, `paramName` TEXT NOT NULL, `value` TEXT NOT NULL, PRIMARY KEY(`pluginId`, `paramName`))",
"fields": [
{
"fieldPath": "pluginId",
"columnName": "pluginId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "paramName",
"columnName": "paramName",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "value",
"columnName": "value",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"pluginId",
"paramName"
]
},
"indices": [],
"foreignKeys": []
}
],
"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, '37c43151eb156327b193c7e68b8dfc03')"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,9 @@ class BackgroundService : Service() {
}

private fun createNotificationChannel() {
val channel = NotificationChannel(NOTIF_CHANNEL_ID, "Background Service Notification", NotificationManager.IMPORTANCE_HIGH).apply {
val channel = NotificationChannel(NOTIF_CHANNEL_ID, "Background Service Notification", NotificationManager.IMPORTANCE_LOW).apply {
enableVibration(false)
enableLights(false)
importance = NotificationManager.IMPORTANCE_LOW
}
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.createNotificationChannel(channel)
Expand Down

0 comments on commit d7665dc

Please sign in to comment.