| { |
| "formatVersion": 1, |
| "database": { |
| "version": 7, |
| "identityHash": "5653c29453937d8e34dc031af1ab4c7d", |
| "entities": [ |
| { |
| "tableName": "Entity1", |
| "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT, PRIMARY KEY(`id`))", |
| "fields": [ |
| { |
| "fieldPath": "id", |
| "columnName": "id", |
| "affinity": "INTEGER", |
| "notNull": true |
| }, |
| { |
| "fieldPath": "name", |
| "columnName": "name", |
| "affinity": "TEXT", |
| "notNull": false |
| } |
| ], |
| "primaryKey": { |
| "columnNames": [ |
| "id" |
| ], |
| "autoGenerate": false |
| }, |
| "indices": [ |
| { |
| "name": "index_Entity1_name", |
| "unique": true, |
| "columnNames": [ |
| "name" |
| ], |
| "createSql": "CREATE UNIQUE INDEX `index_Entity1_name` ON `${TABLE_NAME}` (`name`)" |
| } |
| ], |
| "foreignKeys": [] |
| }, |
| { |
| "tableName": "Entity2", |
| "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `addedInV3` TEXT, `name` TEXT, PRIMARY KEY(`id`))", |
| "fields": [ |
| { |
| "fieldPath": "id", |
| "columnName": "id", |
| "affinity": "INTEGER", |
| "notNull": true |
| }, |
| { |
| "fieldPath": "addedInV3", |
| "columnName": "addedInV3", |
| "affinity": "TEXT", |
| "notNull": false |
| }, |
| { |
| "fieldPath": "name", |
| "columnName": "name", |
| "affinity": "TEXT", |
| "notNull": false |
| } |
| ], |
| "primaryKey": { |
| "columnNames": [ |
| "id" |
| ], |
| "autoGenerate": false |
| }, |
| "indices": [], |
| "foreignKeys": [] |
| }, |
| { |
| "tableName": "Entity4", |
| "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT, PRIMARY KEY(`id`), FOREIGN KEY(`name`) REFERENCES `Entity1`(`name`) ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED)", |
| "fields": [ |
| { |
| "fieldPath": "id", |
| "columnName": "id", |
| "affinity": "INTEGER", |
| "notNull": true |
| }, |
| { |
| "fieldPath": "name", |
| "columnName": "name", |
| "affinity": "TEXT", |
| "notNull": false |
| } |
| ], |
| "primaryKey": { |
| "columnNames": [ |
| "id" |
| ], |
| "autoGenerate": false |
| }, |
| "indices": [], |
| "foreignKeys": [ |
| { |
| "table": "Entity1", |
| "onDelete": "NO ACTION", |
| "onUpdate": "NO ACTION", |
| "columns": [ |
| "name" |
| ], |
| "referencedColumns": [ |
| "name" |
| ] |
| } |
| ] |
| } |
| ], |
| "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, \"5653c29453937d8e34dc031af1ab4c7d\")" |
| ] |
| } |
| } |