feat: add a new index for entity_id in table attribute

This commit is contained in:
2026-02-24 07:36:15 +01:00
parent 8d7b3592de
commit e30dcbb9c9

View File

@@ -23,6 +23,7 @@ pub fn run(path: &path::Path) -> result::Result<(), FailedTo> {
CREATE INDEX IF NOT EXISTS entity_class ON entity (class); CREATE INDEX IF NOT EXISTS entity_class ON entity (class);
CREATE INDEX IF NOT EXISTS entity_subclass ON entity (subclass); CREATE INDEX IF NOT EXISTS entity_subclass ON entity (subclass);
CREATE INDEX IF NOT EXISTS attribute_id ON attribute (id); CREATE INDEX IF NOT EXISTS attribute_id ON attribute (id);
CREATE INDEX IF NOT EXISTS attribute_entity_id ON attribute (entity_id);
"#; "#;
let connection = Connection::open(path).map_err(|_| sqlite::FailedTo::OpenConnection)?; let connection = Connection::open(path).map_err(|_| sqlite::FailedTo::OpenConnection)?;
connection connection