{ "info": { "author": "Alex Sansone", "author_email": "aeris1987@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6" ], "description": "[![Build Status](https://api.travis-ci.org/takamuffin/link-migration.png)](https://api.travis-ci.org/takamuffin/link-migration)\n\nLink Migration\n==============\n\nA generic tool for schema and data migrations.\n\nThe primary inspirations for this library came from Alembic, Django, and Hibernate/Liquibase. The ultimate goal is to allow a lightweight migration framework to be deployed into any technology stack. Much of this currently relies on the user to implement, however with time more and more integrations will be added to the default set.\n\n\nVersion\n=======\n\n0.0.12\n\n\nInstallation\n============\n\nIf you have pip available on your system, just type::\n\n```pip install link-migration```\n\nIf you\u2019ve already got an old version of link-migration, and want to upgrade, use:\n\n```pip install --upgrade link-migration```\n\n\nUsage Introduction\n==================\n\nThe first thing you\u2019ll need to define is the conf.py file and to specify its location: `link_migration -c \"path_to_file/conf.py\"`\n\nBelow are the minimum requirements for definitions in conf.py. The important step here is to specify where the migrations folder exists so they can be detected, and to specify where to store and fetch the versions for executed migrations.\n\n```\nimport os\nimport requests\nimport json\n\nROOT_DIR = 'link_migration.example_migrations'\nMIGRATIONS_ABS_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__)))\nMIGRATIONS_DIR = 'link_migration.example_migrations'\n\n\ndef get_current_version():\n path = \"%s/current_version.txt\" % MIGRATIONS_ABS_PATH\n with open(path, \"r+\") as f:\n content = f.read()\n return int(content)\n\n\ndef set_current_version(version):\n path = \"%s/current_version.txt\" % MIGRATIONS_ABS_PATH\n with open(path, \"w\") as f:\n content = f.write(f'{version}')\n return int(content)\n```\n\nLink Migration uses the _version_ information to track the migrations schema and to \ndecide the order of execution of the scripts. Link Migration will go through all .py \nfiles in your directory and execute all of them _version_ order.\n\n\nMigrating to a specific version\n===============================\n\nIf you want, you can migrate your database schema to a specific version by \ninforming the --to (or -t) parameter. The attribute _version_ of the migration\nfile will be used as unique identifier:\n\n $ link-migration --to=57\n\nIf you don\u2019t specify any version, using --up or --down, Link Migration will migrate \nthe schema to the latest version available in the migrations directories \nspecified in the config file.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/takamuffin/link-migration", "keywords": "migration", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "link-migration", "package_url": "https://pypi.org/project/link-migration/", "platform": "", "project_url": "https://pypi.org/project/link-migration/", "project_urls": { "Homepage": "https://github.com/takamuffin/link-migration" }, "release_url": "https://pypi.org/project/link-migration/0.0.21/", "requires_dist": [ "termcolor" ], "requires_python": "", "summary": "A generic tool for migrate in python.", "version": "0.0.21" }, "last_serial": 5131291, "releases": { "0.0.18": [ { "comment_text": "", "digests": { "md5": "6aa2ede62436509c9675f5caa4fc0de8", "sha256": "07848c68a58d249a2ccb3a660ac915d55e0bb77b5e4171242127f7894d81ef73" }, "downloads": -1, "filename": "link_migration-0.0.18-py3-none-any.whl", "has_sig": false, "md5_digest": "6aa2ede62436509c9675f5caa4fc0de8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19355, "upload_time": "2019-04-03T20:54:11", "url": "https://files.pythonhosted.org/packages/14/96/2728eee8c70281ef7a8374e2e7eedf2ae8e61ad05443169bb72dd7880d8f/link_migration-0.0.18-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bc4aa249c173b684c0372bf45a8130cb", "sha256": "4234250dd6d77fd3a06c82554a417983ebf9e7d565cb5b5f09f3a9566667cbfe" }, "downloads": -1, "filename": "link_migration-0.0.18.tar.gz", "has_sig": false, "md5_digest": "bc4aa249c173b684c0372bf45a8130cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11864, "upload_time": "2019-04-03T20:54:13", "url": "https://files.pythonhosted.org/packages/19/50/962bf5236fe9c803586e3a2b95afff265935ce386c817e1981a8ca46f54f/link_migration-0.0.18.tar.gz" } ], "0.0.19": [ { "comment_text": "", "digests": { "md5": "70690025a2f88f6870c8ad5ff59d30f0", "sha256": "d8e7039e1039a9f9ccb4e7bda69af5d2fe1bb47d0097d79821d63845a6ffb5ae" }, "downloads": -1, "filename": "link_migration-0.0.19-py3-none-any.whl", "has_sig": false, "md5_digest": "70690025a2f88f6870c8ad5ff59d30f0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17084, "upload_time": "2019-04-05T07:14:15", "url": "https://files.pythonhosted.org/packages/69/a2/145b52c7fc78d92888e30b2b05ccb00b11f51001cd38dc9e31642c6e47cb/link_migration-0.0.19-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0200fed3d0a4cfa217abfdd04a69c04d", "sha256": "212c0ada12edff10cb75c2397a10ee8f62f86ce89671fc53d8cfb014e99cb76d" }, "downloads": -1, "filename": "link_migration-0.0.19.tar.gz", "has_sig": false, "md5_digest": "0200fed3d0a4cfa217abfdd04a69c04d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11468, "upload_time": "2019-04-05T07:14:17", "url": "https://files.pythonhosted.org/packages/7a/2a/1effa1853e53e874dd1c57f7bc22f1810b3c054475535c79b398d4afc90d/link_migration-0.0.19.tar.gz" } ], "0.0.20": [ { "comment_text": "", "digests": { "md5": "a6be537c5763e8d9fcf2b8cec8c57aa3", "sha256": "bb274c88ead6e5142ea276442bc438105ea896a614da98cb9a5a03fc56ee108e" }, "downloads": -1, "filename": "link_migration-0.0.20-py3-none-any.whl", "has_sig": false, "md5_digest": "a6be537c5763e8d9fcf2b8cec8c57aa3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17105, "upload_time": "2019-04-06T16:30:22", "url": "https://files.pythonhosted.org/packages/63/18/bc9cc7a921110b60c0d3242373e2c6bbc15df5df2fe98c9e16090d0a9f21/link_migration-0.0.20-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6fd04897ce26f288efda0f18460d0cd5", "sha256": "8ee8977c23286e6ea2121426beecff2e0b1352a28b631beced4d3b601fbb265d" }, "downloads": -1, "filename": "link_migration-0.0.20.tar.gz", "has_sig": false, "md5_digest": "6fd04897ce26f288efda0f18460d0cd5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11485, "upload_time": "2019-04-06T16:30:24", "url": "https://files.pythonhosted.org/packages/ab/6e/aaee7a14bb4eefcab728cc2796ef1fa0f087c26b0f8c8356249854dc1be8/link_migration-0.0.20.tar.gz" } ], "0.0.21": [ { "comment_text": "", "digests": { "md5": "42648ba5a96b17e336e74b17f1ac3c8f", "sha256": "526c4c07ff84e8d2b8974a14e4f1ecc0f95e69eb4914af01fb1cc0429d6fca3a" }, "downloads": -1, "filename": "link_migration-0.0.21-py3-none-any.whl", "has_sig": false, "md5_digest": "42648ba5a96b17e336e74b17f1ac3c8f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17104, "upload_time": "2019-04-11T22:33:27", "url": "https://files.pythonhosted.org/packages/2d/55/e17b13fc1203abe87047d903aa772ad4ec317857e271f2e0fcc7c83aa20d/link_migration-0.0.21-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9915a6c37fa03f7cec37072949f55369", "sha256": "f445f0b9c59628afa5caa51e061f5ce7f2813113ff101febfd611bff94a80019" }, "downloads": -1, "filename": "link_migration-0.0.21.tar.gz", "has_sig": false, "md5_digest": "9915a6c37fa03f7cec37072949f55369", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11490, "upload_time": "2019-04-11T22:33:28", "url": "https://files.pythonhosted.org/packages/4c/1a/1ed50867d39b3490f228264910cc56c4a55e4f6abacae8d8828792802445/link_migration-0.0.21.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42648ba5a96b17e336e74b17f1ac3c8f", "sha256": "526c4c07ff84e8d2b8974a14e4f1ecc0f95e69eb4914af01fb1cc0429d6fca3a" }, "downloads": -1, "filename": "link_migration-0.0.21-py3-none-any.whl", "has_sig": false, "md5_digest": "42648ba5a96b17e336e74b17f1ac3c8f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17104, "upload_time": "2019-04-11T22:33:27", "url": "https://files.pythonhosted.org/packages/2d/55/e17b13fc1203abe87047d903aa772ad4ec317857e271f2e0fcc7c83aa20d/link_migration-0.0.21-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9915a6c37fa03f7cec37072949f55369", "sha256": "f445f0b9c59628afa5caa51e061f5ce7f2813113ff101febfd611bff94a80019" }, "downloads": -1, "filename": "link_migration-0.0.21.tar.gz", "has_sig": false, "md5_digest": "9915a6c37fa03f7cec37072949f55369", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11490, "upload_time": "2019-04-11T22:33:28", "url": "https://files.pythonhosted.org/packages/4c/1a/1ed50867d39b3490f228264910cc56c4a55e4f6abacae8d8828792802445/link_migration-0.0.21.tar.gz" } ] }