blob: 014d98ce12812a87d74922e9e403f2481f4b97f5 [file] [log] [blame]
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "f78c9a055453bd6db377a3fcc3007e54",
"entities": [
{
"tableName": "Book",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookId` TEXT NOT NULL, `title` TEXT NOT NULL, `bookPublisherId` TEXT NOT NULL, `languages` INTEGER NOT NULL, `salesCnt` INTEGER NOT NULL, PRIMARY KEY(`bookId`), FOREIGN KEY(`bookPublisherId`) REFERENCES `Publisher`(`publisherId`) ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED)",
"fields": [
{
"fieldPath": "bookId",
"columnName": "bookId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "bookPublisherId",
"columnName": "bookPublisherId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "languages",
"columnName": "languages",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "salesCnt",
"columnName": "salesCnt",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"bookId"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": [
{
"table": "Publisher",
"onDelete": "NO ACTION",
"onUpdate": "NO ACTION",
"columns": [
"bookPublisherId"
],
"referencedColumns": [
"publisherId"
]
}
]
},
{
"tableName": "Author",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`authorId` TEXT NOT NULL, `name` TEXT NOT NULL, `dateOfBirth` INTEGER, `aList` TEXT, PRIMARY KEY(`authorId`))",
"fields": [
{
"fieldPath": "authorId",
"columnName": "authorId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "dateOfBirth",
"columnName": "dateOfBirth",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "aList",
"columnName": "aList",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"columnNames": [
"authorId"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "Publisher",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`publisherId` TEXT NOT NULL, `name` TEXT NOT NULL, PRIMARY KEY(`publisherId`))",
"fields": [
{
"fieldPath": "publisherId",
"columnName": "publisherId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"publisherId"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "BookAuthor",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookId` TEXT NOT NULL, `authorId` TEXT NOT NULL, PRIMARY KEY(`bookId`, `authorId`), FOREIGN KEY(`bookId`) REFERENCES `Book`(`bookId`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, FOREIGN KEY(`authorId`) REFERENCES `Author`(`authorId`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED)",
"fields": [
{
"fieldPath": "bookId",
"columnName": "bookId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "authorId",
"columnName": "authorId",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"bookId",
"authorId"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": [
{
"table": "Book",
"onDelete": "CASCADE",
"onUpdate": "CASCADE",
"columns": [
"bookId"
],
"referencedColumns": [
"bookId"
]
},
{
"table": "Author",
"onDelete": "CASCADE",
"onUpdate": "CASCADE",
"columns": [
"authorId"
],
"referencedColumns": [
"authorId"
]
}
]
},
{
"tableName": "NoArgClass",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `class_name` TEXT NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "class_name",
"columnName": "class_name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "DataClassFromDependency",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
}
],
"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, \"f78c9a055453bd6db377a3fcc3007e54\")"
]
}
}