{ "info": { "author": "Hereman Nicolas", "author_email": "nicolas.hereman@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# What is Xalanih ?\n\nXalanih is a python script made to help you version your SQL database. You can use it to manage the creation or update the database of your project.\n\n# Technical Requirements\n- Python 3.6\n- mysqlclient\n- sqlparse\n\n# How to install Xalanih\n\n```\npip3 install xalanih\n```\n\n# How to use Xalanih\n\n## Create the db\n\n```Bash\npython3 -m xalanih create \n```\nwhere \\ must be replaced by the name of the database.\n\n## Update the db\n\n```Bash\npython3 -m xalanih update \n```\nwhere \\ must be replaced by the name of the database.\n\n## Options\n\nDifferents options can be given to the script. You can find all of them using the following command:\n\n```\npython3 xalanih -h\n```\n\n### Working directory\n\n```\n-d \n```\n\nSpecify the directory where all the database scripts are.\n\n**Default value**: \".\"\n\n### Database type\n\n```\n-t \n```\n\nSpecify the type of database to which the script has to connect.\n\n**Accepted value**: mysql | **Default value**: mysql\n\n### Host\n\n```\n-H \n```\n\nThe address of the host of the database.\n\n**Default value**: localhost\n\n### Port\n\n```\n-p \n```\n\nThe port of the database.\n\n**Default value**: 3306\n\n### User\n\n```\n-u \n```\n\nThe user used to connect\n\n**Default value**: root\n\n### Password\n\n```\n-pwd \n```\n\nThe password used to connect to the database.\n\n### Socket\n\n```\n-s \n```\n\nThe path to the mysql socket if it is not at the default location *(/tmp/mysql.sock)*.\n\n### Logging\n\nThese options are linked to the logging.\n\n#### Verbosity\n\n```\n-v \n```\n\nThe verbosity of the logs in standard output.\n\n**Accepted values**: 0,1,2,3,4 | **Default value**: 3\n\n- **0**: No logs.\n- **1**: Only errors.\n- **2**: Errors and warnings.\n- **3**: Informations, warnings and errors.\n- **4**: Debugs, informations, warnings and errors.\n\n#### Log file\n\n```\n-l \n```\n\nThe name of the file where the logs are saved. It is not affected by the verbosity options (It is always set at 4). If no file specified, no file are created.\n\n### last update\n\n```\n-to \n```\n\nDefine the last update that will be applied. Must be an update not included in `included_updates`.\n\n### no update\n\n```\n-nu\n```\n\nHas only an effect with the create option. If specified, the script will only execute the creation script and will not apply the updates.\n\n# How to structure the directory containing the database scripts\n\nThe structure to use for the directory that contains all the scripts you have for your database.\n\n```\nL creation (directory)\n L creation.sql (file)\n L included_updates (file)\nL update (directory)\n L script01.sql (file)\n L ...\n```\n\n## creation *(directory)*\n\nThe **creation** directory will contains the scripts that will be used to create the baseline of the database. These will only be called when the database is created from zero. That means that they will not be used in case of a database update.\n\n### creation.sql *(file)*\n\nThe script **creation.sql** is the entrypoint of Xalanih to create the database. This file must contains all the needed script to create the baseline of your database.\n\n### included_updates *(file)*\n\nWhen you will have a lot of update file, you will want to create the database directly with these modification instead of applying them after. In order to do that, you will have to add the modification directly to your *creation.sql*. But in order for Xalanih to not apply the update scripts, you have to add the name of all update scripts already integrated to the file **included_updates**. There should be one filename by line.\n\n## update *(directory)*\n\nThe **update** directory must contains all your update scripts (and nothing else). There is not realy a nomenclature for the update scripts but the alphabetical order should correspond to their chronological order. Also, no patch can be named *initial_install*. This is because this name is associated to the creation of the database\n\n# Table created by xalanih: xalanih_updates\n\nThe table xalanih_patches contains 3 columns:\nid, update_name, and update_apply_time.\nIt is used by the script to detect which patches have already been applied. The patch name associated to the initial creation of the database is **initial_install**.\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/nhereman/Xalanih", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "xalanih", "package_url": "https://pypi.org/project/xalanih/", "platform": "", "project_url": "https://pypi.org/project/xalanih/", "project_urls": { "Homepage": "https://github.com/nhereman/Xalanih" }, "release_url": "https://pypi.org/project/xalanih/1.0.0/", "requires_dist": [ "sqlparse (>=0.2.4)", "mysqlclient (>=1.3.12)" ], "requires_python": "", "summary": "Xalanih is a python script made to help you version your SQL database.", "version": "1.0.0" }, "last_serial": 4041186, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "0528bc15d229e334391e1b325818d287", "sha256": "78211fd479bb7aa0c34e55fa26908c47453ab22f2ca748a9fe760a7e402c452c" }, "downloads": -1, "filename": "xalanih-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0528bc15d229e334391e1b325818d287", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19378, "upload_time": "2018-07-08T16:24:25", "url": "https://files.pythonhosted.org/packages/ce/56/24e6483095ae7c504695678aa11c936d79e75339e048fdf88d57daf79068/xalanih-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3c83ee9fa696aca0770f46b778d7fd74", "sha256": "c09fba66bbc321af7e5abe797430537b6ffd803fd2aaa56030f00ee8636c6bcf" }, "downloads": -1, "filename": "xalanih-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3c83ee9fa696aca0770f46b778d7fd74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13219, "upload_time": "2018-07-08T16:24:26", "url": "https://files.pythonhosted.org/packages/e4/05/89ec534346815297de4d927931837670576b02e29344dee7f5e03d813b83/xalanih-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4654b23b10ef1de2e38fe2aa6906ab24", "sha256": "34d767c6361dd1a27b68c2883aa8c29dbcf04d2b15a729b71f16077b8e06417e" }, "downloads": -1, "filename": "xalanih-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4654b23b10ef1de2e38fe2aa6906ab24", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19383, "upload_time": "2018-07-08T18:19:52", "url": "https://files.pythonhosted.org/packages/35/f1/5aaed2333f209ae2aa28d9dc481f31a744182a7d241d4ae2d2f0f93fc47c/xalanih-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "275eec4dd048c68423fdad1784fef3c1", "sha256": "fe61a8fb0d59d90cb0607ed71bb7281c572ddab0bce1745a5db022a8d23eed3d" }, "downloads": -1, "filename": "xalanih-0.1.2.tar.gz", "has_sig": false, "md5_digest": "275eec4dd048c68423fdad1784fef3c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12787, "upload_time": "2018-07-08T18:19:53", "url": "https://files.pythonhosted.org/packages/f6/aa/fc88940723059673430da7ba1bf6a914bb280b34ad59bcc8042c2c8a01aa/xalanih-0.1.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "794ca7f47cb1f4c1cf564df7fc2fc9fe", "sha256": "7a4ccaa4f5624e9252639cf6ab7a06b2f58a4b3b75e0c929f1098910c5731d20" }, "downloads": -1, "filename": "xalanih-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "794ca7f47cb1f4c1cf564df7fc2fc9fe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19384, "upload_time": "2018-07-08T18:24:11", "url": "https://files.pythonhosted.org/packages/8e/01/e6db2b4bcfdd9b3e0c245ccd931d5ae1c98e88a9c2f4d63b5ddccfebdc28/xalanih-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "807a45316f72266d9384d5acedb083ee", "sha256": "288e52925af6d5dfe959b4f572d410f1357d3f422ee48fe8071fb0e26cd63d39" }, "downloads": -1, "filename": "xalanih-1.0.0.tar.gz", "has_sig": false, "md5_digest": "807a45316f72266d9384d5acedb083ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12785, "upload_time": "2018-07-08T18:24:12", "url": "https://files.pythonhosted.org/packages/bc/95/09f112ab19009148999794e47af53efe0caaa74d1bf409fca02368150670/xalanih-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "794ca7f47cb1f4c1cf564df7fc2fc9fe", "sha256": "7a4ccaa4f5624e9252639cf6ab7a06b2f58a4b3b75e0c929f1098910c5731d20" }, "downloads": -1, "filename": "xalanih-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "794ca7f47cb1f4c1cf564df7fc2fc9fe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19384, "upload_time": "2018-07-08T18:24:11", "url": "https://files.pythonhosted.org/packages/8e/01/e6db2b4bcfdd9b3e0c245ccd931d5ae1c98e88a9c2f4d63b5ddccfebdc28/xalanih-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "807a45316f72266d9384d5acedb083ee", "sha256": "288e52925af6d5dfe959b4f572d410f1357d3f422ee48fe8071fb0e26cd63d39" }, "downloads": -1, "filename": "xalanih-1.0.0.tar.gz", "has_sig": false, "md5_digest": "807a45316f72266d9384d5acedb083ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12785, "upload_time": "2018-07-08T18:24:12", "url": "https://files.pythonhosted.org/packages/bc/95/09f112ab19009148999794e47af53efe0caaa74d1bf409fca02368150670/xalanih-1.0.0.tar.gz" } ] }