summaryrefslogtreecommitdiffstats
path: root/mobile/android/android-components/components/feature/tab-collections/schemas/mozilla.components.feature.tab.collections.db.TabCollectionDatabase/1.json
blob: e125b8a11f431602bd63c44b084744d239174bdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
  "formatVersion": 1,
  "database": {
    "version": 1,
    "identityHash": "cf6d8bdd8e16b3f92043f9430524c80d",
    "entities": [
      {
        "tableName": "tab_collections",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `title` TEXT NOT NULL, `updated_at` INTEGER NOT NULL, `created_at` INTEGER NOT NULL)",
        "fields": [
          {
            "fieldPath": "id",
            "columnName": "id",
            "affinity": "INTEGER",
            "notNull": false
          },
          {
            "fieldPath": "title",
            "columnName": "title",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "updatedAt",
            "columnName": "updated_at",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "createdAt",
            "columnName": "created_at",
            "affinity": "INTEGER",
            "notNull": true
          }
        ],
        "primaryKey": {
          "columnNames": [
            "id"
          ],
          "autoGenerate": true
        },
        "indices": [],
        "foreignKeys": []
      },
      {
        "tableName": "tabs",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `title` TEXT NOT NULL, `url` TEXT NOT NULL, `stat_file` TEXT NOT NULL, `tab_collection_id` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, FOREIGN KEY(`tab_collection_id`) REFERENCES `tab_collections`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
        "fields": [
          {
            "fieldPath": "id",
            "columnName": "id",
            "affinity": "INTEGER",
            "notNull": false
          },
          {
            "fieldPath": "title",
            "columnName": "title",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "url",
            "columnName": "url",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "stateFile",
            "columnName": "stat_file",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "tabCollectionId",
            "columnName": "tab_collection_id",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "createdAt",
            "columnName": "created_at",
            "affinity": "INTEGER",
            "notNull": true
          }
        ],
        "primaryKey": {
          "columnNames": [
            "id"
          ],
          "autoGenerate": true
        },
        "indices": [
          {
            "name": "index_tabs_tab_collection_id",
            "unique": false,
            "columnNames": [
              "tab_collection_id"
            ],
            "createSql": "CREATE  INDEX `index_tabs_tab_collection_id` ON `${TABLE_NAME}` (`tab_collection_id`)"
          }
        ],
        "foreignKeys": [
          {
            "table": "tab_collections",
            "onDelete": "CASCADE",
            "onUpdate": "NO ACTION",
            "columns": [
              "tab_collection_id"
            ],
            "referencedColumns": [
              "id"
            ]
          }
        ]
      }
    ],
    "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, \"cf6d8bdd8e16b3f92043f9430524c80d\")"
    ]
  }
}