| } // namespace | } // namespace | ||||
| catalog catalog::open(const std::string& db_path) { | catalog catalog::open(const std::string& db_path) { | ||||
| if (db_path != ":memory:") { | |||||
| fs::create_directories(fs::weakly_canonical(db_path).parent_path()); | |||||
| } | |||||
| auto db = sqlite3::database::open(db_path); | auto db = sqlite3::database::open(db_path); | ||||
| try { | try { | ||||
| ensure_migrated(db); | ensure_migrated(db); |