Files
aitsc/.venv/Lib/site-packages/alembic/runtime/__pycache__/migration.cpython-312.pyc

466 lines
58 KiB
Plaintext
Raw Normal View History

2025-02-23 09:07:52 +08:00
<EFBFBD>
2025-08-17 19:29:42 +08:00
㺡h0<68><00><01><><00>ddlmZddlmZddlmZddlZddlZddlmZddlm Z ddlm
2025-02-23 09:07:52 +08:00
Z
ddlm Z dd lm Z dd
lm Z dd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddl!m"Z"ddl#m$Z$ddl%m&Z&erNddlm'Z'ddlm(Z(dd l)m*Z*dd!l)m+Z+dd"l,m-Z-dd#l.m/Z/d$d%l0m1Z1dd&l2m3Z3dd'l4m5Z5dd(l4m6Z6dd)l7m8Z8dd*l7m9Z9dd+l7m:Z:ejve<<3C>Z=Gd,<2C>d-<2D>Z>Gd.<2E>d/<2F>Z?Gd0<64>d1<64>Z@Gd2<64>d3<64>ZAGd4<64>d5<64>ZBGd6<64>d7eB<65>ZCGd8<64>d9eB<65>ZDy):<3A>)<01> annotations)<01>contextmanager)<01> nullcontextN)<01>Any)<01>Callable)<01>cast)<01>
Collection)<01>ContextManager)<01>Dict)<01>Iterable)<01>Iterator)<01>List)<01>Optional)<01>Set)<01>Tuple)<01> TYPE_CHECKING)<01>Union)<01>Column)<01>literal_column)<01>Engine)<01>url)<01>MockEngineStrategy<67>)<01>ddl)<01>util)<01> sqla_compat)<01> EncodedIO)<01>_select)<01>Dialect)<01>URL)<01>
Connection)<01> Transaction)<01>MockConnection)<01>
Executable<EFBFBD>)<01>EnvironmentContext)<01>Config)<01>Script)<01>ScriptDirectory)<01>_RevisionOrBase)<01>Revision)<01> RevisionMapc<01>F<00>eZdZdd<01>Zed d<02><04>Zd
d<03>Zd
2025-08-17 19:29:42 +08:00
d<04>Zd d<05>Zd d<06>Z y) <0A>_ProxyTransactionc<01><00>||_y<00>N)<01>migration_context)<02>selfr1s <20>CD:\wxxcx\aitsc\.venv\Lib\site-packages\alembic\runtime\migration.py<70>__init__z_ProxyTransaction.__init__9s
2025-02-23 09:07:52 +08:00
<00><00>!2<><04><1E>c<01>.<00>|jjSr0)r1<00> _transaction<6F>r2s r3<00>_proxied_transactionz&_ProxyTransaction._proxied_transaction<s<00><00><13>%<25>%<25>2<>2<>2r5c<01>f<00>|j}|<01>J<00>|j<00>d|j_yr0)r9<00>rollbackr1r7<00>r2<00>ts r3r;z_ProxyTransaction.rollback@s.<00><00> <10> %<25> %<25><01><10>}<7D><1C>}<7D> <09>
<EFBFBD>
<EFBFBD> <0C>.2<EFBFBD><04><1E><1E>+r5c<01>f<00>|j}|<01>J<00>|j<00>d|j_yr0)r9<00>commitr1r7r<s r3r?z_ProxyTransaction.commitFs.<00><00> <10> %<25> %<25><01><10>}<7D><1C>}<7D> <09><08><08>
<EFBFBD>.2<EFBFBD><04><1E><1E>+r5c<01><00>|Sr0<00>r8s r3<00> __enter__z_ProxyTransaction.__enter__Ls<00><00><13> r5c<01>z<00>|j<00>/|jj|||<03>d|j_yyr0)r9<00>__exit__r1r7)r2<00>type_<65>value<75> tracebacks r3rDz_ProxyTransaction.__exit__Os9<00><00> <0F> $<24> $<24> 0<> <10> %<25> %<25> .<2E> .<2E>u<EFBFBD>e<EFBFBD>Y<EFBFBD> G<>26<32>D<EFBFBD> "<22> "<22> /<2F> 1r5N)r1<00>MigrationContext<78>return<72>None)rIzOptional[Transaction])rIrJ)rIr.)rErrFrrGrrIrJ)
<EFBFBD>__name__<5F>
__module__<EFBFBD> __qualname__r4<00>propertyr9r;r?rBrDrAr5r3r.r.8s/<00><00>3<><0E>3<><0E>3<>3<> 3<> <14>7r5r.c<01>F<00>eZdZdZ d dd<03>Ze d dd<04><05>Zedd<05><04>Z d dd<06>Z dd<07>Z
dd<08>Z ddd <09>Z dd
<EFBFBD>Z dd <0B>Zd d <0C>Zdd <0A>Z d d!d<0E>Z d"d<0F>Zed#d<10><04>Zed$d<11><04>Z d%d<12>Z d&d<13>Zy)'rHa<>Represent the database state made available to a migration
script.
:class:`.MigrationContext` is the front end to an actual
database connection, or alternatively a string output
stream given a particular database dialect,
from an Alembic perspective.
When inside the ``env.py`` script, the :class:`.MigrationContext`
is available via the
:meth:`.EnvironmentContext.get_context` method,
which is available at ``alembic.context``::
# from within env.py script
from alembic import context
migration_context = context.get_context()
For usage outside of an ``env.py`` script, such as for
utility routines that want to check the current version
in the database, the :meth:`.MigrationContext.configure`
method to create new :class:`.MigrationContext` objects.
For example, to get at the current revision in the
database using :meth:`.MigrationContext.get_current_revision`::
# in any application, outside of an env.py script
from alembic.migration import MigrationContext
from sqlalchemy import create_engine
engine = create_engine("postgresql://mydatabase")
conn = engine.connect()
context = MigrationContext.configure(conn)
current_rev = context.get_current_revision()
The above context can also be used to produce
Alembic migration operations with an :class:`.Operations`
instance::
# in any application, outside of the normal Alembic environment
from alembic.operations import Operations
op = Operations(context)
op.alter_column("mytable", "somecolumn", nullable=True)
Nc<01><><00>||_||_||_|jd<01>|_|jdd<03>}|jd<04>}|jdd<03>|_|jdd<07>|_d|_|r=ttd|j|<02><00>|_ |j<00>J<00>d|_ n!||_ tj|<02>|_ |jd <09>|_||_|jd
d<03>|_d |vr6t%|jd <0C>xst&j(|d <00>|_n%|jd t&j(<00>|_|jd d<0E>|_|jdd<03>|_|jdd<11>x|_}|jdd<00>x|_}|jd<13>|_t7j8j;|<01>||j|j ||j*|<03>|_|j<j?|||jdd<0E><00><15>|_ tBjEd|j<jFjH<00>|j rtBjEd<17>tBjEd|j<jJrd<19>yd<1A>y)N<>script<70>as_sqlF<6C>transactional_ddl<64>transaction_per_migration<6F>on_version_applyrAr!<00>fn<66>purge<67>output_encoding<6E> output_buffer<65> compare_typeT<65>compare_server_default<6C> version_table<6C>alembic_version<6F>version_table_schema<6D> starting_rev<65>version_table_pk)r\r^r`zContext impl %s.zGenerating static SQLzWill assume %s DDL.<2E> transactionalznon-transactional)&<26>environment_context<78>opts<74>dialect<63>getrQ<00>_transaction_per_migration<6F>on_version_apply_callbacksr7rr<00>_stdout_connection<6F>
connection<EFBFBD>_in_external_transactionr<00>_get_connection_in_transaction<6F>_migrations_fnrRrWr<00>sys<79>stdoutrY<00>_user_compare_type<70>_user_compare_server_defaultr\r^<00>_start_from_revr<00> DefaultImpl<70>get_by_dialect<63>impl<70>version_table_impl<70>_version<6F>log<6F>info<66> __class__rKrS) r2rdrircrbrRrSr\r^s r3r4zMigrationContext.__init__<5F>s<><00><00>$7<><04> <20><18><04> <09><1E><04> <0C>15<31><18><18>(<28>1C<31><04> <0B><1B>x<EFBFBD>x<EFBFBD><08>%<25>0<><06> <20>H<EFBFBD>H<EFBFBD>%8<>9<><19>*.<2E>(<28>(<28> '<27><15>+
<EFBFBD><04>'<27>+/<2F>(<28>(<28>3E<33>r<EFBFBD>*J<><04>'<27>37<33><04><19> <11>"<22><18><1C>&<26><04>(?<3F>(?<3F>
<EFBFBD>(K<><0E>D<EFBFBD>O<EFBFBD><18>?<3F>?<3F>.<2E> .<2E>.<2E>,1<>D<EFBFBD> )<29>(<28>D<EFBFBD>O<EFBFBD><1B>:<3A>:<3A>:<3A>F<> <11> )<29> <11>H<EFBFBD>H<EFBFBD>T<EFBFBD>N<EFBFBD> <0A><1B><1D><04> <0B><19>X<EFBFBD>X<EFBFBD>g<EFBFBD>u<EFBFBD>-<2D><04>
<EFBFBD> <1C><04> $<24>!*<2A><14><08><08><1F>)<29><1E><16>:<3A>:<3A><14>&<26>'<27>"<0E>D<EFBFBD> <1E> "&<26><18><18>/<2F>3<EFBFBD>:<3A>:<3A>!F<>D<EFBFBD> <1E>"&<26>(<28>(<28>><3E>4<EFBFBD>"@<40><04><1F>,0<>H<EFBFBD>H<EFBFBD> $<24>e<EFBFBD>-
<EFBFBD><04>)<29>.2<EFBFBD>X<EFBFBD>X<EFBFBD> <1B>.<2E>.
<EFBFBD>
<EFBFBD><04><1A>]<5D><@<01>8<EFBFBD>8<EFBFBD> "<22>D<EFBFBD><
<EFBFBD>
<EFBFBD><04>!<21>$8<>/3<>h<EFBFBD>h<EFBFBD>~<7E>.F<><04><1C><17>O<EFBFBD>O<EFBFBD>2<>2<>7<EFBFBD>;<3B> <13> <10>O<EFBFBD>O<EFBFBD> <10>K<EFBFBD>K<EFBFBD> <1D> <10> <1E> <1E> <10> 
<EFBFBD><04> <09><1D> <09> <09>4<>4<>'<27>!5<>!<21>X<EFBFBD>X<EFBFBD>&8<>$<24>?<3F>5<>
<EFBFBD><04> <0A> <0C><08><08>#<23>T<EFBFBD>Y<EFBFBD>Y<EFBFBD>%8<>%8<>%A<>%A<>B<> <0F>;<3B>;<3B> <0F>H<EFBFBD>H<EFBFBD>,<2C> -<2D> <0B><08><08> !<21><18>9<EFBFBD>9<EFBFBD>.<2E>.<2E> <20>
<EFBFBD>
)<29> 
r5c<01>|<00>|<07>i}|<06>i}|r5t|t<00>rtjd|z<00><00>|j}nl|r,t j |<02>}|j<00>di|<06><01>}n>|r/t j d|z<00>}|j<00>di|<06><01>}n |s td<03><00>|<04>J<00>t||||<05>S)a<>Create a new :class:`.MigrationContext`.
This is a factory method usually called
by :meth:`.EnvironmentContext.configure`.
:param connection: a :class:`~sqlalchemy.engine.Connection`
to use for SQL execution in "online" mode. When present,
is also used to determine the type of dialect in use.
:param url: a string database url, or a
:class:`sqlalchemy.engine.url.URL` object.
The type of dialect to be used will be derived from this if
``connection`` is not passed.
:param dialect_name: string name of a dialect, such as
"postgresql", "mssql", etc. The type of dialect to be used will be
derived from this if ``connection`` and ``url`` are not passed.
:param opts: dictionary of options. Most other options
accepted by :meth:`.EnvironmentContext.configure` are passed via
this dictionary.
zf'connection' argument to configure() is expected to be a sqlalchemy.engine.Connection instance, got %rz%s://z-Connection, url, or dialect_name is required.rA)
<EFBFBD>
isinstancerr<00> CommandErrorrd<00>sqla_url<72>make_url<72> get_dialect<63> ExceptionrH) <09>clsrir<00> dialect_namerdrb<00> dialect_optsrc<00>url_objs r3<00> configurezMigrationContext.configure<72>s<><00><00>> <10><<3C><15>D<EFBFBD> <17> <1F><1D>L<EFBFBD> <15><19>*<2A>f<EFBFBD>-<2D><1A>'<27>'<27><1D>)<29>*<2A><12><12> !<21>(<28>(<28>G<EFBFBD> <10><1E>'<27>'<27><03>,<2C>G<EFBFBD>+<2B>g<EFBFBD>)<29>)<29>+<2B>;<3B>l<EFBFBD>;<3B>G<EFBFBD> <19><1E>'<27>'<27><07>,<2C>(><3E>?<3F>G<EFBFBD>+<2B>g<EFBFBD>)<29>)<29>+<2B>;<3B>l<EFBFBD>;<3B>G<EFBFBD><18><1B>K<>L<> L<><16>"<22>"<22>"<22><1F><07><1A>T<EFBFBD>;N<>O<>Or5c#<01>ZK<00>|j<00>}|jjr'|jr|jj <00>n1|r/|j
<00>J<00>|j
j <00>d|_|jsw|j<00>J<00>|jj<00>}|j}|jd<02><03>x|_|j_|jj<00>}nd} d<01><02>|jsT|j<00>J<00>|<04>|j <00>|jj<02><03>x|_|j_|jjr'|jr|jj<00>y|r.|j<00>J<00>|jj<00>|_yy#|jsT|j<00>J<00>|<04>|j <00>|jj<02><03>x|_|j_|jjr'|jr|jj<00>w|r.|j<00>J<00>|jj<00>|_wwxYw<01>w)aLEnter an "autocommit" block, for databases that support AUTOCOMMIT
isolation levels.
This special directive is intended to support the occasional database
DDL or system operation that specifically has to be run outside of
any kind of transaction block. The PostgreSQL database platform
is the most common target for this style of operation, as many
of its DDL operations must be run outside of transaction blocks, even
though the database overall supports transactional DDL.
The method is used as a context manager within a migration script, by
calling on :meth:`.Operations.get_context` to retrieve the
:class:`.MigrationContext`, then invoking
:meth:`.MigrationContext.autocommit_block` using the ``with:``
statement::
def upgrade():
with op.get_context().autocommit_block():
op.execute("ALTER TYPE mood ADD VALUE 'soso'")
Above, a PostgreSQL "ALTER TYPE..ADD VALUE" directive is emitted,
which must be run outside of a transaction block at the database level.
The :meth:`.MigrationContext.autocommit_block` method makes use of the
SQLAlchemy ``AUTOCOMMIT`` isolation level setting, which against the
psycogp2 DBAPI corresponds to the ``connection.autocommit`` setting,
to ensure that the database driver is not inside of a DBAPI level
transaction block.
.. warning::
As is necessary, **the database transaction preceding the block is
unconditionally committed**. This means that the run of migrations
preceding the operation will be committed, before the overall
migration operation is complete.
It is recommended that when an application includes migrations with
"autocommit" blocks, that
:paramref:`.EnvironmentContext.transaction_per_migration` be used
so that the calling environment is tuned to expect short per-file
migrations whether or not one of them has an autocommit block.
N<>
AUTOCOMMIT)<01>isolation_level) <0C>_in_connection_transactionrtrSrR<00> emit_commitr7r?ri<00>get_isolation_level<65>execution_options<6E>begin<69>
emit_begin)r2r<><00> current_level<65>base_connection<6F>
fake_transs r3<00>autocommit_blockz!MigrationContext.autocommit_blocks7<00><00><><00>Z&*<2A>%D<>%D<>%F<>"<22> <0F>9<EFBFBD>9<EFBFBD> &<26> &<26>4<EFBFBD>;<3B>;<3B> <10>I<EFBFBD>I<EFBFBD> !<21> !<21> #<23> '<27><17>$<24>$<24>0<> 0<>0<> <10> <1D> <1D> $<24> $<24> &<26> $<24>D<EFBFBD> <1D><13>{<7B>{<7B><17>?<3F>?<3F>.<2E> .<2E>.<2E> <20>O<EFBFBD>O<EFBFBD>?<3F>?<3F>A<>M<EFBFBD>"<22>o<EFBFBD>o<EFBFBD>O<EFBFBD> <20>1<>1<>,<2C>1<>O<> <0E>D<EFBFBD>O<EFBFBD>d<EFBFBD>i<EFBFBD>i<EFBFBD>2<> 15<31><0F><0F>0E<30>0E<30>0G<30>J<EFBFBD><1D>J<EFBFBD> <<3C> <11><17>;<3B>;<3B><1B><EFBFBD><EFBFBD>2<>2<>2<><1D>)<29><1E>%<25>%<25>'<27><14><0F><0F>1<>1<>$1<>2<><12>:I<01>H<><04><0F>$<24>)<29>)<29>"6<><13>y<EFBFBD>y<EFBFBD>*<2A>*<2A>t<EFBFBD>{<7B>{<7B><14> <09> <09>$<24>$<24>&<26>+<2B><1B><EFBFBD><EFBFBD>2<>2<>2<>$(<28>O<EFBFBD>O<EFBFBD>$9<>$9<>$;<3B><04>!<21>,<2C><><18>;<3B>;<3B><1B><EFBFBD><EFBFBD>2<>2<>2<><1D>)<29><1E>%<25>%<25>'<27><14><0F><0F>1<>1<>$1<>2<><12>:I<01>H<><04><0F>$<24>)<29>)<29>"6<><13>y<EFBFBD>y<EFBFBD>*<2A>*<2A>t<EFBFBD>{<7B>{<7B><14> <09> <09>$<24>$<24>&<26>+<2B><1B><EFBFBD><EFBFBD>2<>2<>2<>$(<28>O<EFBFBD>O<EFBFBD>$9<>$9<>$;<3B><04>!<21>,<2C>s <00>DJ+<01>G<00> CJ+<01>CJ(<03>(J+c<01>f<00><00><00>jr
t<00>S<00>jjr|<01>jk(}n|du}|s
t<00>S<00>jjsq|sJ<00><01>j
r
t<00>S<00>j du}|r
t<00>S<00>j<00>J<00>tj<00>j<00><00>_t<00><00>S<00>j
rt<00>fd<03><08>}|<04>S<00>j<00>J<00>tj<00>j<00><00>_t<00><00>S)a<>Begin a logical transaction for migration operations.
This method is used within an ``env.py`` script to demarcate where
the outer "transaction" for a series of migrations begins. Example::
def run_migrations_online():
connectable = create_engine(...)
with connectable.connect() as connection:
context.configure(
connection=connection, target_metadata=target_metadata
)
with context.begin_transaction():
context.run_migrations()
Above, :meth:`.MigrationContext.begin_transaction` is used to demarcate
where the outer logical transaction occurs around the
:meth:`.MigrationContext.run_migrations` operation.
A "Logical" transaction means that the operation may or may not
correspond to a real database transaction. If the target database
supports transactional DDL (or
:paramref:`.EnvironmentContext.configure.transactional_ddl` is true),
the :paramref:`.EnvironmentContext.configure.transaction_per_migration`
flag is not set, and the migration is against a real database
connection (as opposed to using "offline" ``--sql`` mode), a real
transaction will be started. If ``--sql`` mode is in effect, the
operation would instead correspond to a string such as "BEGIN" being
emitted to the string output.
The returned object is a Python context manager that should only be
used in the context of a ``with:`` statement as indicated above.
The object has no other guaranteed API features present.
.. seealso::
:meth:`.MigrationContext.autocommit_block`
TNc3<01>~<00>K<00><00>jj<00>d<00><01><00>jj<00>y<00>wr0)rtr<>r<>r8s<00>r3<00> begin_commitz8MigrationContext.begin_transaction.<locals>.begin_commit<69>s*<00><><00><><00><14> <09> <09>$<24>$<24>&<26><15><14> <09> <09>%<25>%<25>'<27>s<00>:=) rjrrtrSrfrRr7rir<00>"_safe_begin_connection_transactionr.r)r2<00>_per_migration<6F>transaction_now<6F>in_transactionr<6E>s` r3<00>begin_transactionz"MigrationContext.begin_transactionqs<00><><00>X <10> (<28> (<28><1E>=<3D> <20> <0F>9<EFBFBD>9<EFBFBD> &<26> &<26>,<2C><04>0O<30>0O<30>O<>O<EFBFBD>,<2C><04>4<>O<EFBFBD><1E><1E>=<3D> <20><15><19><19>,<2C>,<2C>!<21> !<21>><3E><13>{<7B>{<7B>"<22>}<7D>$<24>"&<26>!2<>!2<>$<24>!><3E><0E>!<21>&<26>=<3D>(<28><1F>?<3F>?<3F>6<>6<>6<>#<23>F<>F<> <20>O<EFBFBD>O<EFBFBD><1A><19>%<25>
-<2D>T<EFBFBD>2<>2<> <11>[<5B>[<5B> <1B> (<28><1C> (<28>
 <20>><3E> !<21><17>?<3F>?<3F>.<2E> .<2E>.<2E> +<2B> N<> N<><14><0F><0F>!<0E>D<EFBFBD> <1D>%<25>T<EFBFBD>*<2A> *r5c<01><><00>|j<00>}t|<01>dk(ryt|<01>dkDr"tjd|jz<00><00>|dS)a<>Return the current revision, usually that which is present
in the ``alembic_version`` table in the database.
This method intends to be used only for a migration stream that
does not contain unmerged branches in the target database;
if there are multiple branches present, an exception is raised.
The :meth:`.MigrationContext.get_current_heads` should be preferred
over this method going forward in order to be compatible with
branch migration support.
If this :class:`.MigrationContext` was configured in "offline"
mode, that is with ``as_sql=True``, the ``starting_rev``
parameter is returned instead, if any.
rNr%zQVersion table '%s' has more than one head present; please use get_current_heads())<05>get_current_heads<64>lenrr|r\<00>r2<00>headss r3<00>get_current_revisionz%MigrationContext.get_current_revision<6F>s]<00><00> <15>&<26>&<26>(<28><05> <0E>u<EFBFBD>:<3A><11>?<3F><17> <10><15>Z<EFBFBD>!<21>^<5E><16>#<23>#<23>1<>37<33>3E<33>3E<33>F<01><0E> <0E>
<19><11>8<EFBFBD>Or5c<01>L<00>|jr<>|j}|dk(rd}nW|<01>U|jrItj|<01>D<00>cgc]+}|dvr%|jj |<02>j <00><02>-}}tj|d<04><05>S|jrtjd<06><00>|j<00>sy|j<00>J<00>td<07>|jjt|jjj <00><00>D<00><00>Scc}w)a<>Return a tuple of the current 'head versions' that are represented
in the target database.
For a migration stream without branches, this will be a single
value, synonymous with that of
:meth:`.MigrationContext.get_current_revision`. However when multiple
unmerged branches exist within the target database, the returned tuple
will contain a value for each head.
If this :class:`.MigrationContext` was configured in "offline"
mode, that is with ``as_sql=True``, the ``starting_rev``
parameter is returned in a one-length tuple.
If no version table is present, or if there are no revisions
present, an empty tuple is returned.
<20>baseN)Nr<4E>rA<00><01>defaultzECan't specify current_rev to context when using a database connectionc3<01>&K<00>|] }|d<00><01><00> y<01>w)rNrA)<02>.0<EFBFBD>rows r3<00> <genexpr>z5MigrationContext.get_current_heads.<locals>.<genexpr>s <00><00><><00>
<EFBFBD><0E><03> <10><01>F<EFBFBD><0E>s<00>)rRrqrQr<00>to_list<73> get_revision<6F>revision<6F>to_tupler|<00>_has_version_tableri<00>tuple<6C>executerrv<00>c<> version_num)r2<00>start_from_rev<65>sfrs r3r<>z"MigrationContext.get_current_heads<64>s<00><00>$ <10>;<3B>;<3B>"&<26>"6<>"6<>N<EFBFBD><1D><16>'<27>!%<25><0E><1F>+<2B><04> <0B> <0B> $<24>|<7C>|<7C>N<EFBFBD>;<3B>"<12>;<3B><03><1A>.<2E>0<><19>K<EFBFBD>K<EFBFBD>,<2C>,<2C>S<EFBFBD>1<>:<3A>:<3A>;<3B><1F>"<12>
<18>=<3D>=<3D><1E><12><<3C> <<3C><13>#<23>#<23><1A>'<27>'<27>7<><12><12><18>*<2A>*<2A>,<2C><19><13><EFBFBD><EFBFBD>*<2A>*<2A>*<2A><14>
<EFBFBD><1B><EFBFBD><EFBFBD>.<2E>.<2E><17><04> <0A> <0A><0F><0F>3<>3<>4<><0E>
<EFBFBD>
<EFBFBD>
<EFBFBD><EFBFBD>"s<00>0D!c<01>\<00>tj|j<00>5|j<00>J<00>|jj |jd<01><02>|rA|j<00>J<00>|jj |jj <00><00>ddd<00>y#1swYyxYw)NT)<01>
checkfirst)r<00>_ensure_scope_for_ddlrirv<00>creater<65><00>delete)r2rWs r3<00>_ensure_version_tablez&MigrationContext._ensure_version_tables~<00><00> <18> .<2E> .<2E>t<EFBFBD><EFBFBD><EFBFBD> ?<3F><17>?<3F>?<3F>.<2E> .<2E>.<2E> <10>M<EFBFBD>M<EFBFBD> <20> <20><14><1F><1F>T<EFBFBD> <20> B<><14><1B><EFBFBD><EFBFBD>2<>2<>2<><14><0F><0F>'<27>'<27><04> <0A> <0A>(<<3C>(<<3C>(><3E>?<3F> @<01> ?<3F> ?<3F>s <00>A9B"<03>"B+c<01><><00>|j<00>J<00>tj|j|j|j<00>Sr0)rir<00>_connectable_has_tabler\r^r8s r3r<>z#MigrationContext._has_version_table%s<<00><00><13><EFBFBD><EFBFBD>*<2A>*<2A>*<2A><1A>1<>1<> <10>O<EFBFBD>O<EFBFBD>T<EFBFBD>/<2F>/<2F><14>1J<31>1J<31>
<EFBFBD>
r5c<01><><00>|j<00>}|js|s|j<00>t||<03>}|j ||<03>D]}|j |<05><00>y)a\Stamp the version table with a specific revision.
This method calculates those branches to which the given revision
can apply, and updates those branches as though they were migrated
towards that revision (either up or down). If no current branches
include the revision, it is added as a new branch head.
N)r<>rRr<><00>HeadMaintainer<65> _stamp_revs<76>update_to_step)r2<00>script_directoryr<79>r<><00>head_maintainer<65>steps r3<00>stampzMigrationContext.stamp+sY<00><00><15>&<26>&<26>(<28><05><13>{<7B>{<7B>5<EFBFBD> <10> &<26> &<26> (<28>(<28><14>u<EFBFBD>5<><0F>$<24>0<>0<><18>5<EFBFBD>A<>D<EFBFBD> <1B> *<2A> *<2A>4<EFBFBD> 0<>Br5c
<01><><00>|jj<00>|jr6|jrt j
d<01><00>|j d<02><03>d}nL|j<00>}|jjdd<06>}|js|s|s|j <00>t||<02>}|j<00>J<00>|j||<00>D<00>]}|jd<02><08>5|jr?|js3|j<00>J<00>|jj!|j<00>t"j%d |<05>|jr(|jj'd
|j(<00><01><02>|j*di|<01><01>|j-|<05>|j.D]+}|||j$t1|j<00>|<01> <0B><00>- ddd<07><00><01>|jrA|js4|j<00>J<00>|jj3|j<00>yyy#1swY<00><01>mxYw) a-Run the migration scripts established for this
:class:`.MigrationContext`, if any.
The commands in :mod:`alembic.command` will set up a function
that is ultimately passed to the :class:`.MigrationContext`
as the ``fn`` argument. This function represents the "work"
that will be done when :meth:`.MigrationContext.run_migrations`
is called, typically from within the ``env.py`` script of the
migration environment. The "work function" then provides an iterable
of version callables and other version information which
in the case of the ``upgrade`` or ``downgrade`` commands are the
list of version scripts to invoke. Other commands yield nothing,
in the case that a command wants to run some other operation
against the database such as the ``current`` or ``stamp`` commands.
:param \**kw: keyword arguments here will be passed to each
migration callable, that is the ``upgrade()`` or ``downgrade()``
method within revision scripts.
z!Can't use --purge with --sql modeT)rWrA<00> dont_mutateFN)r<>z
Running %sz -- Running )<04>ctxr<78>r<><00>run_args)rt<00>start_migrationsrWrRrr|r<>r<>rcrer<>rlr<>r<>rirvr<>rwrx<00> static_output<75> short_log<6F> migration_fnr<6E>rg<00>set<65>drop)r2<00>kwr<77>r<>r<>r<><00>callbacks r3<00>run_migrationszMigrationContext.run_migrations;s<><00><00>* <0A> <09> <09>"<22>"<22>$<24> <10>:<3A>:<3A><13>{<7B>{<7B><1A>'<27>'<27>(K<>L<>L<> <10> &<26> &<26>T<EFBFBD> &<26> 2<><16>E<EFBFBD><18>*<2A>*<2A>,<2C>E<EFBFBD><1E>)<29>)<29>-<2D>-<2D> <0A>u<EFBFBD>=<3D>K<EFBFBD><17>;<3B>;<3B>u<EFBFBD>[<5B><14>*<2A>*<2A>,<2C>(<28><14>u<EFBFBD>5<><0F><13>"<22>"<22>.<2E>.<2E>.<2E><18>'<27>'<27><05>t<EFBFBD>4<>D<EFBFBD><15>'<27>'<27>t<EFBFBD>'<27><<3C><17>;<3B>;<3B><EFBFBD>'<<3C>'<<3C> <20>?<3F>?<3F>6<>6<>6<><18>M<EFBFBD>M<EFBFBD>(<28>(<28><14><1F><1F>9<><13><08><08><1C>t<EFBFBD>,<2C><17>;<3B>;<3B><18>I<EFBFBD>I<EFBFBD>+<2B>+<2B>+/<2F>><3E>><3E>;<3B><16>"<22><04>!<21>!<21>'<27>B<EFBFBD>'<27> <20>.<2E>.<2E>t<EFBFBD>4<> $<24> ?<3F> ?<3F>H<EFBFBD><1C> <20>!<21>Y<EFBFBD>Y<EFBFBD>!<21>/<2F>"7<>"7<>8<>!#<23> <16>!@<01>'=<3D><<3C>5<>8 <10>;<3B>;<3B><EFBFBD>4<>4<><17>?<3F>?<3F>.<2E> .<2E>.<2E> <10>M<EFBFBD>M<EFBFBD> <1E> <1E>t<EFBFBD><EFBFBD><EFBFBD> /<2F> 5<>;<3B>7=<3D><<3C>s <00>+C3H8<05>8I c<01>\<00> |jj}|<01>S#t$rYywxYw<01>NF)rir<><00>AttributeError)r2<00>meths r3r<>z+MigrationContext._in_connection_transaction<6F>s3<00><00> <1A><17>?<3F>?<3F>1<>1<>D<EFBFBD><18>6<EFBFBD>M<EFBFBD><4D><1E> <19><18> <19>s <00><00> +<03>+c<01><<00>|jj||<02>y)aExecute a SQL construct or string statement.
The underlying execution mechanics are used, that is
if this is "offline mode" the SQL is written to the
output buffer, otherwise the SQL is emitted on
the current SQLAlchemy connection.
N<>rt<00>_exec)r2<00>sqlr<6C>s r3r<>zMigrationContext.execute<74>s<00><00> <0A> <09> <09><0F><0F><03>.<2E>/r5c<01>N<00><00><00>fd<01>}tj<00>j|<02>S)Nc<01><<00><01><00>jj|<00>yr0r<>)<04> construct<63> multiparams<6D>paramsr2s <20>r3<00>dumpz1MigrationContext._stdout_connection.<locals>.dump<6D>s<00><><00> <10>I<EFBFBD>I<EFBFBD>O<EFBFBD>O<EFBFBD>I<EFBFBD> &r5)rr#rd)r2rir<>s` r3rhz#MigrationContext._stdout_connection<6F>s!<00><><00> '<27>"<22>0<>0<><14><1C><1C>t<EFBFBD>D<>Dr5c<01><00>|jS)a<>Return the current "bind".
In online mode, this is an instance of
:class:`sqlalchemy.engine.Connection`, and is suitable
for ad-hoc execution of any kind of usage described
in SQLAlchemy Core documentation as well as
for usage with the :meth:`sqlalchemy.schema.Table.create`
and :meth:`sqlalchemy.schema.MetaData.create_all` methods
of :class:`~sqlalchemy.schema.Table`,
:class:`~sqlalchemy.schema.MetaData`.
Note that when "standard output" mode is enabled,
this bind will be a "mock" connection handler that cannot
return results and is only appropriate for a very limited
subset of commands.
)rir8s r3<00>bindzMigrationContext.bind<6E>s<00><00>&<14><EFBFBD><EFBFBD>r5c<01>H<00>|jr|jjSy)zLReturn the :class:`.Config` used by the current environment,
if any.N)rb<00>configr8s r3r<>zMigrationContext.config<69>s"<00><00>
<10> #<23> #<23><17>+<2B>+<2B>2<>2<> 2<>r5c<01><><00>|jduryt|j<00>r-|j||||j|j<00>}|<03>|S|jj ||<02>Sr<>)ro<00>callable<6C>typertrZ)r2<00>inspector_column<6D>metadata_column<6D>
user_values r3<00> _compare_typezMigrationContext._compare_type<70>st<00><00> <10> "<22> "<22>e<EFBFBD> +<2B><18> <13>D<EFBFBD>+<2B>+<2B> ,<2C><1D>0<>0<><14> <20><1F> <20>%<25>%<25><1F>$<24>$<24> <0E>J<EFBFBD><1A>%<25>!<21>!<21><13>y<EFBFBD>y<EFBFBD>%<25>%<25>&6<><0F>H<>Hr5c<01><><00>|jduryt|j<00>r$|j|||||j|<03>}|<05>|S|jj ||||<04>Sr<>)rpr<><00>server_defaultrtr[)r2r<>r<><00>rendered_metadata_default<6C>rendered_column_defaultr<74>s r3<00>_compare_server_defaultz(MigrationContext._compare_server_default<6C>s|<00><00> <10> ,<2C> ,<2C><05> 5<><18> <13>D<EFBFBD>5<>5<> 6<><1D>:<3A>:<3A><14> <20><1F>'<27><1F>.<2E>.<2E>)<29> <0E>J<EFBFBD><1A>%<25>!<21>!<21><13>y<EFBFBD>y<EFBFBD>/<2F>/<2F> <1C> <1B> %<25> #<23> 
<EFBFBD>
r5r0)
rdrri<00>Optional[Connection]rczDict[str, Any]rb<00>Optional[EnvironmentContext]rIrJ)NNNNNNN)rir<>rzOptional[Union[str, URL]]r<><00> Optional[str]rdzOptional[Dialect]rbr<>r<>zOptional[Dict[str, str]]rcz Optional[Any]rIrH)rIzIterator[None])F)r<><00>boolrIz.Union[_ProxyTransaction, ContextManager[None]]<5D>rIr<><00>rI<00>Tuple[str, ...])rWr<>rIrJ<00>rIr<>)r<>r)r<><00>strrIrJ<00>r<>rrIrJ)r<>zUnion[Executable, str]r<>zOptional[Dict[str, Any]]rIrJ)rir<>rIr#)rIr<>)rIzOptional[Config])r<><00> Column[Any]r<>rrIr<>)
r<EFBFBD>r<>r<>r<>r<>r<>r<>r<>rIr<>)rKrLrM<00>__doc__r4<00> classmethodr<64>rr<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rhrNr<>r<>r<>r<>rAr5r3rHrHUs<><00><00>-<08>h=A<01> T
<EFBFBD><18>T
<EFBFBD>)<29>T
<EFBFBD><1D> T
<EFBFBD>
:<3A> T
<EFBFBD>
<0E> T
<EFBFBD>l<11>,0<>)-<2D>&*<2A>%)<29><@<40>15<31>"<22>5P<01>(<28>5P<01>'<27>5P<01>$<24> 5P<01>
#<23> 5P<01> :<3A> 5P<01>/<2F>5P<01><1C>5P<01>
<1A>5P<01><11>5P<01>n<14>[<<3C><14>[<<3C>|&+<2B>b+<2B>"<22>b+<2B> 7<>b+<2B>H<1C>6+
<EFBFBD>Z@<01>
<EFBFBD> 1<> F0<>P<1A>7;<3B> 0<> #<23> 0<>4<> 0<>
<0E> 0<>E<01>.<2E>E<01> <17>E<01><0E><1F><0E><1F>(<0E><18><0E><18>I<01> +<2B>I<01>>D<>I<01> <0A>I<01>&
<EFBFBD>%<25>
<EFBFBD>%<25>
<EFBFBD>$1<> 
<EFBFBD>
"/<2F> 
<EFBFBD>
<0E> 
r5rHc<01>4<00>eZdZdd<01>Zdd<02>Zdd<03>Zd d<04>Zd
d<05>Zy) r<>c<01>2<00>||_t|<02>|_yr0)<03>contextr<74>r<>)r2r<>r<>s r3r4zHeadMaintainer.__init__<5F>s<00><00><1E><04> <0C><18><15>Z<EFBFBD><04>
r5c<01> <00>||jvsJ<00>|jj|<01>|jjj |jj
j <00>jtd|z<00><00><02><00>y)N<>'%s'<27>r<>) r<><00>addr<64>rtr<>rv<00>insert<72>valuesr)r2<00>versions r3<00>_insert_versionzHeadMaintainer._insert_version<6F>so<00><00><16>d<EFBFBD>j<EFBFBD>j<EFBFBD>(<28>(<28>(<28> <0C>
<EFBFBD>
<EFBFBD><0E><0E>w<EFBFBD><1F> <0C> <0C> <0C><19><19><1F><1F> <10>L<EFBFBD>L<EFBFBD> !<21> !<21> (<28> (<28> *<2A> 1<> 1<>*<2A>6<EFBFBD>G<EFBFBD>+;<3B><<3C> 2<> <0E>
r5c <01>Z<00>|jj|<01>|jjj |jj
j <00>j|jj
jjtd|z<00>k(<00><00>}|jjsm|jjjrL|<02>I|jdk7r9tj d||jj"|jfz<00><00>yyyy)Nrr%zOOnline migration expected to match one row when deleting '%s' in '%s'; %d found)r<><00>remover<65>rtr<>rvr<><00>wherer<65>r<>rrRrd<00>supports_sane_rowcount<6E>rowcountrr|r\)r2r<00>rets r3<00>_delete_versionzHeadMaintainer._delete_versions<><00><00> <0C>
<EFBFBD>
<EFBFBD><19><19>'<27>"<22><12>l<EFBFBD>l<EFBFBD><1F><1F>%<25>%<25> <10>L<EFBFBD>L<EFBFBD> !<21> !<21> (<28> (<28> *<2A> 0<> 0<><14> <0C> <0C>%<25>%<25>'<27>'<27>3<>3<>!<21>&<26>7<EFBFBD>"2<>3<>4<> <0E>
<EFBFBD><03><15> <0C> <0C>#<23>#<23><14> <0C> <0C>$<24>$<24>;<3B>;<3B><13><0F><13> <0C> <0C><01>!<21><16>#<23>#<23><1B><1B>D<EFBFBD>L<EFBFBD>L<EFBFBD>6<>6<><03> <0C> <0C>E<>F<01><0E> <0E>"<22> <20><<3C>$r5c <01><><00>||jvsJ<00>|jj|<01>|jj|<02>|jjj |jj j<00>jtd|z<00><00><02>j|jj jjtd|z<00>k(<00><00>}|jjsn|jjjrM|<03>J|j dk7r:t#j$d|||jj&|j fz<00><00>yyyy)Nrrr%zWOnline migration expected to match one row when updating '%s' to '%s' in '%s'; %d found)r<>rrr<>rtr<>rv<00>updaterrr r<>r<>rRrdr
r rr|r\)r2<00>from_<6D>to_r s r3<00>_update_versionzHeadMaintainer._update_versions0<00><00><12>$<24>*<2A>*<2A>$<24>$<24>$<24> <0C>
<EFBFBD>
<EFBFBD><19><19>%<25> <20> <0C>
<EFBFBD>
<EFBFBD><0E><0E>s<EFBFBD><1B><12>l<EFBFBD>l<EFBFBD><1F><1F>%<25>%<25> <10>L<EFBFBD>L<EFBFBD> !<21> !<21> (<28> (<28> *<2A> <13>V<EFBFBD><0E>v<EFBFBD><03>|<7C> <<3C>V<EFBFBD> =<3D> <12>U<EFBFBD><14> <0C> <0C>%<25>%<25>'<27>'<27>3<>3<>!<21>&<26>5<EFBFBD>.<2E>1<>2<><0E>
<EFBFBD><03><15> <0C> <0C>#<23>#<23><14> <0C> <0C>$<24>$<24>;<3B>;<3B><13><0F><13> <0C> <0C><01>!<21><16>#<23>#<23><1B><19>#<23>t<EFBFBD>|<7C>|<7C>9<>9<>3<EFBFBD><<3C><<3C>H<>I<01><0E> <0E>"<22> <20><<3C>$r5c<01><><00>|j|j<00>r4|j}tj d|<02>|j |<02>y|j |j<00>r4|j}tj d|<02>|j|<02>y|j|j<00>rb|j|j<00>\}}}tj d|||<05>|D]}|j |<06><00>|j||<05>y|j|j<00>rb|j|j<00>\}}}tj d|||<05>|D]}|j|<08><00>|j||<05>y|j|j<00>\} }
tj d| |
<EFBFBD>|j| |
<EFBFBD>y)Nzbranch delete %sznew branch insert %sz!merge, delete %s, update %s to %sz#unmerge, insert %s, update %s to %szupdate %s to %s)<0F>should_delete_branchr<68><00>delete_version_numrw<00>debugr <00>should_create_branch<63>insert_version_numr<00>should_merge_branches<65>merge_branch_identsr<00>should_unmerge_branches<65>unmerge_branch_idents<74>update_version_num) r2r<><00>vers<72> delete_revs<76>update_from_rev<65> update_to_rev<65>delrev<65> insert_revs<76>insrevrrs r3r<>zHeadMaintainer.update_to_step3s<><00><00> <0F> $<24> $<24>T<EFBFBD>Z<EFBFBD>Z<EFBFBD> 0<><17>*<2A>*<2A>D<EFBFBD> <0F>I<EFBFBD>I<EFBFBD>(<28>$<24> /<2F> <10> <20> <20><14> &<26> <11> &<26> &<26>t<EFBFBD>z<EFBFBD>z<EFBFBD> 2<><17>*<2A>*<2A>D<EFBFBD> <0F>I<EFBFBD>I<EFBFBD>,<2C>d<EFBFBD> 3<> <10> <20> <20><14> &<26> <11> '<27> '<27><04>
<EFBFBD>
<EFBFBD> 3<> <15>(<28>(<28><14><1A><1A>4<>  <0E><1B><1F><1D> <0F>I<EFBFBD>I<EFBFBD>3<><1B><1F><1D>  <0E> &<26><06><14>$<24>$<24>V<EFBFBD>,<2C>&<26> <10> <20> <20><1F>-<2D> @<40> <11> )<29> )<29>$<24>*<2A>*<2A> 5<>
<15>*<2A>*<2A>4<EFBFBD>:<3A>:<3A>6<>  <0E><1F><1D><1B> <0F>I<EFBFBD>I<EFBFBD>5<><1B><1F><1D>  <0E> &<26><06><14>$<24>$<24>V<EFBFBD>,<2C>&<26> <10> <20> <20><1F>-<2D> @<40><1D>0<>0<><14><1A><1A><<3C>J<EFBFBD>E<EFBFBD>3<EFBFBD> <0F>I<EFBFBD>I<EFBFBD>'<27><15><03> 4<> <10> <20> <20><15><03> ,r5N)r<>rHr<>rrIrJ)rr<>rIrJ)rr<>rr<>rIrJ)r<>zUnion[RevisionStep, StampStep]rIrJ)rKrLrMr4rr rr<>rAr5r3r<>r<><00>s<00><00> <20>
<EFBFBD><0E>.<0E>6+-r5r<>c<01>
<00>eZdZUdZded< ded< ded< ded< ded < d
ed < dd <0C>Zedd <0A><04>Zedd<0E><04>Zedd<0F><04>Z edd<10><04>Z
edd<11><04>Z edd<12><04>Z edd<13><04>Z edd<14><04>Zy)<1B> MigrationInfoz<6F>Exposes information about a migration step to a callback listener.
The :class:`.MigrationInfo` object is available exclusively for the
benefit of the :paramref:`.EnvironmentContext.on_version_apply`
callback hook.
r<><00>
is_upgrade<EFBFBD>is_stampr<70><00>up_revision_idr<64><00>up_revision_ids<64>down_revision_idsr,<00> revision_mapc<01><><00>||_||_||_tj|d<01><02>|_|j
r|j
d|_nd|_tj|d<01><02>|_y)NrAr<>r)r,r'r(rr<>r*r)r+)r2r,r'r(<00> up_revisions<6E>down_revisionss r3r4zMigrationInfo.__init__<5F>sf<00><00>)<29><04><19>$<24><04><0F> <20><04> <0A>#<23>}<7D>}<7D>\<5C>2<EFBFBD>F<><04><1C> <0F> <1F> <1F>"&<26>"6<>"6<>q<EFBFBD>"9<>D<EFBFBD> <1F>
#'<27>D<EFBFBD> <1F>!%<25><1D><1D>~<7E>r<EFBFBD>!J<><04>r5c<01><00>|j S)aTrue/False: indicates whether this operation is a migration.
At present this is true if and only the migration is not a stamp.
If other operation types are added in the future, both this attribute
and :attr:`~.MigrationInfo.is_stamp` will be false.
)r(r8s r3<00> is_migrationzMigrationInfo.is_migration<6F>s<00><00><18>=<3D>=<3D> <20> r5c<01>J<00>|jr |jS|jS)z7Active revisions before this migration step is applied.)r'r+r*r8s r3<00>source_revision_idsz!MigrationInfo.source_revision_ids<64>s&<00><00>'+<2B>o<EFBFBD>o<EFBFBD>D<EFBFBD> "<22> "<22>
<EFBFBD>;?<3F>;O<>;O<>
r5c<01>J<00>|jr |jS|jS)z6Active revisions after this migration step is applied.)r'r*r+r8s r3<00>destination_revision_idsz&MigrationInfo.destination_revision_ids<64>s&<00><00>%)<29>O<EFBFBD>O<EFBFBD>D<EFBFBD> <20> <20>
<EFBFBD>9=<3D>9O<39>9O<39>
r5c<01>L<00>|jj|j<00>S)zUGet :attr:`~.MigrationInfo.up_revision_id` as
a :class:`.Revision`.
)r,r<>r)r8s r3<00> up_revisionzMigrationInfo.up_revision<6F>s!<00><00> <14> <20> <20>-<2D>-<2D>d<EFBFBD>.A<>.A<>B<>Br5c<01>L<00>|jj|j<00>S)zLGet :attr:`~.MigrationInfo.up_revision_ids` as a
:class:`.Revision`.)r,<00> get_revisionsr*r8s r3r.zMigrationInfo.up_revisions<6E>s!<00><00><14> <20> <20>.<2E>.<2E>t<EFBFBD>/C<>/C<>D<>Dr5c<01>L<00>|jj|j<00>S)zcGet :attr:`~.MigrationInfo.down_revision_ids` as a tuple of
:class:`Revisions <.Revision>`.)r,r9r+r8s r3r/zMigrationInfo.down_revisions<6E>s!<00><00><14> <20> <20>.<2E>.<2E>t<EFBFBD>/E<>/E<>F<>Fr5c<01>L<00>|jj|j<00>S)zdGet :attr:`~MigrationInfo.source_revision_ids` as a tuple of
:class:`Revisions <.Revision>`.)r,r9r3r8s r3<00>source_revisionszMigrationInfo.source_revisions<6E>s!<00><00><14> <20> <20>.<2E>.<2E>t<EFBFBD>/G<>/G<>H<>Hr5c<01>L<00>|jj|j<00>S)ziGet :attr:`~MigrationInfo.destination_revision_ids` as a tuple of
:class:`Revisions <.Revision>`.)r,r9r5r8s r3<00>destination_revisionsz#MigrationInfo.destination_revisions<6E>s!<00><00><14> <20> <20>.<2E>.<2E>t<EFBFBD>/L<>/L<>M<>Mr5N) r,r,r'r<>r(r<>r.<00>Union[str, Tuple[str, ...]]r/r?rIrJr<>r<>)rIzOptional[Revision])rIz%Tuple[Optional[_RevisionOrBase], ...])rKrLrMr<><00>__annotations__r4rNr1r3r5r7r.r/r<r>rAr5r3r&r&asB<00><00><08><15><14><15><13>N<EFBFBD>6<>"<22>!<21> <08>%<25>$<24><08>'<27>&<26><08><1E><1D>A<>K<01>!<21>K<01><19>K<01><17> K<01>
2<> K<01> 4<> K<01>
<0E>K<01>*<0E>!<21><0E>!<21><0E>
<EFBFBD><0E>
<EFBFBD> <0E>
<EFBFBD><0E>
<EFBFBD> <0E>C<01><0E>C<01><0E>E<01><0E>E<01>
<0E>G<01><0E>G<01>
<0E>I<01><0E>I<01>
<0E>N<01><0E>Nr5r&c<01><><00>eZdZUded<ded<ded<ded<er edd<08><04>Zedd <09><04>Ze dd
<EFBFBD><04>Z e dd <0B><04>Z
edd <0C><04>Z edd <0A><04>Z d<0E>Z y)<14> MigrationStepr<70><00>from_revisions_no_deps<70>to_revisions_no_depsr<73>r'rr<>c<01><00>yr0rAr8s r3<00>doczMigrationStep.doc<6F>s<00><00>(+r5c<01>.<00>|jjSr0)r<>rKr8s r3<00>namezMigrationStep.name<6D>s<00><00><13> <20> <20>)<29>)<29>)r5c<01><00>t||d<01>S)NT<4E><01> RevisionStep<65>r<>r,rQs r3<00>upgrade_from_scriptz!MigrationStep.upgrade_from_script<70>s<00><00><1C>L<EFBFBD>&<26>$<24>7<>7r5c<01><00>t||d<01>Sr<>rJrLs r3<00>downgrade_from_scriptz#MigrationStep.downgrade_from_script<70>s<00><00><1C>L<EFBFBD>&<26>%<25>8<>8r5c<01><00>|j Sr0)r'r8s r3<00> is_downgradezMigrationStep.is_downgrade<64>s<00><00><17>?<3F>?<3F>"<22>"r5c<01><><00>|j<00>dtj|j<00><00>dtj|j<00><00><01>S)N<> <20> -> )rHr<00>format_as_commarCrDr8s r3r<>zMigrationStep.short_logs=<00><00> <11>I<EFBFBD>I<EFBFBD> <10> <20> <20><14>!<<3C>!<<3C> =<3D> <10> <20> <20><14>!:<3A>!:<3A> ;<3B>
<EFBFBD>
r5c<01><><00>|jr[|j<00>dtj|j<00><00>dtj|j
<00><00>d|j<00><01>S|j S)NrSrTz, )rFrHrrUrCrDr<>r8s r3<00>__str__zMigrationStep.__str__ sU<00><00> <0F>8<EFBFBD>8<EFBFBD><14> <09> <09><14>$<24>$<24>T<EFBFBD>%@<40>%@<40>A<><14>$<24>$<24>T<EFBFBD>%><3E>%><3E>?<3F><14><08><08> <0E> <0E><18>><3E>><3E> !r5Nr<4E><00>rIr<>)r,r,rQr(rIrKr<>)rKrLrMr@rrNrFrHr<>rMrOrQr<>rWrAr5r3rBrB<00>s<><00><00>+<2B>+<2B>)<29>)<29><14><14><15><15><14> <11>+<2B>
<12>+<2B> <0A>*<2A><0E>*<2A><11>8<>&<26>8<>06<30>8<> <15>8<><11>8<>
<11>9<>&<26>9<>06<30>9<> <15>9<><11>9<>
<0E>#<23><0E>#<23><0E>
<EFBFBD><0E>
<EFBFBD> "r5rBc<01>,<00>eZdZ dd<01>Zd<02>Zdd<03>Zedd<04><04>Zedd<05><04>Ze dd<06><04>Z edd<07><04>Z
e dd<08><04>Z edd <09><04>Z dd
<EFBFBD>Z dd <0B>Zdd <0C>Z dd <0A>Zdd<0E>Zdd<0F>Zdd<10>Zdd<11>Zed d<12><04>Zed d<13><04>Zed!d<14><04>Zy)"rKc<01><><00>||_||_||_|r|jj|_y|jj |_yr0)r,r<>r'<00>module<6C>upgrader<65><00> downgrade)r2r,r<>r's r3r4zRevisionStep.__init__sA<00><00>)<29><04><19> <20><04> <0A>$<24><04><0F> <15> (<28><0F><0F> 7<> 7<>D<EFBFBD> <1D> (<28><0F><0F> 9<> 9<>D<EFBFBD> r5c<01>P<00>d|jj<00>d|j<00>d<03>S)Nz RevisionStep(z , is_upgrade=<3D>))r<>r'r8s r3<00>__repr__zRevisionStep.__repr__#s <00><00> <10>M<EFBFBD>M<EFBFBD> "<22> "<22> <10>O<EFBFBD>O<EFBFBD>
<EFBFBD>
r5c<01><><00>t|t<00>xr4|j|jk(xr|j|jk(Sr0)r{rKr<>r'<00>r2<00>others r3<00>__eq__zRevisionStep.__eq__)s=<00><00> <16>u<EFBFBD>l<EFBFBD> +<2B> 4<><15><0E><0E>$<24>-<2D>-<2D>/<2F> 4<><14><0F><0F>5<EFBFBD>#3<>#3<>3<>
r5c<01>.<00>|jjSr0)r<>rFr8s r3rFzRevisionStep.doc0s<00><00><13>}<7D>}<7D> <20> <20> r5c<01>t<00>|jr|jjS|jjfSr0<00>r'r<><00>_normalized_down_revisionsr8s r3<00>from_revisionszRevisionStep.from_revisions4s,<00><00> <0F>?<3F>?<3F><17>=<3D>=<3D>;<3B>;<3B> ;<3B><18>M<EFBFBD>M<EFBFBD>*<2A>*<2A>,<2C> ,r5c<01>t<00>|jr|jjS|jjfSr0<00>r'r<><00>_versioned_down_revisionsr8s r3rCz#RevisionStep.from_revisions_no_deps;s.<00><00> <10>?<3F>?<3F><17>=<3D>=<3D>:<3A>:<3A> :<3A><18>M<EFBFBD>M<EFBFBD>*<2A>*<2A>,<2C> ,r5c<01>t<00>|jr|jjfS|jjSr0rgr8s r3<00> to_revisionszRevisionStep.to_revisionsDs,<00><00> <0F>?<3F>?<3F><18>M<EFBFBD>M<EFBFBD>*<2A>*<2A>,<2C> ,<2C><17>=<3D>=<3D>;<3B>;<3B> ;r5c<01>t<00>|jr|jjfS|jjSr0rkr8s r3rDz!RevisionStep.to_revisions_no_depsKs.<00><00> <10>?<3F>?<3F><18>M<EFBFBD>M<EFBFBD>*<2A>*<2A>,<2C> ,<2C><17>=<3D>=<3D>:<3A>:<3A> :r5c<01>F<00>t|jj<00>dk(S<00>Nr%)r<>r<>rhr8s r3<00>_has_scalar_down_revisionz&RevisionStep._has_scalar_down_revisionTs<00><00><12>4<EFBFBD>=<3D>=<3D>;<3B>;<3B><<3C><01>A<>Ar5c<01><><00>|jsy|jj|vry|jj}|sy|j|<01>}| S)z<>A delete is when we are a. in a downgrade and b.
we are going to the "base" or we are going to a version that
is implied as a dependency on another version that is remaining.
FT)rQr<>rh<00>_unmerge_to_revisions)r2r<><00>downrevsrns r3rz!RevisionStep.should_delete_branchXsU<00><00> <14> <20> <20><18> <0F>=<3D>=<3D> !<21> !<21><15> .<2E><18><17>=<3D>=<3D>;<3B>;<3B><08><17><17> <20>5<>5<>e<EFBFBD><<3C>L<EFBFBD>#<23>#<23> #r5c<01><><00>t|<01>j|j<00>}|r{|jj |jj |<02>d<01><02>D<00>chc]}|j <00><02>}}tt|j<00>j|<04><00>}nt|j<00>}t|dd<00>|d|jdfScc}w)NF<4E><01>checkr<00><><EFBFBD><EFBFBD><EFBFBD>) r<><00>
differencerir,<00>_get_ancestor_nodesr9r<><00>listrn)r2r<><00> other_heads<64>r<> ancestorsris r3rz RevisionStep.merge_branch_identsos<><00><00><1A>%<25>j<EFBFBD>+<2B>+<2B>D<EFBFBD>,?<3F>,?<3F>@<40> <0B> <16><1E>*<2A>*<2A>><3E>><3E><18>%<25>%<25>3<>3<>K<EFBFBD>@<40><05>?<3F><12><0E><12>A<EFBFBD><12>
<EFBFBD>
<EFBFBD><12> <16><0E> "<22><13>D<EFBFBD>'<27>'<27>(<28>3<>3<>I<EFBFBD>><3E><0E>N<EFBFBD>"<22>$<24>"5<>"5<>6<>N<EFBFBD> <11><1E><01>"<22>%<25> &<26> <1A>2<EFBFBD> <1E> <10> <1D> <1D>a<EFBFBD> <20> 
<EFBFBD>
<EFBFBD><EFBFBD>s<00>Cc <01><><00>t|<01>j|jjg<01>}|rz|jj |jj |<02>d<01><02>D<00>chc]}|j<00><02>}}t t|j<00>j|<04><00>S|jD<00><05>chc]X}|jj |jj |<05>d<01><02>D]}|j|k7r |j<00><03><00>Z}}}t t|j<00>j|<04><00>Scc}wcc}}w)NFrw)r<>rzr<>r,r{r9r<>rn)r2r<>r}r~r<00> to_revisions r3rtz"RevisionStep._unmerge_to_revisions<6E>sA<00><00><19>%<25>j<EFBFBD>+<2B>+<2B>T<EFBFBD>]<5D>]<5D>-C<>-C<>,D<>E<> <0B> <16><1E>*<2A>*<2A>><3E>><3E><18>%<25>%<25>3<>3<>K<EFBFBD>@<40><05>?<3F><12><0E><12>A<EFBFBD><12>
<EFBFBD>
<EFBFBD><12> <16><0E> <19><13>T<EFBFBD>.<2E>.<2E>/<2F>:<3A>:<3A>9<EFBFBD>E<>F<> F<>$(<28>#4<>#4<><0E>#4<>K<EFBFBD><1D>*<2A>*<2A>><3E>><3E><18>%<25>%<25>3<>3<>K<EFBFBD>@<40><05>?<3F><12>A<EFBFBD><15>:<3A>:<3A><1B>,<2C> <12>
<EFBFBD>
<EFBFBD><12><1B>#4<> <16><0E><19><13>T<EFBFBD>.<2E>.<2E>/<2F>:<3A>:<3A>9<EFBFBD>E<>F<> F<><46>'<0E><>s <00>*E<04>;AE c<01>T<00>|j|<01>}|jd|d|ddfS<00>Nrry)rtri)r2r<>rns r3rz"RevisionStep.unmerge_branch_idents<74>s@<00><00><1C>1<>1<>%<25>8<> <0C> <11> <1F> <1F><01> "<22> <18><12> <1C> <18><11>2<EFBFBD> <1E> 
<EFBFBD>
r5c<01>t<00>|jsy|jj}|sy|j|<02>syy)NFT)r'r<>rh<00> intersection<6F>r2r<>rus r3rz!RevisionStep.should_create_branch<63>s7<00><00><13><EFBFBD><EFBFBD><18><17>=<3D>=<3D>;<3B>;<3B><08><17><17> <19>%<25>%<25>h<EFBFBD>/<2F><1B>r5c<01><><00>|jsy|jj}t|<02>dkDrt|j |<02><00>dkDryy<01>NFr%T)r'r<>rhr<>r<>r<>s r3rz"RevisionStep.should_merge_branches<65>sD<00><00><13><EFBFBD><EFBFBD><18><17>=<3D>=<3D>;<3B>;<3B><08> <0E>x<EFBFBD>=<3D>1<EFBFBD> <1C><13>U<EFBFBD>%7<>%7<><08>%A<>!B<>Q<EFBFBD>!F<><17>r5c<01><><00>|jsy|jj}|jj|vrt|<02>dkDryyr<>)rQr<>rhr<>r<>s r3rz$RevisionStep.should_unmerge_branches<65>s@<00><00><13> <20> <20><18><17>=<3D>=<3D>;<3B>;<3B><08> <0F>=<3D>=<3D> !<21> !<21>U<EFBFBD> *<2A>s<EFBFBD>8<EFBFBD>}<7D>q<EFBFBD>/@<40><17>r5c<01>V<00>|jsI|j|jj<00>}t |<02>dk(sJd<02><00>t |<02>d}n|jjd}|j r||jjfS|jj|fS)Nr%z4Can't do an UPDATE because downrevision is ambiguousr)rrr<>r<>rhr<>r|r')r2r<><00>downrev<65> down_revisions r3rzRevisionStep.update_version_num<75>s<><00><00><13>-<2D>-<2D><1B>(<28>(<28><14> <0A> <0A>8<>8<><0E>G<EFBFBD><14>G<EFBFBD> <0C><01>!<21> F<01>E<> F<01>!<21> <20><17>M<EFBFBD>!<21>,<2C>M<EFBFBD> <20>M<EFBFBD>M<EFBFBD>D<>D<>Q<EFBFBD>G<>M<EFBFBD> <0F>?<3F>?<3F> <20>$<24>-<2D>-<2D>"8<>"8<>8<> 8<><17>=<3D>=<3D>)<29>)<29>=<3D>8<> 8r5c<01>.<00>|jjSr0<00>r<>r8s r3rzRevisionStep.delete_version_num<75><00><00><00><13>}<7D>}<7D>%<25>%<25>%r5c<01>.<00>|jjSr0r<>r8s r3rzRevisionStep.insert_version_num<75>r<>r5c<01><><00>t|j|jj|jj|jd<01><02>S)NF<4E>r,r.r/r'r()r&r,r<>rhr'r8s r3rxzRevisionStep.info<66>s<<00><00><1C><1D>*<2A>*<2A><1D><1D><1D>/<2F>/<2F><1F>=<3D>=<3D>C<>C<><1B><EFBFBD><EFBFBD><1A> 
<EFBFBD>
r5N)r,r,r<>r(r'r<>rIrJ)rc<00>objectrIr<>r<>r<>r<><00>r<><00>Set[str]rIr<>)r<>r<>rIzTuple[List[str], str, str])r<>r<>rIr<>)r<>r<>rIz Tuple[str, str, Tuple[str, ...]]<5D>r<>r<>rIzTuple[str, str]rX<00>rIr&)rKrLrMr4r`rdrNrFrirCrnrDrrrrrtrrrrrrrrxrAr5r3rKrKs@<00><00> :<3A>'<27> :<3A>39<33> :<3A>GK<47> :<3A> <0A> :<3A>
<EFBFBD> 
<EFBFBD><0E>!<21><0E>!<21><0E>-<2D><0E>-<2D> <0E>-<2D> <18>-<2D><0E>-<2D><0E><<3C><0E><<3C> <0E>;<3B> <18>;<3B><0E>;<3B><0E>B<01><0E>B<01>$<24>.
<EFBFBD><1D>
<EFBFBD> #<23>
<EFBFBD>2G<01>0

<EFBFBD><1D>

<EFBFBD> )<29>

