Home | History | Annotate | Download | only in android.arch.persistence.room.integration.kotlintestapp.TestDatabase
      1 {
      2   "formatVersion": 1,
      3   "database": {
      4     "version": 1,
      5     "identityHash": "7beb328c9cd44a7782dfaa18c30ecb83",
      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, `dateOfBirth` INTEGER, `aList` TEXT, 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             "fieldPath": "dateOfBirth",
     69             "columnName": "dateOfBirth",
     70             "affinity": "INTEGER",
     71             "notNull": false
     72           },
     73           {
     74             "fieldPath": "aList",
     75             "columnName": "aList",
     76             "affinity": "TEXT",
     77             "notNull": false
     78           }
     79         ],
     80         "primaryKey": {
     81           "columnNames": [
     82             "authorId"
     83           ],
     84           "autoGenerate": false
     85         },
     86         "indices": [],
     87         "foreignKeys": []
     88       },
     89       {
     90         "tableName": "Publisher",
     91         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`publisherId` TEXT NOT NULL, `name` TEXT NOT NULL, PRIMARY KEY(`publisherId`))",
     92         "fields": [
     93           {
     94             "fieldPath": "publisherId",
     95             "columnName": "publisherId",
     96             "affinity": "TEXT",
     97             "notNull": true
     98           },
     99           {
    100             "fieldPath": "name",
    101             "columnName": "name",
    102             "affinity": "TEXT",
    103             "notNull": true
    104           }
    105         ],
    106         "primaryKey": {
    107           "columnNames": [
    108             "publisherId"
    109           ],
    110           "autoGenerate": false
    111         },
    112         "indices": [],
    113         "foreignKeys": []
    114       },
    115       {
    116         "tableName": "BookAuthor",
    117         "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)",
    118         "fields": [
    119           {
    120             "fieldPath": "bookId",
    121             "columnName": "bookId",
    122             "affinity": "TEXT",
    123             "notNull": true
    124           },
    125           {
    126             "fieldPath": "authorId",
    127             "columnName": "authorId",
    128             "affinity": "TEXT",
    129             "notNull": true
    130           }
    131         ],
    132         "primaryKey": {
    133           "columnNames": [
    134             "bookId",
    135             "authorId"
    136           ],
    137           "autoGenerate": false
    138         },
    139         "indices": [],
    140         "foreignKeys": [
    141           {
    142             "table": "Book",
    143             "onDelete": "CASCADE",
    144             "onUpdate": "CASCADE",
    145             "columns": [
    146               "bookId"
    147             ],
    148             "referencedColumns": [
    149               "bookId"
    150             ]
    151           },
    152           {
    153             "table": "Author",
    154             "onDelete": "CASCADE",
    155             "onUpdate": "CASCADE",
    156             "columns": [
    157               "authorId"
    158             ],
    159             "referencedColumns": [
    160               "authorId"
    161             ]
    162           }
    163         ]
    164       }
    165     ],
    166     "setupQueries": [
    167       "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
    168       "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"7beb328c9cd44a7782dfaa18c30ecb83\")"
    169     ]
    170   }
    171 }