Home | History | Annotate | Download | only in android.arch.persistence.room.integration.kotlintestapp.BooksDatabase
      1 {
      2   "formatVersion": 1,
      3   "database": {
      4     "version": 1,
      5     "identityHash": "64fa560604c57044726b190dadbd8258",
      6     "entities": [
      7       {
      8         "tableName": "Book",
      9         "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)",
     10         "fields": [
     11           {
     12             "fieldPath": "bookId",
     13             "columnName": "bookId",
     14             "affinity": "TEXT",
     15             "notNull": true
     16           },
     17           {
     18             "fieldPath": "title",
     19             "columnName": "title",
     20             "affinity": "TEXT",
     21             "notNull": true
     22           },
     23           {
     24             "fieldPath": "bookPublisherId",
     25             "columnName": "bookPublisherId",
     26             "affinity": "TEXT",
     27             "notNull": true
     28           }
     29         ],
     30         "primaryKey": {
     31           "columnNames": [
     32             "bookId"
     33           ],
     34           "autoGenerate": false
     35         },
     36         "indices": [],
     37         "foreignKeys": [
     38           {
     39             "table": "Publisher",
     40             "onDelete": "NO ACTION",
     41             "onUpdate": "NO ACTION",
     42             "columns": [
     43               "bookPublisherId"
     44             ],
     45             "referencedColumns": [
     46               "publisherId"
     47             ]
     48           }
     49         ]
     50       },
     51       {
     52         "tableName": "Author",
     53         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`authorId` TEXT NOT NULL, `name` TEXT NOT NULL, PRIMARY KEY(`authorId`))",
     54         "fields": [
     55           {
     56             "fieldPath": "authorId",
     57             "columnName": "authorId",
     58             "affinity": "TEXT",
     59             "notNull": true
     60           },
     61           {
     62             "fieldPath": "name",
     63             "columnName": "name",
     64             "affinity": "TEXT",
     65             "notNull": true
     66           }
     67         ],
     68         "primaryKey": {
     69           "columnNames": [
     70             "authorId"
     71           ],
     72           "autoGenerate": false
     73         },
     74         "indices": [],
     75         "foreignKeys": []
     76       },
     77       {
     78         "tableName": "Publisher",
     79         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`publisherId` TEXT NOT NULL, `name` TEXT NOT NULL, PRIMARY KEY(`publisherId`))",
     80         "fields": [
     81           {
     82             "fieldPath": "publisherId",
     83             "columnName": "publisherId",
     84             "affinity": "TEXT",
     85             "notNull": true
     86           },
     87           {
     88             "fieldPath": "name",
     89             "columnName": "name",
     90             "affinity": "TEXT",
     91             "notNull": true
     92           }
     93         ],
     94         "primaryKey": {
     95           "columnNames": [
     96             "publisherId"
     97           ],
     98           "autoGenerate": false
     99         },
    100         "indices": [],
    101         "foreignKeys": []
    102       },
    103       {
    104         "tableName": "BookAuthor",
    105         "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)",
    106         "fields": [
    107           {
    108             "fieldPath": "bookId",
    109             "columnName": "bookId",
    110             "affinity": "TEXT",
    111             "notNull": true
    112           },
    113           {
    114             "fieldPath": "authorId",
    115             "columnName": "authorId",
    116             "affinity": "TEXT",
    117             "notNull": true
    118           }
    119         ],
    120         "primaryKey": {
    121           "columnNames": [
    122             "bookId",
    123             "authorId"
    124           ],
    125           "autoGenerate": false
    126         },
    127         "indices": [],
    128         "foreignKeys": [
    129           {
    130             "table": "Book",
    131             "onDelete": "CASCADE",
    132             "onUpdate": "CASCADE",
    133             "columns": [
    134               "bookId"
    135             ],
    136             "referencedColumns": [
    137               "bookId"
    138             ]
    139           },
    140           {
    141             "table": "Author",
    142             "onDelete": "CASCADE",
    143             "onUpdate": "CASCADE",
    144             "columns": [
    145               "authorId"
    146             ],
    147             "referencedColumns": [
    148               "authorId"
    149             ]
    150           }
    151         ]
    152       }
    153     ],
    154     "setupQueries": [
    155       "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
    156       "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"64fa560604c57044726b190dadbd8258\")"
    157     ]
    158   }
    159 }