327 lines
9.9 KiB
JSON
327 lines
9.9 KiB
JSON
{
|
|
"formatVersion": 1,
|
|
"database": {
|
|
"version": 23,
|
|
"identityHash": "3935c1bee4ca4419c0663e9140388ab5",
|
|
"entities": [
|
|
{
|
|
"tableName": "notes",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `library_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `body` TEXT NOT NULL, `position` INTEGER NOT NULL, `creation_date` TEXT NOT NULL, `is_pinned` INTEGER NOT NULL, `is_archived` INTEGER NOT NULL, `reminder_date` TEXT, `is_vaulted` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY(`library_id`) REFERENCES `libraries`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "id",
|
|
"columnName": "id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "libraryId",
|
|
"columnName": "library_id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "title",
|
|
"columnName": "title",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "body",
|
|
"columnName": "body",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "position",
|
|
"columnName": "position",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "creationDate",
|
|
"columnName": "creation_date",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "isPinned",
|
|
"columnName": "is_pinned",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "isArchived",
|
|
"columnName": "is_archived",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "reminderDate",
|
|
"columnName": "reminder_date",
|
|
"affinity": "TEXT",
|
|
"notNull": false
|
|
},
|
|
{
|
|
"fieldPath": "isVaulted",
|
|
"columnName": "is_vaulted",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "0"
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"columnNames": [
|
|
"id"
|
|
],
|
|
"autoGenerate": true
|
|
},
|
|
"indices": [],
|
|
"foreignKeys": [
|
|
{
|
|
"table": "libraries",
|
|
"onDelete": "CASCADE",
|
|
"onUpdate": "NO ACTION",
|
|
"columns": [
|
|
"library_id"
|
|
],
|
|
"referencedColumns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"tableName": "libraries",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `title` TEXT NOT NULL, `position` INTEGER NOT NULL, `color` INTEGER NOT NULL, `creation_date` TEXT NOT NULL, `layout` INTEGER NOT NULL DEFAULT 0, `note_preview_size` INTEGER NOT NULL DEFAULT 15, `is_archived` INTEGER NOT NULL DEFAULT 0, `is_pinned` INTEGER NOT NULL DEFAULT 0, `is_show_note_creation_date` INTEGER NOT NULL DEFAULT 0, `is_set_new_note_cursor_on_title` INTEGER NOT NULL DEFAULT 0, `sorting_type` INTEGER NOT NULL DEFAULT 1, `sorting_order` INTEGER NOT NULL DEFAULT 1, `grouping` INTEGER NOT NULL DEFAULT 0, `is_vaulted` INTEGER NOT NULL DEFAULT 0)",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "id",
|
|
"columnName": "id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "title",
|
|
"columnName": "title",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "position",
|
|
"columnName": "position",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "color",
|
|
"columnName": "color",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "creationDate",
|
|
"columnName": "creation_date",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "layout",
|
|
"columnName": "layout",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "0"
|
|
},
|
|
{
|
|
"fieldPath": "notePreviewSize",
|
|
"columnName": "note_preview_size",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "15"
|
|
},
|
|
{
|
|
"fieldPath": "isArchived",
|
|
"columnName": "is_archived",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "0"
|
|
},
|
|
{
|
|
"fieldPath": "isPinned",
|
|
"columnName": "is_pinned",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "0"
|
|
},
|
|
{
|
|
"fieldPath": "isShowNoteCreationDate",
|
|
"columnName": "is_show_note_creation_date",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "0"
|
|
},
|
|
{
|
|
"fieldPath": "isSetNewNoteCursorOnTitle",
|
|
"columnName": "is_set_new_note_cursor_on_title",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "0"
|
|
},
|
|
{
|
|
"fieldPath": "sortingType",
|
|
"columnName": "sorting_type",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "1"
|
|
},
|
|
{
|
|
"fieldPath": "sortingOrder",
|
|
"columnName": "sorting_order",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "1"
|
|
},
|
|
{
|
|
"fieldPath": "grouping",
|
|
"columnName": "grouping",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "0"
|
|
},
|
|
{
|
|
"fieldPath": "isVaulted",
|
|
"columnName": "is_vaulted",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "0"
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"columnNames": [
|
|
"id"
|
|
],
|
|
"autoGenerate": true
|
|
},
|
|
"indices": [],
|
|
"foreignKeys": []
|
|
},
|
|
{
|
|
"tableName": "labels",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `library_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `color` INTEGER NOT NULL, `position` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY(`library_id`) REFERENCES `libraries`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "id",
|
|
"columnName": "id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "libraryId",
|
|
"columnName": "library_id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "title",
|
|
"columnName": "title",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "color",
|
|
"columnName": "color",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "position",
|
|
"columnName": "position",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "0"
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"columnNames": [
|
|
"id"
|
|
],
|
|
"autoGenerate": true
|
|
},
|
|
"indices": [],
|
|
"foreignKeys": [
|
|
{
|
|
"table": "libraries",
|
|
"onDelete": "CASCADE",
|
|
"onUpdate": "NO ACTION",
|
|
"columns": [
|
|
"library_id"
|
|
],
|
|
"referencedColumns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"tableName": "note_labels",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `note_id` INTEGER NOT NULL, `label_id` INTEGER NOT NULL, FOREIGN KEY(`note_id`) REFERENCES `notes`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`label_id`) REFERENCES `labels`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "id",
|
|
"columnName": "id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "noteId",
|
|
"columnName": "note_id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "labelId",
|
|
"columnName": "label_id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"columnNames": [
|
|
"id"
|
|
],
|
|
"autoGenerate": true
|
|
},
|
|
"indices": [],
|
|
"foreignKeys": [
|
|
{
|
|
"table": "notes",
|
|
"onDelete": "CASCADE",
|
|
"onUpdate": "NO ACTION",
|
|
"columns": [
|
|
"note_id"
|
|
],
|
|
"referencedColumns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"table": "labels",
|
|
"onDelete": "CASCADE",
|
|
"onUpdate": "NO ACTION",
|
|
"columns": [
|
|
"label_id"
|
|
],
|
|
"referencedColumns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"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, '3935c1bee4ca4419c0663e9140388ab5')"
|
|
]
|
|
}
|
|
} |