[![PyPI version](https://badge.fury.io/py/yandex-pgmigrate.svg)](https://badge.fury.io/py/yandex-pgmigrate)
![Build Status](https://github.com/yandex/pgmigrate/workflows/Test/badge.svg)
# PGmigrate
PostgreSQL migrations made easy
## Overview
PGmigrate is a database migration tool developed by Yandex.
PGmigrate has the following key-features:
* **Transactional and nontransactional migrations:** you can enjoy whole power
of PostgreSQL DDL
* **Callbacks:** you can run some DDL on specific steps of migration process
(e.g. drop some code before executing migrations, and create it back after
migrations were applied)
* **Online migrations:** you can execute series of transactional migrations
and callbacks in a single transaction (so, if something goes wrong simple
`ROLLBACK` will bring you in consistent state)
## Install
```
pip install yandex-pgmigrate
```
## Running tests
Tests require running PostgreSQL instance with superuser (to create/drop dbs).
You could setup this yourself and use [tox](https://pypi.python.org/pypi/tox)
to start tests:
```
tox
```
Second option is to use [docker](https://www.docker.com) and make:
```
make test
```
## How to use
Complete manual is [here](doc/tutorial.md).
## Release history
* 1.0.9 (2024-07-06)
* Add an option to show only unapplied migrations in info
* 1.0.8 (2024-03-08)
* Allow reordering setting schema version and afterEach callback
* 1.0.7 (2022-02-02)
* Skip unnecessary schema creation on init
* Add file path to statement apply error log
* Add version gaps check
* 1.0.6 (2020-10-29)
* Make dsn manipulations more robust
* Fix empty values-related bugs in config and args parsing
* 1.0.5 (2020-02-29)
* Use application_name instead of backend pid for conflict termination
* 1.0.4 (2019-04-14)
* Allow using subdirs in migrations folder
* 1.0.3 (2017-12-28)
* Fix migration error with comment at the end of file
* Add blocking pids termination
* Some minor fixes and improvements
* 1.0.2 (2017-04-05)
* Speed up get_info function a bit
* Fix callbacks in transactional/nontransactional migrations mix on db init
* 1.0.1 (2017-04-01)
* Fix bug with python format patterns in migration text
* Sort info command output by version
* Support 'latest' target version
* Add option to override user in migration meta
* Fix info command fail without target on initialized database
* Add session setup option
* 1.0.0 (2016-10-03)
* First opensource version
## License
Distributed under the PostgreSQL license. See [LICENSE](LICENSE) for more
information.
Raw data
{
"_id": null,
"home_page": "https://github.com/yandex/pgmigrate/",
"name": "yandex-pgmigrate",
"maintainer": "Yandex LLC",
"docs_url": null,
"requires_python": null,
"maintainer_email": "opensource@yandex-team.ru",
"keywords": null,
"author": "Yandex LLC",
"author_email": "opensource@yandex-team.ru",
"download_url": "https://files.pythonhosted.org/packages/8f/da/e2882f92d6909d78073b166718360e80d4dcc800a73e4a7b16a362a9cead/yandex_pgmigrate-1.0.9.tar.gz",
"platform": "Linux",
"description": "[![PyPI version](https://badge.fury.io/py/yandex-pgmigrate.svg)](https://badge.fury.io/py/yandex-pgmigrate)\n![Build Status](https://github.com/yandex/pgmigrate/workflows/Test/badge.svg)\n\n# PGmigrate\n\nPostgreSQL migrations made easy\n\n## Overview\n\nPGmigrate is a database migration tool developed by Yandex.\n\nPGmigrate has the following key-features:\n\n* **Transactional and nontransactional migrations:** you can enjoy whole power\nof PostgreSQL DDL\n* **Callbacks:** you can run some DDL on specific steps of migration process\n(e.g. drop some code before executing migrations, and create it back after\nmigrations were applied)\n* **Online migrations:** you can execute series of transactional migrations\nand callbacks in a single transaction (so, if something goes wrong simple\n`ROLLBACK` will bring you in consistent state)\n\n## Install\n\n```\npip install yandex-pgmigrate\n```\n\n## Running tests\n\nTests require running PostgreSQL instance with superuser (to create/drop dbs).\nYou could setup this yourself and use [tox](https://pypi.python.org/pypi/tox)\nto start tests:\n```\ntox\n```\nSecond option is to use [docker](https://www.docker.com) and make:\n```\nmake test\n```\n\n## How to use\n\nComplete manual is [here](doc/tutorial.md).\n\n## Release history\n\n* 1.0.9 (2024-07-06)\n * Add an option to show only unapplied migrations in info\n* 1.0.8 (2024-03-08)\n * Allow reordering setting schema version and afterEach callback\n* 1.0.7 (2022-02-02)\n * Skip unnecessary schema creation on init\n * Add file path to statement apply error log\n * Add version gaps check\n* 1.0.6 (2020-10-29)\n * Make dsn manipulations more robust\n * Fix empty values-related bugs in config and args parsing\n* 1.0.5 (2020-02-29)\n * Use application_name instead of backend pid for conflict termination\n* 1.0.4 (2019-04-14)\n * Allow using subdirs in migrations folder\n* 1.0.3 (2017-12-28)\n * Fix migration error with comment at the end of file\n * Add blocking pids termination\n * Some minor fixes and improvements\n* 1.0.2 (2017-04-05)\n * Speed up get_info function a bit\n * Fix callbacks in transactional/nontransactional migrations mix on db init\n* 1.0.1 (2017-04-01)\n * Fix bug with python format patterns in migration text\n * Sort info command output by version\n * Support 'latest' target version\n * Add option to override user in migration meta\n * Fix info command fail without target on initialized database\n * Add session setup option\n* 1.0.0 (2016-10-03)\n * First opensource version\n\n## License\n\nDistributed under the PostgreSQL license. See [LICENSE](LICENSE) for more\ninformation.\n",
"bugtrack_url": null,
"license": "PostgreSQL License",
"summary": "PostgreSQL migrations made easy",
"version": "1.0.9",
"project_urls": {
"Homepage": "https://github.com/yandex/pgmigrate/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ceb8f6079c3ca5acb4bd3f774232f25660d1af4776c55d5800876e28c114ccbf",
"md5": "916cdcf11649fb4f77d002ccb69cc368",
"sha256": "f6e32056d477f60161b001a0c8040e50024fd03f4d55a9f02ea59ab4178aa2da"
},
"downloads": -1,
"filename": "yandex_pgmigrate-1.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "916cdcf11649fb4f77d002ccb69cc368",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11985,
"upload_time": "2024-07-06T14:43:01",
"upload_time_iso_8601": "2024-07-06T14:43:01.014510Z",
"url": "https://files.pythonhosted.org/packages/ce/b8/f6079c3ca5acb4bd3f774232f25660d1af4776c55d5800876e28c114ccbf/yandex_pgmigrate-1.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8fdae2882f92d6909d78073b166718360e80d4dcc800a73e4a7b16a362a9cead",
"md5": "2c6b03b009da7f2d4c684b4b337d931d",
"sha256": "e42e77a09f2f5c946658f8c89fab125cfef16397c00903ff13bdcd535b4cf4b4"
},
"downloads": -1,
"filename": "yandex_pgmigrate-1.0.9.tar.gz",
"has_sig": false,
"md5_digest": "2c6b03b009da7f2d4c684b4b337d931d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13104,
"upload_time": "2024-07-06T14:43:02",
"upload_time_iso_8601": "2024-07-06T14:43:02.743443Z",
"url": "https://files.pythonhosted.org/packages/8f/da/e2882f92d6909d78073b166718360e80d4dcc800a73e4a7b16a362a9cead/yandex_pgmigrate-1.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-06 14:43:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yandex",
"github_project": "pgmigrate",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "yandex-pgmigrate"
}