<EFBFBD><1D>& <15> <15>9<>"<0E>&<26><0E>&<26><0E>&<26><0E>&<26><0E>
<EFBFBD><0E>
r5rKc<01><00>eZdZU d dd<02>ZdZded<dd<05>Zd<06>Zed<07><00>Z edd<08><04>Z
e dd <09><04>Z e dd
<EFBFBD><04>Z edd <0B><04>Z edd <0C><04>Zdd <0A>Z dd<0E>Z dd<0F>Zdd<10>Zdd<11>Zdd<12>Zdd<13>Zedd<14><04>Zy) <20> StampStepNc<01><><00>tj|d<01><02>|_tj|d<01><02>|_||_||_|j |_||_y)NrAr<>) rr<>rrr'<00> branch_move<76>stamp_revisionr<6E>r,)r2rrr'r<>r,s r3r4zStampStep.__init__<5F>sM<00><00>'+<2B>m<EFBFBD>m<EFBFBD>E<EFBFBD>2<EFBFBD>&F<><04>
<EFBFBD>$(<28>M<EFBFBD>M<EFBFBD>#<23>r<EFBFBD>$B<><04><08>$<24><04><0F>&<26><04><18> <20>/<2F>/<2F><04><19>(<28><04>r5r<>rFc <01><00>yr0rA)r2r<>s r3r<>zStampStep.stamp_revision s<00><00>r5c<01><><00>t|t<00>xrj|j|jk(xrO|j|jk(xr4|j|jk(xr|j
|j
k(Sr0)r{r<>rirnr<>r'rbs r3rdzStampStep.__eq__sw<00><00> <16>u<EFBFBD>i<EFBFBD> (<28> 4<><15>$<24>$<24><04>(;<3B>(;<3B>;<3B> 4<><15>"<22>"<22>d<EFBFBD>&7<>&7<>7<> 4<><16>!<21>!<21>T<EFBFBD>%5<>%5<>5<> 4<><15><0F><0F>5<EFBFBD>#3<>#3<>3<> 
r5c<01><00>|jSr0<00>rr8s r3rizStampStep.from_revisionss <00><00><13>z<EFBFBD>z<EFBFBD>r5c<01><00>|jSr0<00>rr8s r3rnzStampStep.to_revisionss <00><00><13>x<EFBFBD>x<EFBFBD>r5c<01><00>|jSr0r<>r8s r3rCz StampStep.from_revisions_no_depss<00><00><14>z<EFBFBD>z<EFBFBD>r5c<01><00>|jSr0r<>r8s r3rDzStampStep.to_revisions_no_deps%s <00><00><14>x<EFBFBD>x<EFBFBD>r5c<01>T<00>t|j<00>dk(sJ<00>|jdS<00>Nr%r<00>r<>rr8s r3rzStampStep.delete_version_num+s&<00><00><12>4<EFBFBD>:<3A>:<3A><EFBFBD>!<21>#<23>#<23>#<23><13>z<EFBFBD>z<EFBFBD>!<21>}<7D>r5c<01>T<00>t|j<00>dk(sJ<00>|jdSr<><00>r<>rr8s r3rzStampStep.insert_version_num0s&<00><00><12>4<EFBFBD>8<EFBFBD>8<EFBFBD>}<7D><01>!<21>!<21>!<21><13>x<EFBFBD>x<EFBFBD><01>{<7B>r5c<01><><00>t|j<00>dk(sJ<00>t|j<00>dk(sJ<00>|jd|jdfSr<>)r<>rrr<>s r3rzStampStep.update_version_num5sI<00><00><12>4<EFBFBD>:<3A>:<3A><EFBFBD>!<21>#<23>#<23>#<23><12>4<EFBFBD>8<EFBFBD>8<EFBFBD>}<7D><01>!<21>!<21>!<21><13>z<EFBFBD>z<EFBFBD>!<21>}<7D>d<EFBFBD>h<EFBFBD>h<EFBFBD>q<EFBFBD>k<EFBFBD>)<29>)r5c<01>l<00>t|jdd<00>|jd|jdfSr<>)r|rrr<>s r3rzStampStep.merge_branch_idents:s7<00><00>
<11><14><1A><1A>A<EFBFBD>b<EFBFBD>!<21> "<22> <10>J<EFBFBD>J<EFBFBD>r<EFBFBD>N<EFBFBD> <10>H<EFBFBD>H<EFBFBD>Q<EFBFBD>K<EFBFBD> 
<EFBFBD>
r5c<01>l<00>|jd|jdt|jdd<00>fSr<>)rrr|r<>s r3rzStampStep.unmerge_branch_identsDs6<00><00>
<11>J<EFBFBD>J<EFBFBD>q<EFBFBD>M<EFBFBD> <10>H<EFBFBD>H<EFBFBD>R<EFBFBD>L<EFBFBD> <10><14><18><18>!<21>B<EFBFBD><1E> <20> 
<EFBFBD>
r5c<01>6<00>|jxr |jSr0)rQr<>r<>s r3rzStampStep.should_delete_branchNs<00><00><14> <20> <20>5<>T<EFBFBD>%5<>%5<>5r5c<01><><00>|jxrX|jxs$t|j<00>j |<01>xr$t|j
<00>j |<01>Sr0)r'r<>r<>rrzrr<>s r3rzStampStep.should_create_branchTsO<00><00> <10>O<EFBFBD>O<EFBFBD> 0<><15>!<21>!<21>F<>S<EFBFBD><14><1A><1A>_<EFBFBD>%?<3F>%?<3F><05>%F<> 0<><13>D<EFBFBD>H<EFBFBD>H<EFBFBD> <0A>(<28>(<28><15>/<2F>
r5c<01>2<00>t|j<00>dkDSrqr<>r<>s r3rzStampStep.should_merge_branches[s<00><00><12>4<EFBFBD>:<3A>:<3A><EFBFBD><11>"<22>"r5c<01>2<00>t|j<00>dkDSrqr<>r<>s r3rz!StampStep.should_unmerge_branches^s<00><00><12>4<EFBFBD>8<EFBFBD>8<EFBFBD>}<7D>q<EFBFBD> <20> r5c<01><><00>|jr|j|jfn|j|jf\}}|j<00>J<00>t |j|||jd<01><02>S)NTr<54>)r'rrr,r&)r2<00>up<75>downs r3rxzStampStep.infoasp<00><00><14><EFBFBD><EFBFBD><12>X<EFBFBD>X<EFBFBD>t<EFBFBD>z<EFBFBD>z<EFBFBD> "<22><16>*<2A>*<2A>d<EFBFBD>h<EFBFBD>h<EFBFBD>'<27> <11><02>D<EFBFBD>
<14> <20> <20>,<2C>,<2C>,<2C><1C><1D>*<2A>*<2A><1B><1F><1B><EFBFBD><EFBFBD><19> 
<EFBFBD>
r5r0) r<00>%Optional[Union[str, Collection[str]]]rr<>r'r<>r<>r<>r,zOptional[RevisionMap]rIrJr<>r<>rXr<>)r<>zUnion[Set[str], List[str]]rIz=Union[Tuple[List[Any], str, str], Tuple[List[str], str, str]])r<>r<>rIzTuple[str, str, List[str]]r<>)r<>r<>rIzUnion[Set[str], bool]r<>)rKrLrMr4rFr@r<>rdrNrirnrCrDrrrrrrrrrrxrAr5r3r<>r<><00>s;<00><00>/3<> )<29>4<> )<29>3<> )<29><19> )<29>
<1A> )<29> ,<2C> )<29>
<0E> )<29><1E>C<EFBFBD><1D><1D><14>
<EFBFBD><0E><1A><0E><1A><0E><18><0E><18><0E><1A> <18><1A><0E><1A>
<0E><18> <18><18><0E><18>
<0E><1D><0E><1D><0E><1B><0E><1B>*<2A>

