From d95e15cac59dc449f712f51183462a8688a51086 Mon Sep 17 00:00:00 2001 From: Chris Dary Date: Fri, 24 Sep 2021 15:47:08 -0400 Subject: [PATCH] MultiDB README: Add a bit more detail --- alembic/templates/multidb/README | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/alembic/templates/multidb/README b/alembic/templates/multidb/README index 5db219f9..f046ec91 100644 --- a/alembic/templates/multidb/README +++ b/alembic/templates/multidb/README @@ -1 +1,12 @@ -Rudimentary multi-database configuration. \ No newline at end of file +Rudimentary multi-database configuration. + +Multi-DB isn't vastly different from generic. The primary difference is that it +will run the migrations N times (depending on how many databases you have +configured), providing one engine name and associated context for each run. + +That engine name will then allow the migration to restrict what runs within it to +just the appropriate migrations for that engine. You can see this behavior within +the mako template. + +In the provided configuration, you'll need to have `databases` provided in +alembic's config, and an `sqlalchemy.url` provided for each engine name. -- 2.47.2