gallery/app/schemas/sh.hnet.gallery.facts.GalleryDatabase/2.json

221 lines
No EOL
6.4 KiB
JSON

{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "c5349a4132bdbced5aae1cfbd632dfa3",
"entities": [
{
"tableName": "fact",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `generation` INTEGER NOT NULL, `parser` INTEGER NOT NULL, `located` INTEGER NOT NULL, `offsetMinutes` INTEGER, `latitude` REAL, `longitude` REAL, `motion` INTEGER NOT NULL, `motionLength` INTEGER, `gainmap` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "generation",
"columnName": "generation",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "parser",
"columnName": "parser",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "located",
"columnName": "located",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "offsetMinutes",
"columnName": "offsetMinutes",
"affinity": "INTEGER"
},
{
"fieldPath": "latitude",
"columnName": "latitude",
"affinity": "REAL"
},
{
"fieldPath": "longitude",
"columnName": "longitude",
"affinity": "REAL"
},
{
"fieldPath": "motion",
"columnName": "motion",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "motionLength",
"columnName": "motionLength",
"affinity": "INTEGER"
},
{
"fieldPath": "gainmap",
"columnName": "gainmap",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
}
},
{
"tableName": "source",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `state` TEXT NOT NULL, `chosenByUser` INTEGER NOT NULL, `pinnedAt` INTEGER, `sort` TEXT, `lastSeenAt` INTEGER NOT NULL, PRIMARY KEY(`key`))",
"fields": [
{
"fieldPath": "key",
"columnName": "key",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "state",
"columnName": "state",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "chosenByUser",
"columnName": "chosenByUser",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "pinnedAt",
"columnName": "pinnedAt",
"affinity": "INTEGER"
},
{
"fieldPath": "sort",
"columnName": "sort",
"affinity": "TEXT"
},
{
"fieldPath": "lastSeenAt",
"columnName": "lastSeenAt",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"key"
]
}
},
{
"tableName": "album",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `createdAt` INTEGER NOT NULL, `lastAddedAt` INTEGER NOT NULL, `pinnedAt` INTEGER, `sort` TEXT)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "createdAt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastAddedAt",
"columnName": "lastAddedAt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "pinnedAt",
"columnName": "pinnedAt",
"affinity": "INTEGER"
},
{
"fieldPath": "sort",
"columnName": "sort",
"affinity": "TEXT"
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
}
},
{
"tableName": "album_item",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumId` INTEGER NOT NULL, `mediaId` INTEGER NOT NULL, `fingerprint` TEXT NOT NULL, `addedAt` INTEGER NOT NULL, PRIMARY KEY(`albumId`, `mediaId`))",
"fields": [
{
"fieldPath": "albumId",
"columnName": "albumId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mediaId",
"columnName": "mediaId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "fingerprint",
"columnName": "fingerprint",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "addedAt",
"columnName": "addedAt",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"albumId",
"mediaId"
]
},
"indices": [
{
"name": "index_album_item_mediaId",
"unique": false,
"columnNames": [
"mediaId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_album_item_mediaId` ON `${TABLE_NAME}` (`mediaId`)"
}
]
}
],
"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, 'c5349a4132bdbced5aae1cfbd632dfa3')"
]
}
}