METADATA 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. Metadata-Version: 2.0
  2. Name: alembic
  3. Version: 0.9.2
  4. Summary: A database migration tool for SQLAlchemy.
  5. Home-page: http://bitbucket.org/zzzeek/alembic
  6. Author: Mike Bayer
  7. Author-email: mike@zzzcomputing.com
  8. License: MIT
  9. Keywords: SQLAlchemy migrations
  10. Platform: UNKNOWN
  11. Classifier: Development Status :: 4 - Beta
  12. Classifier: Environment :: Console
  13. Classifier: Intended Audience :: Developers
  14. Classifier: Programming Language :: Python
  15. Classifier: Programming Language :: Python :: 3
  16. Classifier: Programming Language :: Python :: Implementation :: CPython
  17. Classifier: Programming Language :: Python :: Implementation :: PyPy
  18. Classifier: Topic :: Database :: Front-Ends
  19. Requires-Dist: Mako
  20. Requires-Dist: SQLAlchemy (>=0.7.6)
  21. Requires-Dist: python-dateutil
  22. Requires-Dist: python-editor (>=0.3)
  23. Alembic is a database migrations tool written by the author
  24. of `SQLAlchemy <http://www.sqlalchemy.org>`_. A migrations tool
  25. offers the following functionality:
  26. * Can emit ALTER statements to a database in order to change
  27. the structure of tables and other constructs
  28. * Provides a system whereby "migration scripts" may be constructed;
  29. each script indicates a particular series of steps that can "upgrade" a
  30. target database to a new version, and optionally a series of steps that can
  31. "downgrade" similarly, doing the same steps in reverse.
  32. * Allows the scripts to execute in some sequential manner.
  33. The goals of Alembic are:
  34. * Very open ended and transparent configuration and operation. A new
  35. Alembic environment is generated from a set of templates which is selected
  36. among a set of options when setup first occurs. The templates then deposit a
  37. series of scripts that define fully how database connectivity is established
  38. and how migration scripts are invoked; the migration scripts themselves are
  39. generated from a template within that series of scripts. The scripts can
  40. then be further customized to define exactly how databases will be
  41. interacted with and what structure new migration files should take.
  42. * Full support for transactional DDL. The default scripts ensure that all
  43. migrations occur within a transaction - for those databases which support
  44. this (Postgresql, Microsoft SQL Server), migrations can be tested with no
  45. need to manually undo changes upon failure.
  46. * Minimalist script construction. Basic operations like renaming
  47. tables/columns, adding/removing columns, changing column attributes can be
  48. performed through one line commands like alter_column(), rename_table(),
  49. add_constraint(). There is no need to recreate full SQLAlchemy Table
  50. structures for simple operations like these - the functions themselves
  51. generate minimalist schema structures behind the scenes to achieve the given
  52. DDL sequence.
  53. * "auto generation" of migrations. While real world migrations are far more
  54. complex than what can be automatically determined, Alembic can still
  55. eliminate the initial grunt work in generating new migration directives
  56. from an altered schema. The ``--autogenerate`` feature will inspect the
  57. current status of a database using SQLAlchemy's schema inspection
  58. capabilities, compare it to the current state of the database model as
  59. specified in Python, and generate a series of "candidate" migrations,
  60. rendering them into a new migration script as Python directives. The
  61. developer then edits the new file, adding additional directives and data
  62. migrations as needed, to produce a finished migration. Table and column
  63. level changes can be detected, with constraints and indexes to follow as
  64. well.
  65. * Full support for migrations generated as SQL scripts. Those of us who
  66. work in corporate environments know that direct access to DDL commands on a
  67. production database is a rare privilege, and DBAs want textual SQL scripts.
  68. Alembic's usage model and commands are oriented towards being able to run a
  69. series of migrations into a textual output file as easily as it runs them
  70. directly to a database. Care must be taken in this mode to not invoke other
  71. operations that rely upon in-memory SELECTs of rows - Alembic tries to
  72. provide helper constructs like bulk_insert() to help with data-oriented
  73. operations that are compatible with script-based DDL.
  74. * Non-linear, dependency-graph versioning. Scripts are given UUID
  75. identifiers similarly to a DVCS, and the linkage of one script to the next
  76. is achieved via human-editable markers within the scripts themselves.
  77. The structure of a set of migration files is considered as a
  78. directed-acyclic graph, meaning any migration file can be dependent
  79. on any other arbitrary set of migration files, or none at
  80. all. Through this open-ended system, migration files can be organized
  81. into branches, multiple roots, and mergepoints, without restriction.
  82. Commands are provided to produce new branches, roots, and merges of
  83. branches automatically.
  84. * Provide a library of ALTER constructs that can be used by any SQLAlchemy
  85. application. The DDL constructs build upon SQLAlchemy's own DDLElement base
  86. and can be used standalone by any application or script.
  87. * At long last, bring SQLite and its inablity to ALTER things into the fold,
  88. but in such a way that SQLite's very special workflow needs are accommodated
  89. in an explicit way that makes the most of a bad situation, through the
  90. concept of a "batch" migration, where multiple changes to a table can
  91. be batched together to form a series of instructions for a single, subsequent
  92. "move-and-copy" workflow. You can even use "move-and-copy" workflow for
  93. other databases, if you want to recreate a table in the background
  94. on a busy system.
  95. Documentation and status of Alembic is at http://alembic.zzzcomputing.com/