| Name | django-liquidb JSON |
| Version |
0.4
JSON |
| download |
| home_page | |
| Summary | Liquidb is a Django app that simplifies migration management. |
| upload_time | 2023-10-28 10:29:19 |
| maintainer | |
| docs_url | None |
| author | Vitalii Gusakovskiy |
| requires_python | >=3.8 |
| license | ## License Copyright © 2021-present, Vitalii Gusakovkiy. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
asgiref
django
sqlparse
typing-extensions
backports.zoneinfo
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# Liquidb
Liquidb is a Django app that simplifies migration management.
It introduces commits (savepoints) that allows developer to take snapshot of current migration state of whole Django project.
Snapshot introduces abstraction layer, which let you easily switch back and forth in complicated migration graph of dependent apps.
In order to roll(back/forward) all migrations should be revertable.
## Requirements
Django Liquidb requires:
* Django 3.2 or later;
* Python 3.8 or later.
### Getting It
You can get Django Liquidb by using pip::
$ pip install django-liquidb
If you want to install it from source, grab the git repository from GitHub and run setup.py::
$ git clone git@github.com:Gusakovskiy/django-liquidb.git
$ cd django-liquidb
$ python setup.py install
### Quick start
1. Add "Liquidb" to your INSTALLED_APPS setting like this:
```
INSTALLED_APPS = [
...
'liquidb',
]
```
3. Run ``python manage.py migrate liquidb`` to create the liquidb models.
4. Create initial commit ``python manage.py create_migration_snapshot --name init``
### Using It
Create snapshot of your current state::
$ branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
$ hash=$(git rev-parse $branch)
$ python manage.py create_migration_snapshot --name $branch-${hash:0:8}
In case you want to overwrite some snapshot::
$ python manage.py create_migration_snapshot --name $branch-${hash:0:8} --overwrite 1
Return to desired state of db::
$ python manage.py checkout_snapshot --name state_name
Return to latest snapshot::
$ python manage.py checkout_latest_snapshot
If snapshot history is messed up you always can delete it without impact on your migration state and start from scratch::
$ python manage.py delete_snapshot_history
If want to delete only one snapshot(it can not delete currently applied snapshot remember to checkout before that)::
$ python manage.py delete_snapshot_by_name --name name
Or if you prefer admin vies you can always visit `/admin/liquidb/snapshot/` and create/apply/delete snapshot there.
> If you would like to change to readonly view in admin please change ADMIN_SNAPSHOT_ACTIONS env variable to False or overwrite it you settings
## Getting Involved
Open Source projects can always use more help. Fixing a problem, documenting a feature, adding
translation in your language. If you have some time to spare and like to help us, here are the places to do so:
- GitHub: https://github.com/Gusakovskiy/django-liquidb
### Development
#### Generating dependencies
Main dependencies::
$ pip-compile --upgrade --resolver backtracking --output-file requirements.txt pyproject.toml
Dev dependencies::
$ pip-compile --upgrade --resolver backtracking --extra dev --output-file requirements-dev.txt pyproject.toml
If you see error that you can't figure out try to add `--verbose` flag
After generating dependencies remember to change `backports.zoneinfo==0.2.1` to `backports.zoneinfo;python_version<"3.9"`
this dependency is not supported by Python >= 3.9, it should be deleted after support for those versions is ended.
### Configure environment
In you local machine create virtual environment and activate it or setup docker container and run command::
$ pip install -r requirements-dev.txt
To run test::
$ pytest tests
To run linting::
$ pylint --load-plugins=pylint_django --django-settings-module=liquidb.pylint_settings liquidb
## Support
Django Liquidb is development and maintained by developers in an Open Source manner.
Any support is welcome. You could help by writing documentation, pull-requests, report issues and/or translations.
Please remember that nobody is paid directly to develop or maintain Django Liquidb so we do have to divide our time
between work/family/hobby/this project and the rest of life.
Raw data
{
"_id": null,
"home_page": "",
"name": "django-liquidb",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Vitalii Gusakovskiy",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/15/b7/df79de0cebb3ced1293df34f2c8ec9af2f28d1a2dde7d9dce0ebbe89fadc/django-liquidb-0.4.tar.gz",
"platform": null,
"description": "# Liquidb\n\n\nLiquidb is a Django app that simplifies migration management.\nIt introduces commits (savepoints) that allows developer to take snapshot of current migration state of whole Django project.\nSnapshot introduces abstraction layer, which let you easily switch back and forth in complicated migration graph of dependent apps.\nIn order to roll(back/forward) all migrations should be revertable.\n\n\n\n## Requirements\n\nDjango Liquidb requires:\n * Django 3.2 or later;\n * Python 3.8 or later.\n\n\n### Getting It\n\nYou can get Django Liquidb by using pip::\n\n $ pip install django-liquidb\n\nIf you want to install it from source, grab the git repository from GitHub and run setup.py::\n\n $ git clone git@github.com:Gusakovskiy/django-liquidb.git\n $ cd django-liquidb\n $ python setup.py install\n\n\n\n### Quick start\n\n\n1. Add \"Liquidb\" to your INSTALLED_APPS setting like this:\n ```\n INSTALLED_APPS = [\n ...\n 'liquidb',\n ]\n ```\n\n3. Run ``python manage.py migrate liquidb`` to create the liquidb models.\n4. Create initial commit ``python manage.py create_migration_snapshot --name init``\n\n### Using It\n\n\nCreate snapshot of your current state::\n\n $ branch=$(git branch | sed -n -e 's/^\\* \\(.*\\)/\\1/p')\n $ hash=$(git rev-parse $branch)\n $ python manage.py create_migration_snapshot --name $branch-${hash:0:8}\n\nIn case you want to overwrite some snapshot::\n\n $ python manage.py create_migration_snapshot --name $branch-${hash:0:8} --overwrite 1\n\n\nReturn to desired state of db::\n\n $ python manage.py checkout_snapshot --name state_name\n\nReturn to latest snapshot::\n\n $ python manage.py checkout_latest_snapshot\n\nIf snapshot history is messed up you always can delete it without impact on your migration state and start from scratch::\n\n $ python manage.py delete_snapshot_history\n\n\nIf want to delete only one snapshot(it can not delete currently applied snapshot remember to checkout before that)::\n\n $ python manage.py delete_snapshot_by_name --name name\n\n\n\nOr if you prefer admin vies you can always visit `/admin/liquidb/snapshot/` and create/apply/delete snapshot there.\n> If you would like to change to readonly view in admin please change ADMIN_SNAPSHOT_ACTIONS env variable to False or overwrite it you settings\n\n\n## Getting Involved\n\n\nOpen Source projects can always use more help. Fixing a problem, documenting a feature, adding\ntranslation in your language. If you have some time to spare and like to help us, here are the places to do so:\n\n- GitHub: https://github.com/Gusakovskiy/django-liquidb\n\n\n### Development\n\n\n#### Generating dependencies\n\nMain dependencies::\n\n $ pip-compile --upgrade --resolver backtracking --output-file requirements.txt pyproject.toml\n\nDev dependencies::\n\n $ pip-compile --upgrade --resolver backtracking --extra dev --output-file requirements-dev.txt pyproject.toml\n\nIf you see error that you can't figure out try to add `--verbose` flag\n\n\nAfter generating dependencies remember to change `backports.zoneinfo==0.2.1` to `backports.zoneinfo;python_version<\"3.9\"`\nthis dependency is not supported by Python >= 3.9, it should be deleted after support for those versions is ended.\n\n\n### Configure environment\n\n\nIn you local machine create virtual environment and activate it or setup docker container and run command::\n\n $ pip install -r requirements-dev.txt\n\nTo run test::\n\n $ pytest tests\n\nTo run linting::\n\n $ pylint --load-plugins=pylint_django --django-settings-module=liquidb.pylint_settings liquidb\n\n## Support\n\nDjango Liquidb is development and maintained by developers in an Open Source manner.\nAny support is welcome. You could help by writing documentation, pull-requests, report issues and/or translations.\n\nPlease remember that nobody is paid directly to develop or maintain Django Liquidb so we do have to divide our time\nbetween work/family/hobby/this project and the rest of life.\n",
"bugtrack_url": null,
"license": "## License Copyright \u00a9 2021-present, Vitalii Gusakovkiy. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
"summary": "Liquidb is a Django app that simplifies migration management.",
"version": "0.4",
"project_urls": {
"Repository": "https://github.com/Gusakovskiy/django-liquidb",
"Source": "https://pypi.org/project/django-liquidb/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "892cfa0093e66cb4002967ba2cb99e0de48904e2618e9d016ad93fa20ec00685",
"md5": "6030a0e32af54b82020594cdd1032a68",
"sha256": "cbd5aeb30b81b9268d17a7da8dcc6d63bb00c597ac3b1d20965afd18f6770432"
},
"downloads": -1,
"filename": "django_liquidb-0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6030a0e32af54b82020594cdd1032a68",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 17707,
"upload_time": "2023-10-28T10:29:16",
"upload_time_iso_8601": "2023-10-28T10:29:16.850344Z",
"url": "https://files.pythonhosted.org/packages/89/2c/fa0093e66cb4002967ba2cb99e0de48904e2618e9d016ad93fa20ec00685/django_liquidb-0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "15b7df79de0cebb3ced1293df34f2c8ec9af2f28d1a2dde7d9dce0ebbe89fadc",
"md5": "5f078f8a3844812c6c8a31212e406024",
"sha256": "be9243ed2235e52f589a8848f948373144c912f3b019a9492030c3edff386a59"
},
"downloads": -1,
"filename": "django-liquidb-0.4.tar.gz",
"has_sig": false,
"md5_digest": "5f078f8a3844812c6c8a31212e406024",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 15944,
"upload_time": "2023-10-28T10:29:19",
"upload_time_iso_8601": "2023-10-28T10:29:19.783332Z",
"url": "https://files.pythonhosted.org/packages/15/b7/df79de0cebb3ced1293df34f2c8ec9af2f28d1a2dde7d9dce0ebbe89fadc/django-liquidb-0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-28 10:29:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Gusakovskiy",
"github_project": "django-liquidb",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "asgiref",
"specs": [
[
"==",
"3.7.2"
]
]
},
{
"name": "django",
"specs": [
[
"==",
"4.2.6"
]
]
},
{
"name": "sqlparse",
"specs": [
[
"==",
"0.4.4"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.8.0"
]
]
},
{
"name": "backports.zoneinfo",
"specs": []
}
],
"lcname": "django-liquidb"
}