sqlalchemy-migrate/doc/source/index.rst

4.7 KiB

migrate - SQLAlchemy Migrate (schema change management)

migrate

Evan Rosson

Author

Evan Rosson

Maintainer

Domen Kožar <domenNO@SPAMdev.si>

Maintainer

Jan Dittberner <jan.dittbernerNO@SPAMgooglemail.com>

Source Code

https://github.com/stackforge/sqlalchemy-migrate

Documentation

https://sqlalchemy-migrate.readthedocs.org/

Issues

https://bugs.launchpad.net/sqlalchemy-migrate

Generated
License

MIT

Version

Overview

Inspired by Ruby on Rails' migrations, SQLAlchemy Migrate provides a way to deal with database schema changes in SQLAlchemy projects.

Migrate was started as part of Google's Summer of Code by Evan Rosson, mentored by Jonathan LaCour.

The project was taken over by a small group of volunteers when Evan had no free time for the project. It is now hosted as a Github project. During the hosting change the project was renamed to SQLAlchemy Migrate.

Currently, sqlalchemy-migrate supports Python versions from 2.6 to 2.7. SQLAlchemy Migrate 0.7.2 supports SQLAlchemy 0.6.x and 0.7.x branches.

Support for Python 2.4 and 2.5 as well as SQLAlchemy 0.5.x has been dropped after sqlalchemy-migrate 0.7.1.

Warning

Version 0.6 broke backward compatibility, please read changelog <backwards-06> for more info.

Download and Development

download credits

Dialect support

Operation / Dialect sqlite <sqlite-d> postgres <postgres-d> mysql <mysql-d> oracle <oracle-d> firebird <firebird-d> mssql DB2
ALTER TABLE RENAME TABLE <table-rename> yes yes yes yes no not supported unknown
ALTER TABLE RENAME COLUMN <column-alter> yes (workaround)1 yes yes yes yes not supported unknown
ALTER TABLE ADD COLUMN <column-create> yes (workaround)2 yes yes yes yes not supported unknown
ALTER TABLE DROP COLUMN <column-drop> yes (workaround)3 yes yes yes yes not supported unknown
ALTER TABLE ALTER COLUMN <column-alter> yes (workaround)4 yes yes yes (with limitations)5 yes6 not supported unknown
ALTER TABLE ADD CONSTRAINT <constraint-tutorial> partial (workaround)7 yes yes yes yes not supported unknown
ALTER TABLE DROP CONSTRAINT <constraint-tutorial> partial (workaround)8 yes yes yes yes not supported unknown
RENAME INDEX <index-rename> no yes no yes yes not supported unknown

Tutorials

List of useful tutorials:

User guide

SQLAlchemy Migrate is split into two parts, database schema versioning (migrate.versioning) and database migration management (migrate.changeset). The versioning API is available as the migrate <command-line-usage> command.

versioning changeset tools faq glossary

API Documentation

api

Changelog

changelog

Indices and tables

  • genindex
  • modindex
  • search

  1. Table is renamed to temporary table, new table is created followed by INSERT statements.↩︎

  2. See http://www.sqlite.org/lang_altertable.html for more information. In cases not supported by sqlite, table is renamed to temporary table, new table is created followed by INSERT statements.↩︎

  3. Table is renamed to temporary table, new table is created followed by INSERT statements.↩︎

  4. Table is renamed to temporary table, new table is created followed by INSERT statements.↩︎

  5. You can not change datatype or rename column if table has NOT NULL data, see http://blogs.x2line.com/al/archive/2005/08/30/1231.aspx for more information.↩︎

  6. Changing nullable is not supported↩︎

  7. Table is renamed to temporary table, new table is created followed by INSERT statements.↩︎

  8. Table is renamed to temporary table, new table is created followed by INSERT statements.↩︎