Name | alembic JSON |
Version |
1.14.0
JSON |
| download |
home_page | https://alembic.sqlalchemy.org |
Summary | A database migration tool for SQLAlchemy. |
upload_time | 2024-11-04 18:44:22 |
maintainer | None |
docs_url | https://pythonhosted.org/alembic/ |
author | Mike Bayer |
requires_python | >=3.8 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
Alembic is a database migrations tool written by the author
of `SQLAlchemy <http://www.sqlalchemy.org>`_. A migrations tool
offers the following functionality:
* Can emit ALTER statements to a database in order to change
the structure of tables and other constructs
* Provides a system whereby "migration scripts" may be constructed;
each script indicates a particular series of steps that can "upgrade" a
target database to a new version, and optionally a series of steps that can
"downgrade" similarly, doing the same steps in reverse.
* Allows the scripts to execute in some sequential manner.
The goals of Alembic are:
* Very open ended and transparent configuration and operation. A new
Alembic environment is generated from a set of templates which is selected
among a set of options when setup first occurs. The templates then deposit a
series of scripts that define fully how database connectivity is established
and how migration scripts are invoked; the migration scripts themselves are
generated from a template within that series of scripts. The scripts can
then be further customized to define exactly how databases will be
interacted with and what structure new migration files should take.
* Full support for transactional DDL. The default scripts ensure that all
migrations occur within a transaction - for those databases which support
this (Postgresql, Microsoft SQL Server), migrations can be tested with no
need to manually undo changes upon failure.
* Minimalist script construction. Basic operations like renaming
tables/columns, adding/removing columns, changing column attributes can be
performed through one line commands like alter_column(), rename_table(),
add_constraint(). There is no need to recreate full SQLAlchemy Table
structures for simple operations like these - the functions themselves
generate minimalist schema structures behind the scenes to achieve the given
DDL sequence.
* "auto generation" of migrations. While real world migrations are far more
complex than what can be automatically determined, Alembic can still
eliminate the initial grunt work in generating new migration directives
from an altered schema. The ``--autogenerate`` feature will inspect the
current status of a database using SQLAlchemy's schema inspection
capabilities, compare it to the current state of the database model as
specified in Python, and generate a series of "candidate" migrations,
rendering them into a new migration script as Python directives. The
developer then edits the new file, adding additional directives and data
migrations as needed, to produce a finished migration. Table and column
level changes can be detected, with constraints and indexes to follow as
well.
* Full support for migrations generated as SQL scripts. Those of us who
work in corporate environments know that direct access to DDL commands on a
production database is a rare privilege, and DBAs want textual SQL scripts.
Alembic's usage model and commands are oriented towards being able to run a
series of migrations into a textual output file as easily as it runs them
directly to a database. Care must be taken in this mode to not invoke other
operations that rely upon in-memory SELECTs of rows - Alembic tries to
provide helper constructs like bulk_insert() to help with data-oriented
operations that are compatible with script-based DDL.
* Non-linear, dependency-graph versioning. Scripts are given UUID
identifiers similarly to a DVCS, and the linkage of one script to the next
is achieved via human-editable markers within the scripts themselves.
The structure of a set of migration files is considered as a
directed-acyclic graph, meaning any migration file can be dependent
on any other arbitrary set of migration files, or none at
all. Through this open-ended system, migration files can be organized
into branches, multiple roots, and mergepoints, without restriction.
Commands are provided to produce new branches, roots, and merges of
branches automatically.
* Provide a library of ALTER constructs that can be used by any SQLAlchemy
application. The DDL constructs build upon SQLAlchemy's own DDLElement base
and can be used standalone by any application or script.
* At long last, bring SQLite and its inability to ALTER things into the fold,
but in such a way that SQLite's very special workflow needs are accommodated
in an explicit way that makes the most of a bad situation, through the
concept of a "batch" migration, where multiple changes to a table can
be batched together to form a series of instructions for a single, subsequent
"move-and-copy" workflow. You can even use "move-and-copy" workflow for
other databases, if you want to recreate a table in the background
on a busy system.
Documentation and status of Alembic is at https://alembic.sqlalchemy.org/
The SQLAlchemy Project
======================
Alembic is part of the `SQLAlchemy Project <https://www.sqlalchemy.org>`_ and
adheres to the same standards and conventions as the core project.
Development / Bug reporting / Pull requests
___________________________________________
Please refer to the
`SQLAlchemy Community Guide <https://www.sqlalchemy.org/develop.html>`_ for
guidelines on coding and participating in this project.
Code of Conduct
_______________
Above all, SQLAlchemy places great emphasis on polite, thoughtful, and
constructive communication between users and developers.
Please see our current Code of Conduct at
`Code of Conduct <https://www.sqlalchemy.org/codeofconduct.html>`_.
License
=======
Alembic is distributed under the `MIT license
<https://opensource.org/licenses/MIT>`_.
Raw data
{
"_id": null,
"home_page": "https://alembic.sqlalchemy.org",
"name": "alembic",
"maintainer": null,
"docs_url": "https://pythonhosted.org/alembic/",
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Mike Bayer",
"author_email": "mike_mp@zzzcomputing.com",
"download_url": "https://files.pythonhosted.org/packages/00/1e/8cb8900ba1b6360431e46fb7a89922916d3a1b017a8908a7c0499cc7e5f6/alembic-1.14.0.tar.gz",
"platform": null,
"description": "Alembic is a database migrations tool written by the author\nof `SQLAlchemy <http://www.sqlalchemy.org>`_. A migrations tool\noffers the following functionality:\n\n* Can emit ALTER statements to a database in order to change\n the structure of tables and other constructs\n* Provides a system whereby \"migration scripts\" may be constructed;\n each script indicates a particular series of steps that can \"upgrade\" a\n target database to a new version, and optionally a series of steps that can\n \"downgrade\" similarly, doing the same steps in reverse.\n* Allows the scripts to execute in some sequential manner.\n\nThe goals of Alembic are:\n\n* Very open ended and transparent configuration and operation. A new\n Alembic environment is generated from a set of templates which is selected\n among a set of options when setup first occurs. The templates then deposit a\n series of scripts that define fully how database connectivity is established\n and how migration scripts are invoked; the migration scripts themselves are\n generated from a template within that series of scripts. The scripts can\n then be further customized to define exactly how databases will be\n interacted with and what structure new migration files should take.\n* Full support for transactional DDL. The default scripts ensure that all\n migrations occur within a transaction - for those databases which support\n this (Postgresql, Microsoft SQL Server), migrations can be tested with no\n need to manually undo changes upon failure.\n* Minimalist script construction. Basic operations like renaming\n tables/columns, adding/removing columns, changing column attributes can be\n performed through one line commands like alter_column(), rename_table(),\n add_constraint(). There is no need to recreate full SQLAlchemy Table\n structures for simple operations like these - the functions themselves\n generate minimalist schema structures behind the scenes to achieve the given\n DDL sequence.\n* \"auto generation\" of migrations. While real world migrations are far more\n complex than what can be automatically determined, Alembic can still\n eliminate the initial grunt work in generating new migration directives\n from an altered schema. The ``--autogenerate`` feature will inspect the\n current status of a database using SQLAlchemy's schema inspection\n capabilities, compare it to the current state of the database model as\n specified in Python, and generate a series of \"candidate\" migrations,\n rendering them into a new migration script as Python directives. The\n developer then edits the new file, adding additional directives and data\n migrations as needed, to produce a finished migration. Table and column\n level changes can be detected, with constraints and indexes to follow as\n well.\n* Full support for migrations generated as SQL scripts. Those of us who\n work in corporate environments know that direct access to DDL commands on a\n production database is a rare privilege, and DBAs want textual SQL scripts.\n Alembic's usage model and commands are oriented towards being able to run a\n series of migrations into a textual output file as easily as it runs them\n directly to a database. Care must be taken in this mode to not invoke other\n operations that rely upon in-memory SELECTs of rows - Alembic tries to\n provide helper constructs like bulk_insert() to help with data-oriented\n operations that are compatible with script-based DDL.\n* Non-linear, dependency-graph versioning. Scripts are given UUID\n identifiers similarly to a DVCS, and the linkage of one script to the next\n is achieved via human-editable markers within the scripts themselves.\n The structure of a set of migration files is considered as a\n directed-acyclic graph, meaning any migration file can be dependent\n on any other arbitrary set of migration files, or none at\n all. Through this open-ended system, migration files can be organized\n into branches, multiple roots, and mergepoints, without restriction.\n Commands are provided to produce new branches, roots, and merges of\n branches automatically.\n* Provide a library of ALTER constructs that can be used by any SQLAlchemy\n application. The DDL constructs build upon SQLAlchemy's own DDLElement base\n and can be used standalone by any application or script.\n* At long last, bring SQLite and its inability to ALTER things into the fold,\n but in such a way that SQLite's very special workflow needs are accommodated\n in an explicit way that makes the most of a bad situation, through the\n concept of a \"batch\" migration, where multiple changes to a table can\n be batched together to form a series of instructions for a single, subsequent\n \"move-and-copy\" workflow. You can even use \"move-and-copy\" workflow for\n other databases, if you want to recreate a table in the background\n on a busy system.\n\nDocumentation and status of Alembic is at https://alembic.sqlalchemy.org/\n\nThe SQLAlchemy Project\n======================\n\nAlembic is part of the `SQLAlchemy Project <https://www.sqlalchemy.org>`_ and\nadheres to the same standards and conventions as the core project.\n\nDevelopment / Bug reporting / Pull requests\n___________________________________________\n\nPlease refer to the\n`SQLAlchemy Community Guide <https://www.sqlalchemy.org/develop.html>`_ for\nguidelines on coding and participating in this project.\n\nCode of Conduct\n_______________\n\nAbove all, SQLAlchemy places great emphasis on polite, thoughtful, and\nconstructive communication between users and developers.\nPlease see our current Code of Conduct at\n`Code of Conduct <https://www.sqlalchemy.org/codeofconduct.html>`_.\n\nLicense\n=======\n\nAlembic is distributed under the `MIT license\n<https://opensource.org/licenses/MIT>`_.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A database migration tool for SQLAlchemy.",
"version": "1.14.0",
"project_urls": {
"Changelog": "https://alembic.sqlalchemy.org/en/latest/changelog.html",
"Documentation": "https://alembic.sqlalchemy.org/en/latest/",
"Homepage": "https://alembic.sqlalchemy.org",
"Issue Tracker": "https://github.com/sqlalchemy/alembic/issues/",
"Source": "https://github.com/sqlalchemy/alembic/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cb068b505aea3d77021b18dcbd8133aa1418f1a1e37e432a465b14c46b2c0eaa",
"md5": "e63c619511e5af587d8a8edaa1452ab3",
"sha256": "99bd884ca390466db5e27ffccff1d179ec5c05c965cfefc0607e69f9e411cb25"
},
"downloads": -1,
"filename": "alembic-1.14.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e63c619511e5af587d8a8edaa1452ab3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 233482,
"upload_time": "2024-11-04T18:44:24",
"upload_time_iso_8601": "2024-11-04T18:44:24.335586Z",
"url": "https://files.pythonhosted.org/packages/cb/06/8b505aea3d77021b18dcbd8133aa1418f1a1e37e432a465b14c46b2c0eaa/alembic-1.14.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "001e8cb8900ba1b6360431e46fb7a89922916d3a1b017a8908a7c0499cc7e5f6",
"md5": "a12686c41704218fdb29f140be75cdfd",
"sha256": "b00892b53b3642d0b8dbedba234dbf1924b69be83a9a769d5a624b01094e304b"
},
"downloads": -1,
"filename": "alembic-1.14.0.tar.gz",
"has_sig": false,
"md5_digest": "a12686c41704218fdb29f140be75cdfd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 1916172,
"upload_time": "2024-11-04T18:44:22",
"upload_time_iso_8601": "2024-11-04T18:44:22.066976Z",
"url": "https://files.pythonhosted.org/packages/00/1e/8cb8900ba1b6360431e46fb7a89922916d3a1b017a8908a7c0499cc7e5f6/alembic-1.14.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-04 18:44:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sqlalchemy",
"github_project": "alembic",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "alembic"
}