From: Mike Bayer Date: Sun, 30 Sep 2012 20:45:20 +0000 (-0400) Subject: - for 0.4, we'll remove the "upgrading" 0.1,0.2,0.3 sections, these were very early... X-Git-Tag: rel_0_4_0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c82e8ee048b57848099cf8c089e340137b0f4db;p=thirdparty%2Fsqlalchemy%2Falembic.git - for 0.4, we'll remove the "upgrading" 0.1,0.2,0.3 sections, these were very early versions - include sqla 0.7 or 0.8 as recommended --- diff --git a/docs/build/front.rst b/docs/build/front.rst index 42c0e35a..c595ea4a 100644 --- a/docs/build/front.rst +++ b/docs/build/front.rst @@ -49,68 +49,8 @@ Dependencies Alembic's install process will ensure that `SQLAlchemy `_ is installed, in addition to other dependencies. Alembic will work with SQLAlchemy as of version **0.6**, though with a limited featureset. -The latest version of SQLAlchemy within the **0.7** series is strongly recommended. - -Upgrading from Alembic 0.2 to 0.3 -================================= - -Alembic 0.3 is mostly identical to version 0.2 except for some API -changes, allowing better programmatic access and less ambiguity -between public and private methods. In particular: - -* :class:`.ScriptDirectory` now features these methods - the old - versions have been removed unless noted: - - * :meth:`.ScriptDirectory.iterate_revisions()` - * :meth:`.ScriptDirectory.get_current_head()` (old name ``_current_head`` is available) - * :meth:`.ScriptDirectory.get_heads()` - * :meth:`.ScriptDirectory.get_base()` - * :meth:`.ScriptDirectory.generate_revision()` - * :meth:`.ScriptDirectory.get_revision()` (old name ``_get_rev`` is available) - * :meth:`.ScriptDirectory.as_revision_number()` (old name ``_as_rev_number`` is available) - -* :meth:`.MigrationContext.get_current_revision()` (old name ``_current_rev`` remains available) - -* Methods which have been made private include ``ScriptDirectory._copy_file()``, - ``ScriptDirectory._generate_template()``, ``ScriptDirectory._upgrade_revs()``, - ``ScriptDirectory._downgrade_revs()``. ``autogenerate._produce_migration_diffs``. - It's pretty unlikely that end-user applications - were using these directly. - -See the newly cleaned up :ref:`api` documentation for what are hopefully clearly -laid out use cases for API usage, particularly being able to get at the revision -information in a database as well as a script directory. - -Upgrading from Alembic 0.1 to 0.2 -================================= - -Alembic 0.2 has some reorganizations and features that might impact an existing 0.1 -installation. These include: - -* The naming convention for migration files is now customizable, and defaults - to the scheme "%(rev)s_%(slug)s", where "slug" is based on the message - added to the script. When Alembic reads one of these files, it looks - at a new variable named ``revision`` inside of the script to get at the - revision identifier. Scripts that use the new naming convention - will need to render this ``revision`` identifier inside the script, - so the ``script.py.mako`` file within an existing alembic environment - needs to have both ``revision`` and ``down_revision`` specified:: - - # revision identifiers, used by Alembic. - revision = ${repr(up_revision)} - down_revision = ${repr(down_revision)} - - Existing scripts that use the 0.1 naming convention **don't have to be changed**, - unless you are renaming them. Alembic will fall back to pulling in the version - identifier from the filename if ``revision`` isn't present, as long as the - filename uses the old naming convention. -* The ``alembic.op`` and ``alembic.context`` modules are now generated - as a collection of proxy functions, which when used refer to an - object instance installed when migrations run. ``alembic.op`` refers to - an instance of the :class:`.Operations` object, and ``alembic.context`` refers to - an instance of the :class:`.EnvironmentContext` object. Most existing - setups should be able to run with no changes, as the functions are - established at module load time and remain fully importable. +The latest version of SQLAlchemy within the **0.7** or **0.8** series is strongly recommended. + Community =========