{ "info": { "author": "Ignas Mikalajunas", "author_email": "ignas@nous.lt", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python" ], "description": "Yet another sqlalchemy based database schema migration tool\n===========================================================\n\nInstallation\n------------\n\nTo install it, add:\n\n[migration]\nrecipe = zc.recipe.egg\neggs=\n nous.migration\n\nto your buildout.cfg\n\nYou might want to add your databse driver pakcage and your application\npackage like this:\n\n[migration]\nrecipe = zc.recipe.egg\neggs=\n psycopg2\n nous.some_app\n nous.migration\n\nConfiguration\n-------------\n\nAdd to your development.ini or some other kind of ini:\n\n[nous.migration]\napp = app:busy\npackage = busy.migration\n\nmigrator expects sqlalchemy configuration to be present in the app\nsection, for example:\n\n[app:busy]\nsqlalchemy.url = postgresql:///development\n\nI might add sqlalchemy configuration to the migration section too if\nsomeone will ask.\n\nYou can also add:\n\nvcs = git\nschema_diff_cmd = git diff src/busy/models/schema.sql\n\nso that add_script command would add the files to the version control\nsystem, and populate them with the delta of your schema automatically.\n\nThese two settings might go the setup.cfg as they are not really\ndeployment related and are never required to run your application.\n\nUsage\n-----\n\nbin/migrate development.ini [upgrade|downgrade|setup|add_script] [version]\n\n\nIntegrating with your application\n---------------------------------\n\n\nAdd something like this:\n\n engine = engine_from_config(conf, 'sqlalchemy.')\n DBMigrator(engine, 'busy.migration').set_up_migration(init_migration=DBSetUp(), run_scripts=False)\n\nto your setup_app, or in your initialize_sql\n\nDBSetUp is a class that has an \"upgrade\" method that initializes your\nschema.\n\nYou can do it in multiple ways, you can add a migration script that\nsets up your tables and then migrate that using migration scripts:\n\n DBMigrator(engine, 'busy.migration').set_up_migration(run_scripts=True)\n\nOr you can have a canonical schema set up and initialize it all at\nonce and just mark all the scripts as 'done'\n\n DBMigrator(engine, 'busy.migration').set_up_migration(init_migration=DBSetUp(), run_scripts=False)\n\nScripts\n-------\n\nPut your scripts in the package that you have set up in your migration\nconfig.\n\nScripts are tracked separately.\n\nScript files should be of this format:\n\nTimestamp script title\n201006231515_python_migration_script.py\n\nTimestamp script title\n201006231516_sql_migration_script.sql\n201006231516_downgrade.sql\n\nIf both, python and sql exist with the same timestamp I assume that\npython script is responsible for running sql scripts. I might add\nhelpers to make running an sql file later.\n\n201006231517_mixed_migration_script.py\n201006231517_upgrade.sql\n201006231517_downgrade.sql\n\nSql files are just that, sql files that will be executed. Python files\nshould contain callables: upgrade and downgrade, downgrade can be\nmissing if script is not intended to be reversable.\n\nTODO: add example migration scripts", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/nous-consulting/nous.migration/", "keywords": null, "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "nous.migration", "package_url": "https://pypi.org/project/nous.migration/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nous.migration/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/nous-consulting/nous.migration/" }, "release_url": "https://pypi.org/project/nous.migration/0.7.1/", "requires_dist": null, "requires_python": null, "summary": "Yet another sqlalchemy based database schema migration tool", "version": "0.7.1" }, "last_serial": 795561, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "bce8e5d2db59744d97c1eae2e92abc31", "sha256": "4dd6fd043b6deeeb09644ecd28d22dd0a4a951a154ce4a0f2f2d424afedea21c" }, "downloads": -1, "filename": "nous.migration-0.1.tar.gz", "has_sig": false, "md5_digest": "bce8e5d2db59744d97c1eae2e92abc31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4026, "upload_time": "2011-06-23T16:57:19", "url": "https://files.pythonhosted.org/packages/92/64/538b87cc4d12f2d8e4cb43f7f8a6e6224dbb145927a2af8069863916e519/nous.migration-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "abfd72e143bd8471b6d9b506c52fc068", "sha256": "10738928651af715282b05db350c454ba723804b7cf5bd1d023cb6b16f4a0b61" }, "downloads": -1, "filename": "nous.migration-0.2.tar.gz", "has_sig": false, "md5_digest": "abfd72e143bd8471b6d9b506c52fc068", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4186, "upload_time": "2011-06-23T17:52:47", "url": "https://files.pythonhosted.org/packages/91/fc/9ab8eda31769a1f878e125d80aee262bd370f0f540e4873ab7d0ab2c549b/nous.migration-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "74b50a64ff9dc874642fbb2507eefead", "sha256": "0ef9c2f4fb150b8c065e21817bebc03070f8b887b9acfef973e69049b4326644" }, "downloads": -1, "filename": "nous.migration-0.3.tar.gz", "has_sig": false, "md5_digest": "74b50a64ff9dc874642fbb2507eefead", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4974, "upload_time": "2011-06-23T18:22:54", "url": "https://files.pythonhosted.org/packages/41/1f/2bcfe8ed27a471addf543bf9cbb2a791a8f2ab2e0fb78fc15b918c424a4b/nous.migration-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "4f3533a8b0f029311bdb7592e25bbbab", "sha256": "4f8a801c9d9099abb507e347a8a1e8c7188ef0ccc80b15795ae3cebb01b4ad47" }, "downloads": -1, "filename": "nous.migration-0.4.tar.gz", "has_sig": false, "md5_digest": "4f3533a8b0f029311bdb7592e25bbbab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5561, "upload_time": "2011-06-23T18:50:24", "url": "https://files.pythonhosted.org/packages/bd/8c/2e076b91599cf77d71a9e517fa1354f6db5e198554939cb4b362a38b2f4b/nous.migration-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "2da7fc21cc1d24f8cce7c3c48a2354d6", "sha256": "cecca5c49d1ae190c2aa5b42bf41d62f0f61bfebfeeab0db5c5e44cce5641785" }, "downloads": -1, "filename": "nous.migration-0.5.tar.gz", "has_sig": false, "md5_digest": "2da7fc21cc1d24f8cce7c3c48a2354d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5608, "upload_time": "2011-09-08T21:07:19", "url": "https://files.pythonhosted.org/packages/c5/38/ee12552162a2c278900e6aeddf711667a1792ae65ae62e3586a86055896a/nous.migration-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "3ff8d166cd2aa582335354ab2ca39c3c", "sha256": "739e195f99f7492d9a3de1c3c762109c07559f0db448d0206992bd47bc420a4c" }, "downloads": -1, "filename": "nous.migration-0.6.tar.gz", "has_sig": false, "md5_digest": "3ff8d166cd2aa582335354ab2ca39c3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5657, "upload_time": "2012-01-11T16:16:08", "url": "https://files.pythonhosted.org/packages/43/91/aa45ff1edbe3eb0ab28cfb467ab69cca9ca74b832851dfcb791d0a9d0dfc/nous.migration-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "4887235bec4d39c8bbe41bc10cf9e3b2", "sha256": "c944352e7dc1c2ac4af8e4c82e7937e2f3a99f1208c14c1196b3ae22c1068592" }, "downloads": -1, "filename": "nous.migration-0.7.tar.gz", "has_sig": false, "md5_digest": "4887235bec4d39c8bbe41bc10cf9e3b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5707, "upload_time": "2012-02-21T17:55:35", "url": "https://files.pythonhosted.org/packages/3d/d0/5369dd1c36ed838afd767c195cffc27849f72d8dbd7f8243b6e53d2d6401/nous.migration-0.7.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "45825f2e922d01357eaa8c133d13a8ef", "sha256": "57083c620a6c8c3d8345136ac496fc9b2dd8198c9dd4d60f2f9e68777099d154" }, "downloads": -1, "filename": "nous.migration-0.7.1.tar.gz", "has_sig": false, "md5_digest": "45825f2e922d01357eaa8c133d13a8ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5749, "upload_time": "2012-03-11T14:52:41", "url": "https://files.pythonhosted.org/packages/88/0c/2d295909edbba6f6b27406fd65481def9cb74300cc851c5fc8fc3a108d7f/nous.migration-0.7.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "45825f2e922d01357eaa8c133d13a8ef", "sha256": "57083c620a6c8c3d8345136ac496fc9b2dd8198c9dd4d60f2f9e68777099d154" }, "downloads": -1, "filename": "nous.migration-0.7.1.tar.gz", "has_sig": false, "md5_digest": "45825f2e922d01357eaa8c133d13a8ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5749, "upload_time": "2012-03-11T14:52:41", "url": "https://files.pythonhosted.org/packages/88/0c/2d295909edbba6f6b27406fd65481def9cb74300cc851c5fc8fc3a108d7f/nous.migration-0.7.1.tar.gz" } ] }