summaryrefslogtreecommitdiff
path: root/docs/build/ops.rst
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-11-15 13:07:40 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-11-15 13:07:40 -0500
commit2c05c7e0de90eaea23cd7e34b4405c2915a25171 (patch)
tree04a90fc89bca75c05a3035916051da8e37bcc455 /docs/build/ops.rst
parentb5facd3a575afd1c2f99c8efcf888a077804c300 (diff)
downloadalembic-2c05c7e0de90eaea23cd7e34b4405c2915a25171.tar.gz
- remove add_constraint, this is not the current philosophy of the op package
- document most op methods - add support for create_index, drop_index - remove needless arguments from drop_table - propagate arguemnts to UniqueConstraint
Diffstat (limited to 'docs/build/ops.rst')
-rw-r--r--docs/build/ops.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/build/ops.rst b/docs/build/ops.rst
index 92338a5..d4ed87d 100644
--- a/docs/build/ops.rst
+++ b/docs/build/ops.rst
@@ -10,6 +10,17 @@ The directives here are used within user-defined migration files,
within the ``upgrade()`` and ``downgrade()`` functions, as well as
any functions further invoked by those.
+A key design philosophy to the :mod:`alembic.op` functions is that
+to the greatest degree possible, they internally generate the
+appropriate SQLAlchemy metadata, typically involving
+:class:`~sqlalchemy.schema.Table` and :class:`~sqlalchemy.schema.Constraint`
+objects. This so that migration instructions can be
+given in terms of just the string names and/or flags involved.
+The exceptions to this
+rule include the :func:`.op.add_column` and :func:`.op.create_table`
+directives, which require full :class:`~sqlalchemy.schema.Column`
+objects, though the table metadata is still generated here.
+
The functions here all require that a :class:`.Context` has been
configured within the ``env.py`` script. Under normal circumstances
this is always the case, as the migration scripts are invoked via