On Sat, Sep 1, 2018 at 12:50 PM, sector119 wrote:
>
>> if you want individual migration sections for each schema, with or
>> without "schema" written in, there's ways to do all that also but that
>> doesn't seem necessary if you are sharing a single model with multiple
>> identical schemas.
>
>
>
> if you want individual migration sections for each schema, with or
> without "schema" written in, there's ways to do all that also but that
> doesn't seem necessary if you are sharing a single model with multiple
> identical schemas.
>
The problem is that some one might alter some tables
I've spent a long time evaluating this use case and there are a lot of
ways to do it, but ultimately you are saying each schema is identical,
and originally, you just wanted to set "search_path" to each schema,
which is probably how this should be done if each schema is
independent of each other
from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret
On Thu, Aug 30, 2018 at 7:11 AM, sector119 wrote:
> Mike, but in run_migrations_online() I use conn =
> connection.execution_options(schema_translate_map={None: schema_name})
> But I get no schemas at resulting alembic/versions/file.py
can you share your env.py
>
>
> среда, 29 августа 2018 г.,
Mike, but in run_migrations_online() I use conn =
connection.execution_options(schema_translate_map={None: schema_name})
But I get no schemas at resulting alembic/versions/file.py
среда, 29 августа 2018 г., 20:46:07 UTC+3 пользователь Mike Bayer написал:
>
> On Wed, Aug 29, 2018 at 5:12 AM,
On Wed, Aug 29, 2018 at 5:12 AM, sector119 wrote:
> Hello
>
> I have N schemas with the same set of tables, 1 system schema with users,
> groups, ... tables and 6 schemas with streets, organizations, transactions,
> ... tables.
> On those schemas tables I don't set __table_args__ = ({'schema':
Hello
I have N schemas with the same set of tables, 1 system schema with users,
groups, ... tables and 6 schemas with streets, organizations, transactions,
... tables.
On those schemas tables I don't set __table_args__ = ({'schema': SCHEMA},)
I just call dbsession.execute('SET search_path TO