| { |
| "formatVersion": 1, |
| "database": { |
| "version": 1, |
| "identityHash": "7beb328c9cd44a7782dfaa18c30ecb83", |
| "entities": [ |
| { |
| "tableName": "Book", |
| "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`bookId` TEXT NOT NULL, `title` TEXT NOT NULL, `bookPublisherId` TEXT 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 |
| } |
| ], |
| "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" |
| ] |
| } |
| ] |
| } |
| ], |
| "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, \"7beb328c9cd44a7782dfaa18c30ecb83\")" |
| ] |
| } |
| } |