]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
some updates to the commit for multi-tenant I just did
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Aug 2024 15:13:27 +0000 (11:13 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Aug 2024 15:13:27 +0000 (11:13 -0400)
Change-Id: I5e9c03697af5d65f68c37bf4afd6caaf73ce270a

docs/build/cookbook.rst

index a91217309f770136d5c9039c64f17b048ce0ac89..ce5fb5438e8ced95aef47fc76ab5794359bd223f 100644 (file)
@@ -789,14 +789,19 @@ the approach must involve running Alembic multiple times against different
 database URLs.
 
 One common approach to multi-tenancy, particularly on the PostgreSQL database,
-is to install tenants within **individual PostgreSQL schemas**.  When using
-PostgreSQL's schemas, a special variable ``search_path`` is offered that is
-intended to assist with targeting of different schemas.
-
-When using MySQL or MariaDB databases, a similar command is available at the
-SQL level called the``use`` command.  This command may be used in a similar
-fashion as that of PostgreSQL's ``search_path`` variable to achieve a similar
-effect.
+is to install tenants within **individual PostgreSQL schemas**; similarly
+when using MySQL/MariaDB, **individual MySQL/MariaDB databases** are addressed
+in the same way as "schemas" on PostgreSQL.
+
+When using PostgreSQL's schemas, a special variable ``search_path`` is offered
+that is intended to assist with targeting of different schemas.  When using
+MySQL or MariaDB databases, a similar command is available at the SQL level
+called the ``USE`` command.  This command may be used in a similar fashion as
+that of PostgreSQL's ``search_path`` variable to achieve a similar effect.
+
+Overall, this recipe can be used on **any database that supports runtime
+modification of the current "tenant" via SQL commands on a particular
+connection**.
 
 .. note::  SQLAlchemy includes a system of directing a common set of
    ``Table`` metadata to many schemas called `schema_translate_map <https://docs.sqlalchemy.org/core/connections.html#translation-of-schema-names>`_.   Alembic at the time