# tortoise-data-migration
[![tests](https://github.com/Ekumen-OS/tortoise-data-migration/actions/workflows/tests.yaml/badge.svg)](https://github.com/Ekumen-OS/tortoise-data-migration/actions/workflows/tests.yaml)
[![codecov](https://codecov.io/gh/Ekumen-OS/tortoise-data-migration/branch/main/graph/badge.svg?token=P92AYYHAR1)](https://codecov.io/gh/Ekumen-OS/tortoise-data-migration)
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![poetry-managed](https://img.shields.io/badge/poetry-managed-blueviolet)](https://python-poetry.org)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tortoise-data-migration)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/tortoise-data-migration)
[![PyPI](https://img.shields.io/pypi/v/tortoise-data-migration?logo=python)](https://pypi.org/project/tortoise-data-migration/)
`tortoise-data-migration` is a very simple project meant to perform migrations of data, similar to regular structural migrations.
The main use case is when your system has some "default data" that needs to exist for the system to work. Some examples:
- The default username/password of a system
- The default configuration values (if you store the config in the DB)
These values could be set in the system as part of the installation process, but then when writing tests that use those,
you would have to somehow get those values to the DB. So you create a test fixture, and very probably you will be
introducing duplication (the bringup/installation process has these values, and the fixture too).
tortoise-data-migrations are meant to be executed by the software (either during test execution of production) after the
database structure is up-to-date (in production software after running [aerich](https://github.com/tortoise/aerich) migrations for example
or during tests after the DB setup is done), but before the actual software starts executing. That's why
`tortoise-data-migration` is a library and not a command line tool.
## Installation
### Pip
`pip install tortoise-data-migration`
### Pipenv
`pipenv install tortoise-data-migration`
### Poetry
`poetry add tortoise-data-migration`
### PDM
`pdm add tortoise-data-migration`
## Notes for maintainers
### Release
To create a new release, create a github release and a github action will take care of building and publishing. After
that, there will be a PR automatically created to bump the version in `main`.
Raw data
{
"_id": null,
"home_page": "https://github.com/Ekumen-OS/tortoise-data-migration",
"name": "tortoise-data-migration",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "migrations,tortoise,data-migrations",
"author": "Guillermo Manzato",
"author_email": "manzato@ekumenlabs.com",
"download_url": "https://files.pythonhosted.org/packages/c6/de/04be584865a98adceacba795da008f14f6519850885722485ea82bead3cb/tortoise_data_migration-1.0.1.tar.gz",
"platform": null,
"description": "# tortoise-data-migration\n\n[![tests](https://github.com/Ekumen-OS/tortoise-data-migration/actions/workflows/tests.yaml/badge.svg)](https://github.com/Ekumen-OS/tortoise-data-migration/actions/workflows/tests.yaml)\n[![codecov](https://codecov.io/gh/Ekumen-OS/tortoise-data-migration/branch/main/graph/badge.svg?token=P92AYYHAR1)](https://codecov.io/gh/Ekumen-OS/tortoise-data-migration)\n[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![poetry-managed](https://img.shields.io/badge/poetry-managed-blueviolet)](https://python-poetry.org)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tortoise-data-migration)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/tortoise-data-migration)\n[![PyPI](https://img.shields.io/pypi/v/tortoise-data-migration?logo=python)](https://pypi.org/project/tortoise-data-migration/)\n\n\n`tortoise-data-migration` is a very simple project meant to perform migrations of data, similar to regular structural migrations.\n\nThe main use case is when your system has some \"default data\" that needs to exist for the system to work. Some examples:\n - The default username/password of a system\n - The default configuration values (if you store the config in the DB)\n\nThese values could be set in the system as part of the installation process, but then when writing tests that use those,\nyou would have to somehow get those values to the DB. So you create a test fixture, and very probably you will be\nintroducing duplication (the bringup/installation process has these values, and the fixture too).\n\ntortoise-data-migrations are meant to be executed by the software (either during test execution of production) after the\ndatabase structure is up-to-date (in production software after running [aerich](https://github.com/tortoise/aerich) migrations for example\nor during tests after the DB setup is done), but before the actual software starts executing. That's why\n`tortoise-data-migration` is a library and not a command line tool.\n\n\n## Installation\n\n### Pip\n\n`pip install tortoise-data-migration`\n\n### Pipenv\n\n`pipenv install tortoise-data-migration`\n\n### Poetry\n\n`poetry add tortoise-data-migration`\n\n### PDM\n\n`pdm add tortoise-data-migration`\n\n## Notes for maintainers\n\n### Release\n\nTo create a new release, create a github release and a github action will take care of building and publishing. After\nthat, there will be a PR automatically created to bump the version in `main`.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Tortoise migrations for data, not structure",
"version": "1.0.1",
"split_keywords": [
"migrations",
"tortoise",
"data-migrations"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "74fdb77f38414de1b000bdf1ffa4f4ad634d9c843ca99b7f64dfde77804cebbd",
"md5": "474fd86cfe59b5329f2b2c3d912993f9",
"sha256": "c2be2ef2c2dbdfe9cedbc1a6652bac8511b9c07da3fffd67939c1e174001483b"
},
"downloads": -1,
"filename": "tortoise_data_migration-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "474fd86cfe59b5329f2b2c3d912993f9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 4765,
"upload_time": "2023-01-31T15:05:03",
"upload_time_iso_8601": "2023-01-31T15:05:03.619884Z",
"url": "https://files.pythonhosted.org/packages/74/fd/b77f38414de1b000bdf1ffa4f4ad634d9c843ca99b7f64dfde77804cebbd/tortoise_data_migration-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c6de04be584865a98adceacba795da008f14f6519850885722485ea82bead3cb",
"md5": "5fb33e06a69528f2573f3edb13bc85ba",
"sha256": "962f2ce4df0a2daa1f4f7e079dc3b4987cc61532f6e3866a6a995b0d8ec42413"
},
"downloads": -1,
"filename": "tortoise_data_migration-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "5fb33e06a69528f2573f3edb13bc85ba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 4289,
"upload_time": "2023-01-31T15:05:04",
"upload_time_iso_8601": "2023-01-31T15:05:04.685939Z",
"url": "https://files.pythonhosted.org/packages/c6/de/04be584865a98adceacba795da008f14f6519850885722485ea82bead3cb/tortoise_data_migration-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-31 15:05:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Ekumen-OS",
"github_project": "tortoise-data-migration",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tortoise-data-migration"
}