cognee_database/migrator/mod.rs
1use sea_orm_migration::prelude::*;
2
3mod m20260914_000001_baseline;
4
5pub struct Migrator;
6
7/// OSS core migrations, exposed so closed downstream crates (e.g. the
8/// closed `cognee-access-control::Migrator`) can compose this list with
9/// their own additional migrations and register the merged set.
10///
11/// The OSS [`Migrator`] simply delegates to this accessor so behaviour is
12/// unchanged for OSS-only builds.
13pub fn core_migrations() -> Vec<Box<dyn MigrationTrait>> {
14 vec![Box::new(m20260914_000001_baseline::Migration)]
15}
16
17#[async_trait::async_trait]
18impl MigratorTrait for Migrator {
19 fn migrations() -> Vec<Box<dyn MigrationTrait>> {
20 core_migrations()
21 }
22}