{ "info": { "author": "Brian Hicks", "author_email": "brian@brianthicks.com", "bugtrack_url": null, "classifiers": [], "description": "Trek\n====\n\nTrek is a *simple* tool to do migrations of whatever you'd like. It has\nterrible documentation because it's pre-1.0.\n\nUsage\n-----\n\nInstall! ``pip install trek``\n\nNow say you have a directory of migrations::\n\n migrations\n \u251c\u2500\u2500 1.sql\n \u251c\u2500\u2500 2.sql\n \u2514\u2500\u2500 3.sql\n\nWhere each of these looks a bit like this::\n\n -- MIGRATE UP\n CREATE TABLE test (\n id INTEGER PRIMARY KEY\n );\n\n -- MIGRATE DOWN\n DROP TABLE test;\n\n(using any comment character, but lines with ``MIGRATE UP`` and ``MIGRATE\nDOWN`` will be excluded and only one of each line is expected. Also note that\nto simplify this example the numbers have been used, but you should probably\nuse timestamps like ``2014-01-01T00-00-00_human_name.sql``)\n\nYou can then run::\n\n trek --runner=postgres up postgres://trek_test@localhost/trek_test\n\nAnd the migrations will be run for you. Magic!\n\nWriting your own runner\n-----------------------\n\nA runner is just a Python object with ``version``, ``up``, and ``down``\nmethods. ``version`` will be called with no arguments to determine the current\nversion, while ``up`` and ``down`` will be called with a name (string) and\n``Migration`` object (which has string ``up`` and ``down`` members). ``up`` and\n``down`` should be generators, and you can yield as many messages as you need\nto so that the user knows what's going on.\n\nAfter you put your migrator in a file, specify it with\n``python.path.to.module:MigratorName``. For example, the postgres migrator is\nexpanded by the CLI interface but it's full path is\n``trek.runners.postgres:PostgresRunner``\n\nTODO\n----\n\n- \u2713 release on PyPI\n- \u2713 add Postgres migrator\n- add other migrators as needed (open an issue on Github, for what you want,\n please!)\n- add flask-script manager interface", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/brianhicks/trek", "keywords": null, "license": "0.0.1", "maintainer": null, "maintainer_email": null, "name": "trek", "package_url": "https://pypi.org/project/trek/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/trek/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/brianhicks/trek" }, "release_url": "https://pypi.org/project/trek/0.0.1-/", "requires_dist": null, "requires_python": null, "summary": "generic migration provider", "version": "0.0.1-" }, "last_serial": 1249784, "releases": { "0.0.1-": [ { "comment_text": "", "digests": { "md5": "1a7279803849e1f66bcb13ffe2ac3209", "sha256": "6977629f4eac4aa6fd8edcb08955af86207125dfc2f1a9b072e8936cc69bfeb9" }, "downloads": -1, "filename": "trek-0.0.1_-py2-none-any.whl", "has_sig": true, "md5_digest": "1a7279803849e1f66bcb13ffe2ac3209", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18210, "upload_time": "2014-10-06T18:49:51", "url": "https://files.pythonhosted.org/packages/f4/38/b960a0288b41b857ed83f6e80d8f8d2c4fb876e5a8594f4a42715cf0b037/trek-0.0.1_-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cc8ec636603784055488ea6d93007c60", "sha256": "7e6ce92723cf7c6b276b9cc53d79fe271e958c0a4e1c7e95649b214fb8b23967" }, "downloads": -1, "filename": "trek-0.0.1-.tar.gz", "has_sig": true, "md5_digest": "cc8ec636603784055488ea6d93007c60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5766, "upload_time": "2014-10-06T18:49:45", "url": "https://files.pythonhosted.org/packages/67/0d/1acf67b1f7378ca72bc129c029bdf1874e6522e223396cfdc58f5d981e72/trek-0.0.1-.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1a7279803849e1f66bcb13ffe2ac3209", "sha256": "6977629f4eac4aa6fd8edcb08955af86207125dfc2f1a9b072e8936cc69bfeb9" }, "downloads": -1, "filename": "trek-0.0.1_-py2-none-any.whl", "has_sig": true, "md5_digest": "1a7279803849e1f66bcb13ffe2ac3209", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18210, "upload_time": "2014-10-06T18:49:51", "url": "https://files.pythonhosted.org/packages/f4/38/b960a0288b41b857ed83f6e80d8f8d2c4fb876e5a8594f4a42715cf0b037/trek-0.0.1_-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cc8ec636603784055488ea6d93007c60", "sha256": "7e6ce92723cf7c6b276b9cc53d79fe271e958c0a4e1c7e95649b214fb8b23967" }, "downloads": -1, "filename": "trek-0.0.1-.tar.gz", "has_sig": true, "md5_digest": "cc8ec636603784055488ea6d93007c60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5766, "upload_time": "2014-10-06T18:49:45", "url": "https://files.pythonhosted.org/packages/67/0d/1acf67b1f7378ca72bc129c029bdf1874e6522e223396cfdc58f5d981e72/trek-0.0.1-.tar.gz" } ] }