orgzly-android-revived/app/schemas/com.orgzly.android.db.OrgzlyDatabase/158.json
Aleksandar Terentić 8b1cbda5fb Support FILETAGS
Parse #+FILETAGS: from book preface and store on the Book entity.
Filetags are prepended to inherited_tags in NoteView queries so all
notes in a book inherit them. Includes DB migration 157->158 with
backfill of existing books.
2026-02-12 00:31:25 +01:00

1492 lines
No EOL
46 KiB
JSON

{
"formatVersion": 1,
"database": {
"version": 158,
"identityHash": "af6e64f4ca70cffb5c439b7b92e62046",
"entities": [
{
"tableName": "books",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `title` TEXT, `mtime` INTEGER, `is_dummy` INTEGER NOT NULL, `is_deleted` INTEGER, `preface` TEXT, `filetags` TEXT, `is_indented` INTEGER, `used_encoding` TEXT, `detected_encoding` TEXT, `selected_encoding` TEXT, `sync_status` TEXT, `is_modified` INTEGER NOT NULL, `last_action_type` TEXT, `last_action_message` TEXT, `last_action_timestamp` INTEGER)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT"
},
{
"fieldPath": "mtime",
"columnName": "mtime",
"affinity": "INTEGER"
},
{
"fieldPath": "isDummy",
"columnName": "is_dummy",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isDeleted",
"columnName": "is_deleted",
"affinity": "INTEGER"
},
{
"fieldPath": "preface",
"columnName": "preface",
"affinity": "TEXT"
},
{
"fieldPath": "filetags",
"columnName": "filetags",
"affinity": "TEXT"
},
{
"fieldPath": "isIndented",
"columnName": "is_indented",
"affinity": "INTEGER"
},
{
"fieldPath": "usedEncoding",
"columnName": "used_encoding",
"affinity": "TEXT"
},
{
"fieldPath": "detectedEncoding",
"columnName": "detected_encoding",
"affinity": "TEXT"
},
{
"fieldPath": "selectedEncoding",
"columnName": "selected_encoding",
"affinity": "TEXT"
},
{
"fieldPath": "syncStatus",
"columnName": "sync_status",
"affinity": "TEXT"
},
{
"fieldPath": "isModified",
"columnName": "is_modified",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastAction.type",
"columnName": "last_action_type",
"affinity": "TEXT"
},
{
"fieldPath": "lastAction.message",
"columnName": "last_action_message",
"affinity": "TEXT"
},
{
"fieldPath": "lastAction.timestamp",
"columnName": "last_action_timestamp",
"affinity": "INTEGER"
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_books_name",
"unique": true,
"columnNames": [
"name"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_books_name` ON `${TABLE_NAME}` (`name`)"
}
]
},
{
"tableName": "book_links",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`book_id` INTEGER NOT NULL, `repo_id` INTEGER NOT NULL, PRIMARY KEY(`book_id`), FOREIGN KEY(`book_id`) REFERENCES `books`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`repo_id`) REFERENCES `repos`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "bookId",
"columnName": "book_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "repoId",
"columnName": "repo_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"book_id"
]
},
"indices": [
{
"name": "index_book_links_repo_id",
"unique": false,
"columnNames": [
"repo_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_book_links_repo_id` ON `${TABLE_NAME}` (`repo_id`)"
}
],
"foreignKeys": [
{
"table": "books",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"book_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "repos",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"repo_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "book_properties",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`book_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `value` TEXT NOT NULL, PRIMARY KEY(`book_id`, `name`), FOREIGN KEY(`book_id`) REFERENCES `books`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "bookId",
"columnName": "book_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "value",
"columnName": "value",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"book_id",
"name"
]
},
"indices": [
{
"name": "index_book_properties_book_id",
"unique": false,
"columnNames": [
"book_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_book_properties_book_id` ON `${TABLE_NAME}` (`book_id`)"
},
{
"name": "index_book_properties_name",
"unique": false,
"columnNames": [
"name"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_book_properties_name` ON `${TABLE_NAME}` (`name`)"
},
{
"name": "index_book_properties_value",
"unique": false,
"columnNames": [
"value"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_book_properties_value` ON `${TABLE_NAME}` (`value`)"
}
],
"foreignKeys": [
{
"table": "books",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"book_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "book_syncs",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`book_id` INTEGER NOT NULL, `versioned_rook_id` INTEGER NOT NULL, PRIMARY KEY(`book_id`), FOREIGN KEY(`book_id`) REFERENCES `books`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`versioned_rook_id`) REFERENCES `versioned_rooks`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "bookId",
"columnName": "book_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "versionedRookId",
"columnName": "versioned_rook_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"book_id"
]
},
"indices": [
{
"name": "index_book_syncs_versioned_rook_id",
"unique": false,
"columnNames": [
"versioned_rook_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_book_syncs_versioned_rook_id` ON `${TABLE_NAME}` (`versioned_rook_id`)"
}
],
"foreignKeys": [
{
"table": "books",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"book_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "versioned_rooks",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"versioned_rook_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "db_repo_books",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `repo_url` TEXT NOT NULL, `url` TEXT NOT NULL, `revision` TEXT NOT NULL, `mtime` INTEGER NOT NULL, `content` TEXT NOT NULL, `created_at` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "repoUrl",
"columnName": "repo_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "revision",
"columnName": "revision",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "mtime",
"columnName": "mtime",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "created_at",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_db_repo_books_repo_url_url",
"unique": true,
"columnNames": [
"repo_url",
"url"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_db_repo_books_repo_url_url` ON `${TABLE_NAME}` (`repo_url`, `url`)"
}
]
},
{
"tableName": "notes",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `is_cut` INTEGER NOT NULL, `created_at` INTEGER, `title` TEXT NOT NULL, `tags` TEXT, `state` TEXT, `priority` TEXT, `content` TEXT, `content_line_count` INTEGER NOT NULL, `scheduled_range_id` INTEGER, `deadline_range_id` INTEGER, `closed_range_id` INTEGER, `clock_range_id` INTEGER, `book_id` INTEGER NOT NULL, `lft` INTEGER NOT NULL, `rgt` INTEGER NOT NULL, `level` INTEGER NOT NULL, `parent_id` INTEGER NOT NULL, `folded_under_id` INTEGER NOT NULL, `is_folded` INTEGER NOT NULL, `descendants_count` INTEGER NOT NULL, FOREIGN KEY(`book_id`) REFERENCES `books`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`scheduled_range_id`) REFERENCES `org_ranges`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`deadline_range_id`) REFERENCES `org_ranges`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`closed_range_id`) REFERENCES `org_ranges`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isCut",
"columnName": "is_cut",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "created_at",
"affinity": "INTEGER"
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "tags",
"columnName": "tags",
"affinity": "TEXT"
},
{
"fieldPath": "state",
"columnName": "state",
"affinity": "TEXT"
},
{
"fieldPath": "priority",
"columnName": "priority",
"affinity": "TEXT"
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT"
},
{
"fieldPath": "contentLineCount",
"columnName": "content_line_count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "scheduledRangeId",
"columnName": "scheduled_range_id",
"affinity": "INTEGER"
},
{
"fieldPath": "deadlineRangeId",
"columnName": "deadline_range_id",
"affinity": "INTEGER"
},
{
"fieldPath": "closedRangeId",
"columnName": "closed_range_id",
"affinity": "INTEGER"
},
{
"fieldPath": "clockRangeId",
"columnName": "clock_range_id",
"affinity": "INTEGER"
},
{
"fieldPath": "position.bookId",
"columnName": "book_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "position.lft",
"columnName": "lft",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "position.rgt",
"columnName": "rgt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "position.level",
"columnName": "level",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "position.parentId",
"columnName": "parent_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "position.foldedUnderId",
"columnName": "folded_under_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "position.isFolded",
"columnName": "is_folded",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "position.descendantsCount",
"columnName": "descendants_count",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_notes_title",
"unique": false,
"columnNames": [
"title"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_title` ON `${TABLE_NAME}` (`title`)"
},
{
"name": "index_notes_tags",
"unique": false,
"columnNames": [
"tags"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_tags` ON `${TABLE_NAME}` (`tags`)"
},
{
"name": "index_notes_content",
"unique": false,
"columnNames": [
"content"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_content` ON `${TABLE_NAME}` (`content`)"
},
{
"name": "index_notes_book_id",
"unique": false,
"columnNames": [
"book_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_book_id` ON `${TABLE_NAME}` (`book_id`)"
},
{
"name": "index_notes_is_cut",
"unique": false,
"columnNames": [
"is_cut"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_is_cut` ON `${TABLE_NAME}` (`is_cut`)"
},
{
"name": "index_notes_lft",
"unique": false,
"columnNames": [
"lft"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_lft` ON `${TABLE_NAME}` (`lft`)"
},
{
"name": "index_notes_rgt",
"unique": false,
"columnNames": [
"rgt"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_rgt` ON `${TABLE_NAME}` (`rgt`)"
},
{
"name": "index_notes_is_folded",
"unique": false,
"columnNames": [
"is_folded"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_is_folded` ON `${TABLE_NAME}` (`is_folded`)"
},
{
"name": "index_notes_folded_under_id",
"unique": false,
"columnNames": [
"folded_under_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_folded_under_id` ON `${TABLE_NAME}` (`folded_under_id`)"
},
{
"name": "index_notes_parent_id",
"unique": false,
"columnNames": [
"parent_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_parent_id` ON `${TABLE_NAME}` (`parent_id`)"
},
{
"name": "index_notes_descendants_count",
"unique": false,
"columnNames": [
"descendants_count"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_descendants_count` ON `${TABLE_NAME}` (`descendants_count`)"
},
{
"name": "index_notes_scheduled_range_id",
"unique": false,
"columnNames": [
"scheduled_range_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_scheduled_range_id` ON `${TABLE_NAME}` (`scheduled_range_id`)"
},
{
"name": "index_notes_deadline_range_id",
"unique": false,
"columnNames": [
"deadline_range_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_deadline_range_id` ON `${TABLE_NAME}` (`deadline_range_id`)"
},
{
"name": "index_notes_closed_range_id",
"unique": false,
"columnNames": [
"closed_range_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_notes_closed_range_id` ON `${TABLE_NAME}` (`closed_range_id`)"
}
],
"foreignKeys": [
{
"table": "books",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"book_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "org_ranges",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"scheduled_range_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "org_ranges",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"deadline_range_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "org_ranges",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"closed_range_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "note_ancestors",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`note_id` INTEGER NOT NULL, `book_id` INTEGER NOT NULL, `ancestor_note_id` INTEGER NOT NULL, PRIMARY KEY(`book_id`, `note_id`, `ancestor_note_id`), FOREIGN KEY(`book_id`) REFERENCES `books`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`note_id`) REFERENCES `notes`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`ancestor_note_id`) REFERENCES `notes`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "noteId",
"columnName": "note_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "bookId",
"columnName": "book_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "ancestorNoteId",
"columnName": "ancestor_note_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"book_id",
"note_id",
"ancestor_note_id"
]
},
"indices": [
{
"name": "index_note_ancestors_book_id",
"unique": false,
"columnNames": [
"book_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_note_ancestors_book_id` ON `${TABLE_NAME}` (`book_id`)"
},
{
"name": "index_note_ancestors_note_id",
"unique": false,
"columnNames": [
"note_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_note_ancestors_note_id` ON `${TABLE_NAME}` (`note_id`)"
},
{
"name": "index_note_ancestors_ancestor_note_id",
"unique": false,
"columnNames": [
"ancestor_note_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_note_ancestors_ancestor_note_id` ON `${TABLE_NAME}` (`ancestor_note_id`)"
}
],
"foreignKeys": [
{
"table": "books",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"book_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "notes",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"note_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "notes",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"ancestor_note_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "note_properties",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`note_id` INTEGER NOT NULL, `position` INTEGER NOT NULL, `name` TEXT NOT NULL, `value` TEXT NOT NULL, PRIMARY KEY(`note_id`, `position`), FOREIGN KEY(`note_id`) REFERENCES `notes`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "noteId",
"columnName": "note_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "position",
"columnName": "position",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "value",
"columnName": "value",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"note_id",
"position"
]
},
"indices": [
{
"name": "index_note_properties_note_id",
"unique": false,
"columnNames": [
"note_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_note_properties_note_id` ON `${TABLE_NAME}` (`note_id`)"
},
{
"name": "index_note_properties_position",
"unique": false,
"columnNames": [
"position"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_note_properties_position` ON `${TABLE_NAME}` (`position`)"
},
{
"name": "index_note_properties_name",
"unique": false,
"columnNames": [
"name"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_note_properties_name` ON `${TABLE_NAME}` (`name`)"
},
{
"name": "index_note_properties_value",
"unique": false,
"columnNames": [
"value"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_note_properties_value` ON `${TABLE_NAME}` (`value`)"
}
],
"foreignKeys": [
{
"table": "notes",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"note_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "note_events",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`note_id` INTEGER NOT NULL, `org_range_id` INTEGER NOT NULL, PRIMARY KEY(`note_id`, `org_range_id`), FOREIGN KEY(`note_id`) REFERENCES `notes`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`org_range_id`) REFERENCES `org_ranges`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "noteId",
"columnName": "note_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "orgRangeId",
"columnName": "org_range_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"note_id",
"org_range_id"
]
},
"indices": [
{
"name": "index_note_events_note_id",
"unique": false,
"columnNames": [
"note_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_note_events_note_id` ON `${TABLE_NAME}` (`note_id`)"
},
{
"name": "index_note_events_org_range_id",
"unique": false,
"columnNames": [
"org_range_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_note_events_org_range_id` ON `${TABLE_NAME}` (`org_range_id`)"
}
],
"foreignKeys": [
{
"table": "notes",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"note_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "org_ranges",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"org_range_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "org_ranges",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `string` TEXT NOT NULL, `start_timestamp_id` INTEGER NOT NULL, `end_timestamp_id` INTEGER, `difference` INTEGER, FOREIGN KEY(`start_timestamp_id`) REFERENCES `org_timestamps`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`end_timestamp_id`) REFERENCES `org_timestamps`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "string",
"columnName": "string",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "startTimestampId",
"columnName": "start_timestamp_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "endTimestampId",
"columnName": "end_timestamp_id",
"affinity": "INTEGER"
},
{
"fieldPath": "difference",
"columnName": "difference",
"affinity": "INTEGER"
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_org_ranges_string",
"unique": true,
"columnNames": [
"string"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_org_ranges_string` ON `${TABLE_NAME}` (`string`)"
},
{
"name": "index_org_ranges_start_timestamp_id",
"unique": false,
"columnNames": [
"start_timestamp_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_org_ranges_start_timestamp_id` ON `${TABLE_NAME}` (`start_timestamp_id`)"
},
{
"name": "index_org_ranges_end_timestamp_id",
"unique": false,
"columnNames": [
"end_timestamp_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_org_ranges_end_timestamp_id` ON `${TABLE_NAME}` (`end_timestamp_id`)"
}
],
"foreignKeys": [
{
"table": "org_timestamps",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"start_timestamp_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "org_timestamps",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"end_timestamp_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "org_timestamps",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `string` TEXT NOT NULL, `is_active` INTEGER NOT NULL, `year` INTEGER NOT NULL, `month` INTEGER NOT NULL, `day` INTEGER NOT NULL, `hour` INTEGER, `minute` INTEGER, `second` INTEGER, `end_hour` INTEGER, `end_minute` INTEGER, `end_second` INTEGER, `repeater_type` INTEGER, `repeater_value` INTEGER, `repeater_unit` INTEGER, `habit_deadline_value` INTEGER, `habit_deadline_unit` INTEGER, `delay_type` INTEGER, `delay_value` INTEGER, `delay_unit` INTEGER, `timestamp` INTEGER NOT NULL, `end_timestamp` INTEGER)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "string",
"columnName": "string",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isActive",
"columnName": "is_active",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "year",
"columnName": "year",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "month",
"columnName": "month",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "day",
"columnName": "day",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "hour",
"columnName": "hour",
"affinity": "INTEGER"
},
{
"fieldPath": "minute",
"columnName": "minute",
"affinity": "INTEGER"
},
{
"fieldPath": "second",
"columnName": "second",
"affinity": "INTEGER"
},
{
"fieldPath": "endHour",
"columnName": "end_hour",
"affinity": "INTEGER"
},
{
"fieldPath": "endMinute",
"columnName": "end_minute",
"affinity": "INTEGER"
},
{
"fieldPath": "endSecond",
"columnName": "end_second",
"affinity": "INTEGER"
},
{
"fieldPath": "repeaterType",
"columnName": "repeater_type",
"affinity": "INTEGER"
},
{
"fieldPath": "repeaterValue",
"columnName": "repeater_value",
"affinity": "INTEGER"
},
{
"fieldPath": "repeaterUnit",
"columnName": "repeater_unit",
"affinity": "INTEGER"
},
{
"fieldPath": "habitDeadlineValue",
"columnName": "habit_deadline_value",
"affinity": "INTEGER"
},
{
"fieldPath": "habitDeadlineUnit",
"columnName": "habit_deadline_unit",
"affinity": "INTEGER"
},
{
"fieldPath": "delayType",
"columnName": "delay_type",
"affinity": "INTEGER"
},
{
"fieldPath": "delayValue",
"columnName": "delay_value",
"affinity": "INTEGER"
},
{
"fieldPath": "delayUnit",
"columnName": "delay_unit",
"affinity": "INTEGER"
},
{
"fieldPath": "timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "endTimestamp",
"columnName": "end_timestamp",
"affinity": "INTEGER"
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_org_timestamps_string",
"unique": true,
"columnNames": [
"string"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_org_timestamps_string` ON `${TABLE_NAME}` (`string`)"
},
{
"name": "index_org_timestamps_timestamp",
"unique": false,
"columnNames": [
"timestamp"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_org_timestamps_timestamp` ON `${TABLE_NAME}` (`timestamp`)"
},
{
"name": "index_org_timestamps_end_timestamp",
"unique": false,
"columnNames": [
"end_timestamp"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_org_timestamps_end_timestamp` ON `${TABLE_NAME}` (`end_timestamp`)"
}
]
},
{
"tableName": "repos",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` INTEGER NOT NULL, `url` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_repos_url",
"unique": true,
"columnNames": [
"url"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_repos_url` ON `${TABLE_NAME}` (`url`)"
}
]
},
{
"tableName": "rooks",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `repo_id` INTEGER NOT NULL, `rook_url_id` INTEGER NOT NULL, FOREIGN KEY(`repo_id`) REFERENCES `repos`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`rook_url_id`) REFERENCES `rook_urls`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "repoId",
"columnName": "repo_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "rookUrlId",
"columnName": "rook_url_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_rooks_repo_id_rook_url_id",
"unique": true,
"columnNames": [
"repo_id",
"rook_url_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_rooks_repo_id_rook_url_id` ON `${TABLE_NAME}` (`repo_id`, `rook_url_id`)"
},
{
"name": "index_rooks_rook_url_id",
"unique": false,
"columnNames": [
"rook_url_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_rooks_rook_url_id` ON `${TABLE_NAME}` (`rook_url_id`)"
}
],
"foreignKeys": [
{
"table": "repos",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"repo_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "rook_urls",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"rook_url_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "rook_urls",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `url` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_rook_urls_url",
"unique": true,
"columnNames": [
"url"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_rook_urls_url` ON `${TABLE_NAME}` (`url`)"
}
]
},
{
"tableName": "searches",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `query` TEXT NOT NULL, `position` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "query",
"columnName": "query",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "position",
"columnName": "position",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
}
},
{
"tableName": "versioned_rooks",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `rook_id` INTEGER NOT NULL, `rook_revision` TEXT NOT NULL, `rook_mtime` INTEGER NOT NULL, FOREIGN KEY(`rook_id`) REFERENCES `rooks`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "rookId",
"columnName": "rook_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "rookRevision",
"columnName": "rook_revision",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "rookMtime",
"columnName": "rook_mtime",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_versioned_rooks_rook_id",
"unique": false,
"columnNames": [
"rook_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_versioned_rooks_rook_id` ON `${TABLE_NAME}` (`rook_id`)"
}
],
"foreignKeys": [
{
"table": "rooks",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"rook_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "app_logs",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `name` TEXT NOT NULL, `message` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "message",
"columnName": "message",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_app_logs_timestamp",
"unique": false,
"columnNames": [
"timestamp"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_app_logs_timestamp` ON `${TABLE_NAME}` (`timestamp`)"
},
{
"name": "index_app_logs_name",
"unique": false,
"columnNames": [
"name"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_app_logs_name` ON `${TABLE_NAME}` (`name`)"
}
]
}
],
"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, 'af6e64f4ca70cffb5c439b7b92e62046')"
]
}
}