85 lines
2.4 KiB
JSON
85 lines
2.4 KiB
JSON
{
|
|
"formatVersion": 1,
|
|
"database": {
|
|
"version": 1,
|
|
"identityHash": "4f4222f215c1724a7401aa8d181012a4",
|
|
"entities": [
|
|
{
|
|
"tableName": "charges",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `charge` REAL NOT NULL, `battery_id` TEXT NOT NULL, `date` TEXT NOT NULL, `createdTime` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(`id`))",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "id",
|
|
"columnName": "id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "charge",
|
|
"columnName": "charge",
|
|
"affinity": "REAL",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "batteryId",
|
|
"columnName": "battery_id",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "date",
|
|
"columnName": "date",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "createdTime",
|
|
"columnName": "createdTime",
|
|
"affinity": "TEXT",
|
|
"notNull": true,
|
|
"defaultValue": "CURRENT_TIMESTAMP"
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"columnNames": [
|
|
"id"
|
|
],
|
|
"autoGenerate": false
|
|
},
|
|
"indices": [],
|
|
"foreignKeys": []
|
|
},
|
|
{
|
|
"tableName": "batteries",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `declared_charge` REAL, PRIMARY KEY(`id`))",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "id",
|
|
"columnName": "id",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "declaredCharge",
|
|
"columnName": "declared_charge",
|
|
"affinity": "REAL",
|
|
"notNull": false
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"columnNames": [
|
|
"id"
|
|
],
|
|
"autoGenerate": false
|
|
},
|
|
"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, '4f4222f215c1724a7401aa8d181012a4')"
|
|
]
|
|
}
|
|
} |