{ "info": { "author": "Christophe Combelles", "author_email": "ccomb@anybox.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Database", "Topic :: Software Development :: Version Control", "Topic :: Utilities" ], "description": "anybox.pg.odoo\n==============\n\nThis tool basically manages versionned snapshots of the current database,\nmimicking the common workflow of VCS tools such as init, commit, revert, log, etc.\nIt was first created to snapshot Odoo databases but may be easily modified to be\nagnostic.\n\n.. contents::\n\nInstall\n-------\n\nThis tool works on Python 2.7 and Python 3.x.\nInstall as any normal Python distribution, in a virtualenv, buildout or\nsystem-wide. The only current dependency is `psycopg2\n`_ >= 2.5.\n\nExample with a virtualenv::\n\n $ virtualenv sandbox && source sandbox/bin/activate\n $ pip install anybox.pg.odoo\n\nUsage\n-----\n\nFirst read the available commands with ``odb -h``.\nYou get the available commands::\n\n init Set the current db\n commit Save the current db in a new revision\n info Display the revision of the current db\n revert Drop the current db and clone from a previous revision\n log List all available revisions\n purge Destroy revisions\n tags List all tags\n tag Tag a specific revision\n\n\nYou should first set the current database with ``odb init``::\n\n $ odb init demo8\n Now revision 1\n\nThen you can get the current revision with ``odb info``::\n\n $ odb info\n database: demo8\n revision : 1 (parent: 0)\n\nCommit the current database to create a snapshot and a new revision with ``odb commit``::\n\n $ odb commit\n Now revision 2\n $ odb info\n database: demo8\n revision : 2 (parent: 1)\n $ odb commit\n Now revision 3\n $ odb commit\n Now revision 4\n\nYou can revert back to the last revision of the database (the parent) with ``odb revert``::\n\n $ odb revert\n Reverted to parent 3, now at revision 4\n\nYou can also revert back to any previous revision::\n\n $ odb revert 2\n Reverted to parent 2, now at revision 4\n $ odb info\n database: demo8\n revision : 4 (parent: 2)\n\nYou can put tags on a revision, revert to a tag and delete a tag with ``odb tag`` and ``odb tags``::\n\n $ odb tag v1 2\n $ odb tag v2 3\n $ odb tags\n v2 (demo8*3)\n v1 (demo8*2)\n $ odb revert v1\n Reverted to parent 2, now at revision 4\n $ odb tag -d v1\n\nThe you can display all the revisions with ``odb log``::\n\n $ odb log\n demo8:\n revision: 4\n parent: 2\n demo8*3:\n revision: 3\n parent: 2\n tag: v2\n demo8*2:\n revision: 2\n parent: 1\n demo8*1:\n revision: 1\n parent: 0\n\nThen you can purge all the revisions except the tags::\n\n $ odb purge keeptags\n\nor all the revisions::\n\n $ odb purge all\n\n\n\n\nHow it works and pollutes\n-------------------------\n\n- It uses the ``CREATE DATABASE FROM TEMPLATE`` feature of PostgreSQL\n- It currently stores version information in the ``ir_config_parameter`` table\n of Odoo (though this will change in the future).\n- It expects that the connection to PostgreSQL is done through Unix Domain\n Socket with the current user being allowed to create and drop databases.\n- It stores the current database in ``~/.anybox.pg.odoo``\n\nwhat's next? (todo list)\n------------------------\n\n- Use a dedicated database to store version information instead of the ``ir_config_parameter`` table\n- Implement diff (#fear)\n- Improve the database naming scheme\n\nContribute\n----------\n\nMercurial repository and bug tracker: https://bitbucket.org/anybox/anybox.pg.odoo\n\nRun tests with::\n\n $ python setup.py test\n\nChangelog\n=========\n\n0.6 (2014-11-02)\n----------------\n\n- fixed error in Python 3\n- remove tag and message of the current version after commit and revert\n\n0.5 (2014-10-19)\n----------------\n\n- Works on Python 3.1+\n- Works on Postgres 9.1 and maybe lower\n- ``odb purge keeptags`` : purge all but tags\n- implemented commit message\n- revert now checks that the source db exists (much safer)\n\n0.4 (2014-10-19)\n----------------\n\n- Implemented ``odb log``\n- Implemented ``odb purge``\n- Implemented ``odb tag`` and revert to tag\n- Implemented ``odb tags``\n- Renamed version to revision\n- Renamed snapshot() to commit()\n\n0.3 (2014-10-16)\n----------------\n\n- Keep the same db as the current one to work in place\n- Fixed versionning and start at 1\n- Also disconnect during revert operation\n- Removed the unneeded tip\n\n0.2 (2014-10-15 after sleeping)\n-------------------------------\n\n- Fixed packaging\n- Fixed the ``revert`` behaviour\n- Allow to revert without argument\n- Improved doc\n\n0.1 (2014-10-15)\n----------------\n\n- Initial draft", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "odb postgresql odoo snapshot commit version", "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "anybox.pg.odoo", "package_url": "https://pypi.org/project/anybox.pg.odoo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/anybox.pg.odoo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/anybox.pg.odoo/0.6/", "requires_dist": null, "requires_python": null, "summary": "Postgresql database snapshot versionning tool", "version": "0.6" }, "last_serial": 1291641, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "17fe50a281f590350246617e7901232b", "sha256": "50d8b67fbc76fb0097e4bd02975071b1e180153c7f513a4381fa38e275f82f24" }, "downloads": -1, "filename": "anybox.pg.odoo-0.1.tar.gz", "has_sig": false, "md5_digest": "17fe50a281f590350246617e7901232b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1563, "upload_time": "2014-10-14T23:52:30", "url": "https://files.pythonhosted.org/packages/c4/1d/8fd4bd5a3aa643a535873271c5574dcb5f00100fa43e1f6e4fce54739842/anybox.pg.odoo-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5888ee189a7fb0cdd30214426dc87bcf", "sha256": "944819f40322a0db4c4d0761f750703685bcf9c2a29f2081c6a134ce12115e32" }, "downloads": -1, "filename": "anybox.pg.odoo-0.2.tar.gz", "has_sig": false, "md5_digest": "5888ee189a7fb0cdd30214426dc87bcf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4946, "upload_time": "2014-10-15T09:57:21", "url": "https://files.pythonhosted.org/packages/6d/17/4eed4a6a4037aa71de278d7329975c549a5745fa13765665e4f79e9ec2f7/anybox.pg.odoo-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "9e4d5baf76daded74d79a8723ea3a7e6", "sha256": "8b999dae52c95c500af364bc0d2d26885076c65b8b530846d075bd156e3d8fe5" }, "downloads": -1, "filename": "anybox.pg.odoo-0.3.tar.gz", "has_sig": false, "md5_digest": "9e4d5baf76daded74d79a8723ea3a7e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5012, "upload_time": "2014-10-15T21:58:38", "url": "https://files.pythonhosted.org/packages/b5/d9/14e6af2664267b0d7086eafc71914ea4b153cfc3ce5a9548bd698f42d8aa/anybox.pg.odoo-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "9c5a29529f6b0d4078f30414b0d96ef1", "sha256": "6db7eb2a9f96b643b3568366fdae66d05ce5ff10b08a4d6a8c0738719c4a6967" }, "downloads": -1, "filename": "anybox.pg.odoo-0.4.tar.gz", "has_sig": false, "md5_digest": "9c5a29529f6b0d4078f30414b0d96ef1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7421, "upload_time": "2014-10-18T23:16:07", "url": "https://files.pythonhosted.org/packages/4f/d3/723ea8e0aafcb9ba3216bba8a1af0288b5b0351c5deab1e0507a0274a737/anybox.pg.odoo-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "37dfbc82a1cc41880b0967863f09f6f9", "sha256": "f43342058aa237a52784bdb87df95416baeb57be180249570d36c325e94a19c6" }, "downloads": -1, "filename": "anybox.pg.odoo-0.5.tar.gz", "has_sig": false, "md5_digest": "37dfbc82a1cc41880b0967863f09f6f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9232, "upload_time": "2014-10-19T10:02:11", "url": "https://files.pythonhosted.org/packages/55/b1/4ea6da61d854a7f4a946260348abe93f8daddccf8bd615c0280d62b97ea0/anybox.pg.odoo-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "0005b4f261a91762866f1a758f73cc08", "sha256": "de3654a0dd5d62123e6588ad4c61c358df1aca623794b81eb2ed45104b88cb94" }, "downloads": -1, "filename": "anybox.pg.odoo-0.6.tar.gz", "has_sig": false, "md5_digest": "0005b4f261a91762866f1a758f73cc08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9354, "upload_time": "2014-11-02T10:13:59", "url": "https://files.pythonhosted.org/packages/7a/dd/f538987fda29ea067ab721e297f46eef51d8db45aed6cd807dd1a3e19198/anybox.pg.odoo-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0005b4f261a91762866f1a758f73cc08", "sha256": "de3654a0dd5d62123e6588ad4c61c358df1aca623794b81eb2ed45104b88cb94" }, "downloads": -1, "filename": "anybox.pg.odoo-0.6.tar.gz", "has_sig": false, "md5_digest": "0005b4f261a91762866f1a758f73cc08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9354, "upload_time": "2014-11-02T10:13:59", "url": "https://files.pythonhosted.org/packages/7a/dd/f538987fda29ea067ab721e297f46eef51d8db45aed6cd807dd1a3e19198/anybox.pg.odoo-0.6.tar.gz" } ] }