{"id":22660601,"url":"https://github.com/mertguvencli/deploydb","last_synced_at":"2025-04-12T06:07:11.866Z","repository":{"id":44163505,"uuid":"417315265","full_name":"mertguvencli/deploydb","owner":"mertguvencli","description":"A simple python package that performs SQL Server Source Control and Auto Deployment.","archived":false,"fork":false,"pushed_at":"2022-12-26T21:04:09.000Z","size":190,"stargazers_count":11,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T01:35:35.933Z","etag":null,"topics":["database","dbops","deployment-automation","python","sql-server","version-control"],"latest_commit_sha":null,"homepage":"https://deploydb.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mertguvencli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-14T23:53:36.000Z","updated_at":"2023-09-27T14:08:53.000Z","dependencies_parsed_at":"2023-01-31T01:45:40.278Z","dependency_job_id":null,"html_url":"https://github.com/mertguvencli/deploydb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mertguvencli%2Fdeploydb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mertguvencli%2Fdeploydb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mertguvencli%2Fdeploydb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mertguvencli%2Fdeploydb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mertguvencli","download_url":"https://codeload.github.com/mertguvencli/deploydb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345265,"owners_count":21088244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","dbops","deployment-automation","python","sql-server","version-control"],"created_at":"2024-12-09T11:10:44.995Z","updated_at":"2025-04-12T06:07:11.793Z","avatar_url":"https://github.com/mertguvencli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deploydb\n\nDeploy your database objects automatically when the git branch is updated.\n\n* Production-ready! ⚙️\n* Easy-to-use 🔨\n* Customizable 🔧\n\n\n## Installation\nInstall the latest package. `pip install deploydb`\n\n\n## Usage\n1- Create configuration file ( *json file or `dict`* )\n\n|Property|Description|\n|------------|-----------|\n|`local_path`|where the local repository will be located|\n|`https_url` or `ssh_url`|address to be listen|\n|`target_branch`|branch to handle changes|\n|`db_creds`|a list of server credentials|\n\nExample: `config.json`\n```json\n{\n    \"local_path\": \"\",\n    \"https_url\": \"\",\n    \"ssh_url\": \"\",\n    \"target_branch\": \"main\",\n    \"db_creds\": {\n        \"driver\": \"ODBC Driver 17 for SQL Server\",\n        \"server\": \"server-address-or-instance-name\",\n        \"user\": \"your-username\",\n        \"passw\": \"your-password\"\n    }\n}\n```\n\n2- Listener will listen every changes with `handle_changes` method.\n\n```python\nfrom deploydb import Listener\n\ndeploy = Listener('config.json')\ndeploy.handle_changes()\n```\n\n\n### Repo Generator\nIf you does not have any existing repository. You can easily export your database objects then create your repository.\n```python\nfrom deploydb import RepoGenerator\n\nscripter = RepoGenerator(\n    config=\"config.json\",\n    export_path=\"path-to-export\",\n    includes=[],  # Default takes all databases from the given credential if not specified.\n    excludes=[]\n)\nscripter.run()\n```\n`RepoGenerator` will extract objects structure as below.\n\n```\n.\n├── Databases\n│   ├── Your-Db-Name\n│   │   ├── DDLs\n│   │   ├── DMLs\n│   │   ├── Functions\n│   │   ├── Stored-Procedures\n│   │   ├── Tables\n│   │   ├── Triggers\n│   │   ├── Types\n│   │   └── Views\n│   └── Database-N\n└── README.md\n```\n\n## TODO\n\n* Creating Services for Continuous Integration\n    * Windows Service\n    * Linux Systemd Service\n\n* Getting Notifications\n    * Microsoft Teams Webhook Integration\n    * Slack Webhook Integration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmertguvencli%2Fdeploydb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmertguvencli%2Fdeploydb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmertguvencli%2Fdeploydb/lists"}