{ "info": { "author": "Mathew Moon", "author_email": "me@mathewmoon.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.7", "Topic :: System :: Software Distribution" ], "description": "# alembic-multischema\nThis module provides the ability to act on multiple postgres schemas at once when using alembic.\n\n# Functions:\n### perSchema(**kwargs)\nUsed to decorate the upgrade() and downgrade() functions in a migration. When upgrade or downgrade are decorated with perSchema() the decorated function will be called for a list of schemas in the current database.\n#### kwargs:\n * schemas\n A list of schema names to run the function against. If omitted perSchema() will automatically generate a list of non-system schemas from the current database by using getAllNonSystemSchemas()\n * exclude\n A list of schema names to exclude from running the function against\n\n\n### getAllSchemas()\n Returns a list of all schemas in the current database.\n#### kwargs:\n * exclude\n A list of schema names to exclude from running the function against\n\n### getAllNonSystemSchemas()\n Returns a list of schemas in the current database, omitting information_schema and pg_catalog. \n#### kwargs:\n * exclude\n A list of schema names to exclude from running the function against\n\n## Example Usage:\n```\n\"\"\"CreateUsersTable\n\nRevision ID: a6a219646b55\nRevises:\nCreate Date: 2019-10-16 14:43:11.347575\n\n\"\"\"\nfrom alembic import op\nimport sqlalchemy as sa\nfrom sqlalchemy.sql import text\nfrom almebic_multischema import perSchema\n\n# revision identifiers, used by Alembic.\nrevision = 'a6a219646b55'\ndown_revision = None\nbranch_labels = None\ndepends_on = None\n\n@perSchema(schemas=[\"public\", \"foo\", \"bar\"])\ndef upgrade():\n users = text(\n \"\"\"CREATE TABLE users\n (\n id serial PRIMARY KEY,\n firstname VARCHAR (50) UNIQUE,\n lastname VARCHAR (50)\n );\n \"\"\")\n op.execute(users)\n\n@perSchema(schemas=[\"public\", \"foo\", \"bar\"])\ndef downgrade():\n op.execute(text(\"DROP TABLE users\"))\n```\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/QuiNovas/alembic-multischema", "keywords": "quinovas", "license": "APL 2.0", "maintainer": "", "maintainer_email": "", "name": "alembic-multischema", "package_url": "https://pypi.org/project/alembic-multischema/", "platform": "", "project_url": "https://pypi.org/project/alembic-multischema/", "project_urls": { "Homepage": "https://github.com/QuiNovas/alembic-multischema" }, "release_url": "https://pypi.org/project/alembic-multischema/0.0.7/", "requires_dist": null, "requires_python": "", "summary": "Multi schema postgres migrations using alembic", "version": "0.0.7" }, "last_serial": 5986599, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b82c38bc299a7267675ce573ceb56ac7", "sha256": "f35f0df963181cb089b420c9dc145ae6e5293f53c09aab9dc98226f32a969300" }, "downloads": -1, "filename": "alembic_multischema-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "b82c38bc299a7267675ce573ceb56ac7", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=3.6", "size": 2029, "upload_time": "2019-10-16T18:19:59", "url": "https://files.pythonhosted.org/packages/df/19/3f312a2c85dd4f73847272c41ddb32ab904c76c1bcd3421780bbf6a90b38/alembic_multischema-0.0.1-py2-none-any.whl" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "483c541919285d604f80ed45c3e708ea", "sha256": "9ce7cbea5d3da716f4be6b2b846ac4f962ef83a7916ce8315a9955836ed878fd" }, "downloads": -1, "filename": "alembic_multischema-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "483c541919285d604f80ed45c3e708ea", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=3.6", "size": 6668, "upload_time": "2019-10-16T19:06:49", "url": "https://files.pythonhosted.org/packages/a0/56/dc317177122ff78c8cadd22146edbc61a5972147e518bfdad5b74b905fc8/alembic_multischema-0.0.2-py2-none-any.whl" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "3f6698707b9e90bfe8909e0812ca3a47", "sha256": "9b15780cc2e189a6f75882d4b0762352d0060211bb98fdd63f695799df8a50ce" }, "downloads": -1, "filename": "alembic_multischema-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "3f6698707b9e90bfe8909e0812ca3a47", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=3.7", "size": 6668, "upload_time": "2019-10-16T19:25:05", "url": "https://files.pythonhosted.org/packages/83/8c/9156c201b6eb9dfb658750d0d7d13ea3f3fc2465173c7f4d34aba17a2557/alembic_multischema-0.0.3-py2-none-any.whl" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "d7f56a99dcd7273aef4350f1de5a4c43", "sha256": "e4e17e57ce62e3ec8472fba0990513f221bc66409f75b44e701ba68be13f4625" }, "downloads": -1, "filename": "alembic_multischema-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d7f56a99dcd7273aef4350f1de5a4c43", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6177, "upload_time": "2019-10-16T19:50:07", "url": "https://files.pythonhosted.org/packages/a9/35/e61897004fd001116f27db5ca3e1f134e8fcb568ddfdf05f2c325b1c104d/alembic_multischema-0.0.4-py2.py3-none-any.whl" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "69916fbd257d7571e219ae5453d7d9db", "sha256": "f861fd54372e7e6ff5a36b44c1895db3b382e9808a8d98658b7a26d7c6ddb3b3" }, "downloads": -1, "filename": "alembic_multischema-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "69916fbd257d7571e219ae5453d7d9db", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6773, "upload_time": "2019-10-16T19:56:17", "url": "https://files.pythonhosted.org/packages/ca/c4/a33a89312b82a57d1ded42a70fb733c60804e9434974d428fec3236fe00a/alembic_multischema-0.0.5-py2.py3-none-any.whl" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "13759e3b469f4bda388c6cd66245cc3f", "sha256": "18dd37fbb20686b4ae5337fc1ea05db822afe3c77021c29a117cd5c4fd4a32e8" }, "downloads": -1, "filename": "alembic_multischema-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "13759e3b469f4bda388c6cd66245cc3f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6794, "upload_time": "2019-10-16T21:41:32", "url": "https://files.pythonhosted.org/packages/12/2b/f51bf4f8ec1dc13242c7ee9dad03181ad469f6e48c54588131cb81c6da3b/alembic_multischema-0.0.6-py2.py3-none-any.whl" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "694067edf6420804084f214ac2df9be5", "sha256": "9ebfb586cf3e2787f371c669395ce221136f744d39a31f8fa1f84b49bc95a19f" }, "downloads": -1, "filename": "alembic_multischema-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "694067edf6420804084f214ac2df9be5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6821, "upload_time": "2019-10-16T22:03:34", "url": "https://files.pythonhosted.org/packages/50/8c/f61a98a9fe8889dd54b16cbfdc1c62cd8801c5936009cea51fee0baec426/alembic_multischema-0.0.7-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "694067edf6420804084f214ac2df9be5", "sha256": "9ebfb586cf3e2787f371c669395ce221136f744d39a31f8fa1f84b49bc95a19f" }, "downloads": -1, "filename": "alembic_multischema-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "694067edf6420804084f214ac2df9be5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6821, "upload_time": "2019-10-16T22:03:34", "url": "https://files.pythonhosted.org/packages/50/8c/f61a98a9fe8889dd54b16cbfdc1c62cd8801c5936009cea51fee0baec426/alembic_multischema-0.0.7-py2.py3-none-any.whl" } ] }