summaryrefslogtreecommitdiff
path: root/docs/build/batch.rst
Commit message (Collapse)AuthorAgeFilesLines
* restore drop_index.table_name, drop_constraint.type_ as positionalMike Bayer2023-05-161-1/+1
| | | | | | | | | | | | | These two API changes were identified as having legacy use patterns and should be revisited using a deprecation warning for removal in either 1.12 or 1.13. Add documentation re: Alembic not using semver, fix incorrect calling signature example in batch documentation. Change-Id: I33dc5a8d058bcce77591bb037ae964e626a3387f Fixes: #1243 Fixes: #1245
* Fix/typos doc build (#910)Kevin Kirsche2021-09-111-1/+1
| | | | | | | * fix: typos in docs/build/batch.rst * fix: typos in docs/build/autogenerate.rst * fix: typos in docs/build/changelog.rst
* clarify that only named check constraints are regeneratedMike Bayer2021-09-011-7/+16
| | | | | Change-Id: Ie0489137122d6ccedfa7c1af44dc8420a0842ee8 References: #400
* support named CHECK constraints in batchMike Bayer2021-08-241-3/+51
| | | | | | | | | | | | | | | | | | | Named CHECK constraints are now supported by batch mode, and will automatically be part of the recreated table assuming they are named. They also can be explicitly dropped using ``op.drop_constraint()``. For "unnamed" CHECK constraints, these are still skipped as they cannot be distinguished from the CHECK constraints that are generated by the ``Boolean`` and ``Enum`` datatypes. Note that this change may require adjustments to migrations that drop or rename columns which feature an associated named check constraint, such that an additional ``op.drop_constraint()`` directive should be added for that named constraint as there will no longer be an associated column for it; for the ``Boolean`` and ``Enum`` datatypes, an ``existing_type`` keyword may be passed to ``BatchOperations.drop_constraint`` as well. Fixes: #884 Change-Id: I3694430f7c9735bcc3b0765893b333cc8e0d1cd3
* remove unnecessary whitespace changes made by GitHubJames Lamb2021-03-011-2/+1
|
* [doc] clarify ALTER language in batch docsJames Lamb2021-03-011-1/+1
|
* remove all .. version(?:changed|added):: prior to 1.0Mike Bayer2021-01-181-23/+0
| | | | Change-Id: I2a1a0c273adc871b12e13d7f913609fe1122dab3
* - Repaired batch migration support for "schema" types which generateMike Bayer2016-01-221-0/+21
| | | | | | | | | | | | | | | constraints, in particular the ``Boolean`` datatype which generates a CHECK constraint. Previously, an alter column operation with this type would fail to correctly accommodate for the CHECK constraint on change both from and to this type. In the former case the operation would fail entirely, in the latter, the CHECK constraint would not get generated. Both of these issues are repaired. fixes #354 - Changing a schema type such as ``Boolean`` to a non-schema type would emit a drop constraint operation which emits ``NotImplementedError`` for the MySQL dialect. This drop constraint operation is now skipped when the constraint originates from a schema type. fixes #355
* - Batch mode generates a FOREIGN KEY constraint that is self-referentialMike Bayer2015-12-151-9/+31
| | | | | | | | | | | | | using the ultimate table name, rather than ``_alembic_batch_temp``. When the table is renamed from ``_alembic_batch_temp`` back to the original name, the FK now points to the right name. This will **not** work if referential integrity is being enforced (eg. SQLite "PRAGMA FOREIGN_KEYS=ON") since the original table is dropped and the new table then renamed to that name, however this is now consistent with how foreign key constraints on **other** tables already operate with batch mode; these don't support batch mode if referential integrity is enabled in any case. fixes #345
* - Fully implemented theMike Bayer2015-03-271-0/+6
| | | | | | | | | | :paramref:`~.Operations.batch_alter_table.copy_from` parameter for batch mode, which previously was not functioning. This allows "batch mode" to be usable in conjunction with ``--sql``. fixes #289 - sqlite dialect checks for "create_index" and "drop_index" as exceptions for "recreate" in batch mode, the same way as "add_column", so that unnecessary table recreates don't emit for index-only operations
* - naming convention limited to SQLA 0.9.4 or greaterMike Bayer2014-11-301-0/+3
|
* - reword the first paragraph about offline mode to better flowMike Bayer2014-11-301-5/+7
| | | | from the preceding sections.
* - Added :paramref:`~.Operations.batch_alter_table.naming_convention`Mike Bayer2014-11-301-28/+92
| | | | | | | | | argument to :meth:`.Operations.batch_alter_table`, as this is necessary in order to drop foreign key constraints; these are often unnamed on the target database, and in the case that they are named, SQLAlchemy is as of the 0.9 series not including these names yet. - rework the docs on batch + constraints, which remains subject to a lot of caveats and problems, some to be resolved in SQLAlchemy 1.0
* - Repaired the inspection, copying and rendering of CHECK constraintsMike Bayer2014-11-291-1/+52
| | | | | | | | | | | | | | and so-called "schema" types such as Boolean, Enum within the batch copy system; the CHECK constraint will not be "doubled" when the table is copied, and additionally the inspection of the CHECK constraint for its member columns will no longer fail with an attribute error. fixes #249 - Added two new arguments :paramref:`.Operations.batch_alter_table.reflect_args` and :paramref:`.Operations.batch_alter_table.reflect_kwargs`, so that arguments may be passed directly to suit the :class:`~.sqlalchemy.schema.Table` object that will be reflected.
* - now that branching is an enormous chapter, break out the docs intoMike Bayer2014-11-221-0/+206
individual pages. the pages here are a little slim in the middle but overall the one-page docs were getting extremely long.