blob: 6362ae85a09cc0ec1ed7a6733febb2a717a87cd0 [file] [log] [blame]
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "0729a81dd89abcbdd49f45ab0807043d",
"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": []
}
],
"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, \"0729a81dd89abcbdd49f45ab0807043d\")"
]
}
}