lorehub
Version:
Capture and surface the collective wisdom of your codebase
627 lines • 16.1 kB
JSON
{
"version": "6",
"dialect": "sqlite",
"id": "dfc911e3-388c-47cf-b60f-05b8ef8a5653",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"lore_relations": {
"name": "lore_relations",
"columns": {
"from_lore_id": {
"name": "from_lore_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"to_lore_id": {
"name": "to_lore_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"strength": {
"name": "strength",
"type": "real",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1
},
"metadata": {
"name": "metadata",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"idx_lore_relations_from": {
"name": "idx_lore_relations_from",
"columns": [
"from_lore_id"
],
"isUnique": false
},
"idx_lore_relations_to": {
"name": "idx_lore_relations_to",
"columns": [
"to_lore_id"
],
"isUnique": false
}
},
"foreignKeys": {
"lore_relations_from_lore_id_lores_id_fk": {
"name": "lore_relations_from_lore_id_lores_id_fk",
"tableFrom": "lore_relations",
"tableTo": "lores",
"columnsFrom": [
"from_lore_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"lore_relations_to_lore_id_lores_id_fk": {
"name": "lore_relations_to_lore_id_lores_id_fk",
"tableFrom": "lore_relations",
"tableTo": "lores",
"columnsFrom": [
"to_lore_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"lore_relations_from_lore_id_to_lore_id_type_pk": {
"columns": [
"from_lore_id",
"to_lore_id",
"type"
],
"name": "lore_relations_from_lore_id_to_lore_id_type_pk"
}
},
"uniqueConstraints": {},
"checkConstraints": {}
},
"lores": {
"name": "lores",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"realm_id": {
"name": "realm_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"why": {
"name": "why",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"provinces": {
"name": "provinces",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'[]'"
},
"sigils": {
"name": "sigils",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'[]'"
},
"confidence": {
"name": "confidence",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 80
},
"origin": {
"name": "origin",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'living'"
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"idx_lores_realm_id": {
"name": "idx_lores_realm_id",
"columns": [
"realm_id"
],
"isUnique": false
},
"idx_lores_type": {
"name": "idx_lores_type",
"columns": [
"type"
],
"isUnique": false
},
"idx_lores_status": {
"name": "idx_lores_status",
"columns": [
"status"
],
"isUnique": false
},
"idx_lores_content": {
"name": "idx_lores_content",
"columns": [
"content"
],
"isUnique": false
}
},
"foreignKeys": {
"lores_realm_id_realms_id_fk": {
"name": "lores_realm_id_realms_id_fk",
"tableFrom": "lores",
"tableTo": "realms",
"columnsFrom": [
"realm_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"realm_workspaces": {
"name": "realm_workspaces",
"columns": {
"realm_id": {
"name": "realm_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"workspace_id": {
"name": "workspace_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"idx_realm_workspaces_realm": {
"name": "idx_realm_workspaces_realm",
"columns": [
"realm_id"
],
"isUnique": false
},
"idx_realm_workspaces_workspace": {
"name": "idx_realm_workspaces_workspace",
"columns": [
"workspace_id"
],
"isUnique": false
}
},
"foreignKeys": {
"realm_workspaces_realm_id_realms_id_fk": {
"name": "realm_workspaces_realm_id_realms_id_fk",
"tableFrom": "realm_workspaces",
"tableTo": "realms",
"columnsFrom": [
"realm_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"realm_workspaces_workspace_id_workspaces_id_fk": {
"name": "realm_workspaces_workspace_id_workspaces_id_fk",
"tableFrom": "realm_workspaces",
"tableTo": "workspaces",
"columnsFrom": [
"workspace_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"realm_workspaces_realm_id_workspace_id_pk": {
"columns": [
"realm_id",
"workspace_id"
],
"name": "realm_workspaces_realm_id_workspace_id_pk"
}
},
"uniqueConstraints": {},
"checkConstraints": {}
},
"realms": {
"name": "realms",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"path": {
"name": "path",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"git_remote": {
"name": "git_remote",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"is_monorepo": {
"name": "is_monorepo",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"provinces": {
"name": "provinces",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'[]'"
},
"last_seen": {
"name": "last_seen",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"realms_path_unique": {
"name": "realms_path_unique",
"columns": [
"path"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"sync_state": {
"name": "sync_state",
"columns": {
"workspace_id": {
"name": "workspace_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"device_id": {
"name": "device_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"last_sync_at": {
"name": "last_sync_at",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"last_sync_commit": {
"name": "last_sync_commit",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"vector_clock": {
"name": "vector_clock",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"pending_changes": {
"name": "pending_changes",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"idx_sync_state_workspace": {
"name": "idx_sync_state_workspace",
"columns": [
"workspace_id"
],
"isUnique": false
}
},
"foreignKeys": {
"sync_state_workspace_id_workspaces_id_fk": {
"name": "sync_state_workspace_id_workspaces_id_fk",
"tableFrom": "sync_state",
"tableTo": "workspaces",
"columnsFrom": [
"workspace_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"sync_state_workspace_id_device_id_pk": {
"columns": [
"workspace_id",
"device_id"
],
"name": "sync_state_workspace_id_device_id_pk"
}
},
"uniqueConstraints": {},
"checkConstraints": {}
},
"workspaces": {
"name": "workspaces",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"sync_enabled": {
"name": "sync_enabled",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"sync_repo": {
"name": "sync_repo",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"sync_branch": {
"name": "sync_branch",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "'main'"
},
"auto_sync": {
"name": "auto_sync",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": true
},
"sync_interval": {
"name": "sync_interval",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 300
},
"filters": {
"name": "filters",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"is_default": {
"name": "is_default",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"workspaces_name_unique": {
"name": "workspaces_name_unique",
"columns": [
"name"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}