Skip to content

Commit 6eecf51

Browse files
committed
chore: add room schema
1 parent 6837f05 commit 6eecf51

File tree

1 file changed

+70
-0
lines changed
  • core/schemas/com.kryptkode.core.cache.AppDatabase

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"formatVersion": 1,
3+
"database": {
4+
"version": 1,
5+
"identityHash": "e46ab71a67e09c02122a2bbcbbc87776",
6+
"entities": [
7+
{
8+
"tableName": "characters",
9+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`url` TEXT NOT NULL, `name` TEXT NOT NULL, `birth_year` TEXT NOT NULL, `height` TEXT NOT NULL, `home_world` TEXT NOT NULL, `films` TEXT NOT NULL, `species` TEXT NOT NULL, PRIMARY KEY(`url`))",
10+
"fields": [
11+
{
12+
"fieldPath": "url",
13+
"columnName": "url",
14+
"affinity": "TEXT",
15+
"notNull": true
16+
},
17+
{
18+
"fieldPath": "name",
19+
"columnName": "name",
20+
"affinity": "TEXT",
21+
"notNull": true
22+
},
23+
{
24+
"fieldPath": "birthYear",
25+
"columnName": "birth_year",
26+
"affinity": "TEXT",
27+
"notNull": true
28+
},
29+
{
30+
"fieldPath": "height",
31+
"columnName": "height",
32+
"affinity": "TEXT",
33+
"notNull": true
34+
},
35+
{
36+
"fieldPath": "homeWorld",
37+
"columnName": "home_world",
38+
"affinity": "TEXT",
39+
"notNull": true
40+
},
41+
{
42+
"fieldPath": "films",
43+
"columnName": "films",
44+
"affinity": "TEXT",
45+
"notNull": true
46+
},
47+
{
48+
"fieldPath": "species",
49+
"columnName": "species",
50+
"affinity": "TEXT",
51+
"notNull": true
52+
}
53+
],
54+
"primaryKey": {
55+
"columnNames": [
56+
"url"
57+
],
58+
"autoGenerate": false
59+
},
60+
"indices": [],
61+
"foreignKeys": []
62+
}
63+
],
64+
"views": [],
65+
"setupQueries": [
66+
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
67+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e46ab71a67e09c02122a2bbcbbc87776')"
68+
]
69+
}
70+
}

0 commit comments

Comments
 (0)