-
|
I have a number of microservices that own their own schemas within a single postgres instance and database. On seaorm 1.x I can't seem to find a way to specify where these migrations tables live. Ideally I'd be able to host one migrations table per schema in my database, but I can't figure out how to specify an alternate schema that isn't the "public" schema. When they all share the same seaql_migrations table, each service expects a migration file to exist for themselves that show up in the table.
Is there a way to do this with seaorm 1.x and within the same postgres database? I'm hoping to avoid using multiple databases in this instance. I've been struggling to find any documentation about this for 1.x, either specifying a custom seaql_migrations table or otherwise. Just to clarify the use-case here: Let me know if you need more information and I'll do my best to provide it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I was able to find the answer! I'm not sure how I missed this piece of the documentation: https://www.sea-ql.org/SeaORM/docs/1.1.x/migration/setting-up-migration/#migration-table |
Beta Was this translation helpful? Give feedback.
I was able to find the answer!
I'm not sure how I missed this piece of the documentation:
fn migration_table_name() -> sea_orm::DynIden { Alias::new("override_migration_table_name").into_iden() }https://www.sea-ql.org/SeaORM/docs/1.1.x/migration/setting-up-migration/#migration-table