<EFBFBD>/<2F>
<EFBFBD> F<>
<EFBFBD>
<EFBFBD><1D>
<EFBFBD> #<23>
<EFBFBD>6<> 
<EFBFBD>#<23>!<21><0E> 
<EFBFBD><0E> 
r5r<>)E<>
__future__r<00>
contextlibrr<00>loggingrm<00>typingrrrr r
r r r rrrrrr<00>
sqlalchemyrr<00>sqlalchemy.enginerrr}<00>sqlalchemy.engine.strategiesr<00>rrr<00> util.compatr<00>util.sqla_compatrrr <00>sqlalchemy.engine.baser!r"<00>sqlalchemy.engine.mockr#<00>sqlalchemy.sqlr$<00> environmentr&r<>r'<00> script.baser(r)<00>script.revisionr*r+r,<00> getLoggerrKrwr.rHr<>r&rBrKr<>rAr5r3<00><module>r<>s<><00><01>#<23>%<25>"<22><0E>
<EFBFBD><16><1B><17><1D>!<21><17><1B><1B><17><1B><16><18> <20><18><1D>%<25>$<24>-<2D>;<3B><12><13><1E>#<23>&<26><10>)<29>%<25>1<>2<>5<>)<29>/<2F><1F>$<24>-<2D>1<>*<2A>-<2D><17>g<EFBFBD><17><17><08>!<21><03>7<>7<>:Z

<EFBFBD>Z

<EFBFBD>zl-<2D>l-<2D>^@N<01>@N<01>F0"<22>0"<22>f_
<EFBFBD>=<3D>_
<EFBFBD>Dv
<EFBFBD> <0A>v
r5