| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
given the same name; for now it is assumed that the "index" is the
implicit one Postgreql generates. Future integration with
new SQLAlchemy 1.0 features will improve this to be more
resilient.
fixes #247
|
| |
|
|
|
|
|
|
|
| |
autogenerate will now place the "drop constraint" calls *before*
the "drop column" calls, so that columns involved in those constraints
still exist when the constraint is dropped.
fixes #247
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by far the most significant change Alembic has seen since its inception;
while the workflow of most commands hasn't changed, and the format
of version files and the ``alembic_version`` table are unchanged as well,
a new suite of features opens up in the case where multiple version
files refer to the same parent, or to the "base". Merging of
branches, operating across distinct named heads, and multiple
independent bases are now all supported. The feature incurs radical
changes to the internals of versioning and traversal, and should be
treated as "beta mode" for the next several subsequent releases
within 0.7.
fixes #167
|
| |
|
|\
| |
| |
| | |
into pr33
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
contains unicode literals. The first is that the "quoted_name" construct
that SQLAlchemy uses to represent table and column names as well
as schema names does not ``repr()`` correctly on Py2K when the value
contains unicode characters; therefore an explicit stringification is
added to these. Additionally, SQL expressions such as server defaults
were not being generated in a unicode-safe fashion leading to decode
errors if server defaults contained non-ascii characters.
fixes #243
|
|
|
|
| |
and reading scripts; try to put tests against common themes together, improve names
|
|
|
|
| |
where the tests focus on consumption of the versions/ directory.
|
|\
| |
| |
| | |
https://bitbucket.org/davidszotten/alembic into pr29
|
| |
| |
| |
| | |
Fixes #174
|
| |
| |
| |
| |
| |
| | |
- get batch mode to fail gracefully, dropping the temp table if
the operation fails
- finish tutorial
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | | |
duplicate indexes against the same columns
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
the drop + recreate routine still needs a solution for refernential
integrity for it to be of general use
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- run tests against mysql/PG to make sure auto mode works at least, try
a proof of concept recreate for MySQL. recreate doesn't work on PG
as constraint names are global (ugh). Will have to figure something
out on that.
|
| | |
| | |
| | |
| | | |
- fixes to add column
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
the :meth:`.Operations.create_table` method is used. This ``Table``
is suitable for use in subsequent SQL operations, in particular
the :meth:`.Operations.bulk_insert` operation.
fixes #205
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
:paramref:`.EnvironmentContext.configure.include_object` hook.
Indexes are sent with type ``"index"`` and unique constraints with
type ``"unique_constraint"``.
fixes #203
|
| |
| |
| |
| |
| |
| | |
SQL expression inside of a CheckConstraint(), when rendering the SQL
as a text string; supported for SQLAlchemy 0.8.0 and forward.
fixes #219
|
| |
| |
| |
| |
| |
| |
| |
| | |
a column that's part of an explicit PrimaryKeyConstraint would not
have its "nullable" flag set to False, thus producing a false
autogenerate. Also added a related correction to MySQL which will
correct for MySQL's implicit server default of '0' when a NULL integer
column is turned into a primary key column. fixes #199
|
| |
| |
| |
| |
| |
| |
| | |
foreign key reported by MySQL would cause a KeyError as Alembic
attempted to remove MySQL's implicitly generated indexes from the
autogenerate list.
fixes #240
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
autogenerate will skip this also. Pull request courtesy
Dj Gilcrease. fixes #28
- The :paramref:`.EnvironmentContext.configure.version_table`
and :paramref:`.EnvironmentContext.configure.version_table_schema`
arguments are now honored during the autogenerate process, such that
these names will be used as the "skip" names on both the database
reflection and target metadata sides. fixes #77
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
to "sa." was to force users to deal with making sure their custom
types came from a fixed module somewhere. However, it's not worth
defending this rationale.
The default value of the
:paramref:`.EnvironmentContext.configure.user_module_prefix`
parameter is **no longer the same as the SQLAlchemy prefix**.
When omitted, user-defined types will now use the ``__module__``
attribute of the type class itself when rendering in an
autogenerated module.
fixes #229
|
|/
|
|
|
|
|
|
|
| |
Revision files are now written out using the ``'wb'`` modifier to
``open()``, since Mako reads the templates with ``'rb'``, thus preventing
CRs from being doubled up as has been observed on windows. The encoding
of the output now defaults to 'utf-8', which can be configured using
a newly added config file parameter ``output_encoding``.
fixes #234
|
| |
|
| |
|
|
|
|
|
|
|
| |
construct when using the ``schema`` argument within operations. This
allows a name containing a dot to be fully quoted, as well as to
provide configurable quoting on a per-name basis.
fixes #230
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the server default of INTEGER/BIGINT columns as they are reflected
during autogenerate for the pattern ``nextval(<name>...)`` containing
a potential sequence name, then queries ``pg_catalog`` to see if this
sequence is "owned" by the column being reflected; if so, it assumes
this is a SERIAL or BIGSERIAL column and the server default is
omitted from the column reflection as well as any kind of
server_default comparison or rendering, along with an INFO message
in the logs indicating this has taken place. This allows SERIAL/BIGSERIAL
columns to keep the SEQUENCE from being unnecessarily present within
the autogenerate operation.
fixes #73
|
| |
|
|
|
|
| |
- add tests for CAST within index
|
|
|
|
|
|
|
|
| |
- in particular we've changed the server_default for order.amount
to text('0'); SQlite and Postgresql now both report the server
default as '0', whereas previously, when we were emitting '0'
with the quotes in the CREATE TABLE, SQlite reported it as
"'0'" and PG as '0::numeric'.
|
| |
|
|
|
|
|
|
| |
the method previously used in _render_server_default() in render;
these two functions become more specific to compare vs. render now
so are separated out
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:meth:`.Operations.create_index` directive. Within the list of columns,
the SQLAlchemy ``text()`` construct can be sent, embedding a literal
SQL expression; the :meth:`.Operations.create_index` will perform some hackery
behind the scenes to get the :class:`.Index` construct to cooperate.
This works around some current limitations in :class:`.Index`
which should be resolved on the SQLAlchemy side at some point.
fixes #222
|
| | |
|
| | |
|