Files
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

191 lines
5.6 KiB
JSON

{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "51ab67c93ed9cb247ab45f24664e3d38",
"entities": [
{
"tableName": "record",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`board_uid` INTEGER NOT NULL, `type` INTEGER NOT NULL, `difficulty` INTEGER NOT NULL, `date` INTEGER NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`board_uid`), FOREIGN KEY(`board_uid`) REFERENCES `board`(`uid`) ON UPDATE NO ACTION ON DELETE NO ACTION )",
"fields": [
{
"fieldPath": "board_uid",
"columnName": "board_uid",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "difficulty",
"columnName": "difficulty",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "date",
"columnName": "date",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "time",
"columnName": "time",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"board_uid"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": [
{
"table": "board",
"onDelete": "NO ACTION",
"onUpdate": "NO ACTION",
"columns": [
"board_uid"
],
"referencedColumns": [
"uid"
]
}
]
},
{
"tableName": "board",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `initial_board` TEXT NOT NULL, `solved_board` TEXT NOT NULL, `difficulty` INTEGER NOT NULL, `type` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "uid",
"columnName": "uid",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "initialBoard",
"columnName": "initial_board",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "solvedBoard",
"columnName": "solved_board",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "difficulty",
"columnName": "difficulty",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"uid"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "saved_game",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`board_uid` INTEGER NOT NULL, `current_board` TEXT NOT NULL, `notes` TEXT NOT NULL, `timer` INTEGER NOT NULL, `completed` INTEGER NOT NULL DEFAULT false, `give_up` INTEGER NOT NULL DEFAULT false, `mistakes` INTEGER NOT NULL DEFAULT 0, `can_continue` INTEGER NOT NULL, PRIMARY KEY(`board_uid`), FOREIGN KEY(`board_uid`) REFERENCES `board`(`uid`) ON UPDATE NO ACTION ON DELETE NO ACTION )",
"fields": [
{
"fieldPath": "uid",
"columnName": "board_uid",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "currentBoard",
"columnName": "current_board",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "notes",
"columnName": "notes",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "timer",
"columnName": "timer",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "completed",
"columnName": "completed",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "false"
},
{
"fieldPath": "giveUp",
"columnName": "give_up",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "false"
},
{
"fieldPath": "mistakes",
"columnName": "mistakes",
"affinity": "INTEGER",
"notNull": true,
"defaultValue": "0"
},
{
"fieldPath": "canContinue",
"columnName": "can_continue",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"board_uid"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": [
{
"table": "board",
"onDelete": "NO ACTION",
"onUpdate": "NO ACTION",
"columns": [
"board_uid"
],
"referencedColumns": [
"uid"
]
}
]
}
],
"views": [],
"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, '51ab67c93ed9cb247ab45f24664e3d38')"
]
}
}