{ "info": { "author": "Kirill Goldshtein", "author_email": "goldshtein.kirill@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: Console", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: Unix", "Programming Language :: Python :: 2.7", "Topic :: Utilities" ], "description": "|travis-ci.org status|\n\nPostgreSQL Schema Versioning Tool\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**pgv** is an\nopen source utility that makes available to support PostgreSQL schemas\nin a VCS repository.\n\nOverview\n~~~~~~~~\n\n**pgv** helps you if it is needed to:\n\n- store SQL files in VCS repository;\n- track changes of your database schemas;\n- make possible to apply changes to various databases\n-\n\n - even if you have just local access to it.\n\nInstallation\n~~~~~~~~~~~~\n\nYou can install **pgv** using *pip*:\n\n::\n\n pip install pgv\n\nUsage\n~~~~~\n\nSo, for example, you want to store database schemas in the git\nrepository *repo.git* in folder *db*. First of all, you need to\ninitialize repository:\n\n::\n\n ~: user$ git clone repo.git\n ~: user$ cd repo\n repo: user$ pgv init -p db\n\nThis command creates simple **pgv** config **pgv.yaml** in working\ndirectory and folder **db**:\n\n::\n\n db/\n schemas/\n scripts/\n\nAccording to the convention **schemas** subfolder should contains\nfolders named after desired schemas in database. Files inside these\ndirectories should be the SQL scripts, that describes corresponding\nschema. E.g. you want to create table **foo** and function **bar** in\nschema **public**:\n\n::\n\n schemas/\n public/\n tables/\n foo.sql\n functions/\n bar.sql\n\n**Scripts** subfolder should contains some staff scripts: data fixes,\nmigrations and so on. SQL files in this folder can contains prefix that\ndefines the position on execution flow. E.g. you need to add script that\ngrants access to all objects in the database. It should be executed\nafter all other.\n\n::\n\n scripts/\n grants_post.sql\n\nOk, you want to apply committed changes to database. Let's initialize\nit:\n\n::\n\n repo: user$ pgv initdb -d test\n\nThan push changes to database **test**:\n\n::\n\n repo: user$ pgv push -c -d test\n\nE.g. you've made some checks on **test** database and you've understood\nthat function **bar** is not needed. Let's skip it:\n\n::\n\n repo: user$ pgv show\n c2d658898d4a1369c20285464bd5bb95713173f6\n schemas/public/tables/foo.sql\n schemas/public/functions/bar.sql\n scripts/grants_post.sql\n repo: user$ pgv skip -f schemas/public/functions/bar.sql c2d658898d4a1369c20285464bd5bb95713173f6\n repo: user$ git add db/.skiplist\n repo: user$ git commit\n repo: user$ pgv show\n cdfdbfb2bdcf8ee2dbf190bbf3a73ffbd77bd9b3 [s]\n .skiplist\n\n c2d658898d4a1369c20285464bd5bb95713173f6\n schemas/public/tables/foo.sql\n scripts/grants_post.sql\n\nAfter fix you want to push changes to **production**, but database\nallows only local connections. Let's make package with changes:\n\n::\n\n repo: user$ pgv collect -o changes-to-prod.tar.gz\n repo: user$ scp changes-to-prod.tar.gz prod://tmp\n repo: user$ ssh prod\n ~: user@prod$ pgv push -i /tmp/changes-to-prod.tar.gz -d prod\n\nTests\n~~~~~\n\nTo run test use:\n\n::\n\n tox\n\n.. |travis-ci.org status| image:: https://travis-ci.org/go1dshtein/pgv.svg?branch=master", "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/go1dshtein/pgv", "keywords": null, "license": "GPLv2", "maintainer": null, "maintainer_email": null, "name": "pgv", "package_url": "https://pypi.org/project/pgv/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pgv/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/go1dshtein/pgv" }, "release_url": "https://pypi.org/project/pgv/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "PostgreSQL schema versioning tool", "version": "0.0.2" }, "last_serial": 2120174, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "0c6a23e05e8eedf7188474e01d4c51af", "sha256": "e295f512580ceebd4f5e60825760e47d49b3a04de488d678134ba378c4d27ed8" }, "downloads": -1, "filename": "pgv-0.0.1.tar.gz", "has_sig": false, "md5_digest": "0c6a23e05e8eedf7188474e01d4c51af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11928, "upload_time": "2014-09-23T19:58:46", "url": "https://files.pythonhosted.org/packages/0c/bc/da083712a5635518c7c66127ef8ef36a35990ff4ea3524cb1186c482ef0a/pgv-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "9f5b9815c304052b7825a86415edb8f0", "sha256": "fc94e4e31c75aa96dd99485ab200b462d2b3141079c8366ee7d5b579838e9304" }, "downloads": -1, "filename": "pgv-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9f5b9815c304052b7825a86415edb8f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13464, "upload_time": "2014-10-13T13:23:34", "url": "https://files.pythonhosted.org/packages/34/47/8faa9c51b029b6ff8410672cf60a0ff9bf26b1d0cf453556586818c0d83c/pgv-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f5b9815c304052b7825a86415edb8f0", "sha256": "fc94e4e31c75aa96dd99485ab200b462d2b3141079c8366ee7d5b579838e9304" }, "downloads": -1, "filename": "pgv-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9f5b9815c304052b7825a86415edb8f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13464, "upload_time": "2014-10-13T13:23:34", "url": "https://files.pythonhosted.org/packages/34/47/8faa9c51b029b6ff8410672cf60a0ff9bf26b1d0cf453556586818c0d83c/pgv-0.0.2.tar.gz" } ] }