iElectric 7eafe744c2 - refactor migrate.changeset;
- visitors are refactored to be more unified
- constraint module is refactored, CheckConstraint is added
- documentation is partialy updated, dialect support table is added (unfinished)
- test_constraint was updated
NOTE: oracle and mysql were not tested, *may be broken*
2009-06-16 15:17:33 +00:00

6.5 KiB

migrate - SQLAlchemy Migrate (schema change management)

migrate

Evan Rosson

Author

Evan Rosson

Maintainer

Domen Kozar <domenNO@SPAMdev.si>

Source code

http://code.google.com/p/sqlalchemy-migrate/issues/list

Issues

http://code.google.com/p/sqlalchemy-migrate/

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 Google Code project. During the hosting change the project was renamed to SQLAlchemy Migrate.

Currently, sqlalchemy-migrate supports Python versions from 2.4 to 2.6. SQLAlchemy >=0.5 is supported only.

Warning

Version 0.5.5 breaks backward compatability, please read changelog <backwards-055> for more info.

Download and Development

download

Dialect support

Operation / Dialect sqlite <sqlite-d> postgres <postgres-d> mysql <mysql-d> oracle <oracle-d> firebird mssql
ALTER TABLE RENAME TABLE yes yes
ALTER TABLE RENAME COLUMN yes (workaround)1 yes
ALTER TABLE DROP COLUMN yes (workaround)2 yes
ALTER TABLE ADD COLUMN yes (with limitations)3 yes
ALTER TABLE ADD CONSTRAINT no yes
ALTER TABLE DROP CONSTRAINT no yes
ALTER TABLE ALTER COLUMN no yes
RENAME INDEX no yes

Documentation

SQLAlchemy is split into two parts, database schema versioning and database changeset management. This is represented by two python packages migrate.versioning and migrate.changeset. The versioning API is available as the migrate <command-line-usage> command.

versioning changeset tools

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. Table is renamed to temporary table, new table is created followed by INSERT statements.↩︎

  3. Visit http://www.sqlite.org/lang_altertable.html for more information.↩︎