{"id":37880469,"url":"https://github.com/limoli/dbshift-core","last_synced_at":"2026-01-16T16:48:10.563Z","repository":{"id":57499353,"uuid":"211271167","full_name":"limoli/dbshift-core","owner":"limoli","description":"A light migration logic expandable to different databases.","archived":false,"fork":false,"pushed_at":"2023-02-25T05:57:56.000Z","size":34,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-19T05:43:07.336Z","etag":null,"topics":["command-line-tool","dbmigration","migration-tool","migrations"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/limoli.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-27T08:21:48.000Z","updated_at":"2020-07-12T13:41:24.000Z","dependencies_parsed_at":"2024-06-19T05:31:30.395Z","dependency_job_id":null,"html_url":"https://github.com/limoli/dbshift-core","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/limoli/dbshift-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limoli%2Fdbshift-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limoli%2Fdbshift-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limoli%2Fdbshift-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limoli%2Fdbshift-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/limoli","download_url":"https://codeload.github.com/limoli/dbshift-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limoli%2Fdbshift-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["command-line-tool","dbmigration","migration-tool","migrations"],"created_at":"2026-01-16T16:48:10.445Z","updated_at":"2026-01-16T16:48:10.552Z","avatar_url":"https://github.com/limoli.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DbShift Core\n\nDbShift Core provides simple and light logic for the management of **database-schema migrations**.\nYou will be able to create migrations, check the current db status, decide to upgrade or downgrade easily.\nIt can be easily implemented with specific database clients.\n\n[![GoDoc](https://godoc.org/limoli/dbshift-core?status.svg)](https://godoc.org/github.com/limoli/dbshift-core)\n[![Build Status](https://travis-ci.org/limoli/dbshift-core.svg?branch=master)](https://travis-ci.org/limoli/dbshift-core)\n[![Go Report Card](https://goreportcard.com/badge/github.com/limoli/dbshift-core)](https://goreportcard.com/report/github.com/limoli/dbshift-core)\n[![Maintainability](https://api.codeclimate.com/v1/badges/0b1f0599ef4c4a763953/maintainability)](https://codeclimate.com/github/limoli/dbshift-core/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/0b1f0599ef4c4a763953/test_coverage)](https://codeclimate.com/github/limoli/dbshift-core/test_coverage)\n[![License](http://img.shields.io/badge/license-mit-blue.svg)](https://raw.githubusercontent.com/github.com/limoli/dbshift-core/LICENSE)\n\n## Install\n\nDbShift Core aims to provide logic and **not an installable command**.\nYou can use a **DbShift Client** implementation according to your database:\n- [MySQL client](https://github.com/limoli/dbshift-cli-mysql)\n\n## Commands\n\nSet your [configuration](#configuration)\n\n#### Create migration \nIt creates two files (`$timestamp.down.sql` and `$timestamp.up.sql`) at your migrations folder.\n```bash\ndbshift create my-migration-description\n```\n\n#### Status   \nCheck status of your migrations.\n```bash\ndbshift status\n```\n#### Upgrade\nUpgrade migrations.\n```bash\ndbshift upgrade\n```\n```bash\ndbshift upgrade \u003ctoInclusiveMigrationVersion\u003e\n```\n\n#### Downgrade\nDowngrade migrations.    \n```bash\ndbshift downgrade\n```\n```bash\ndbshift downgrade \u003ctoInclusiveMigrationVersion\u003e\n```\n\n## Configuration\n\n| Key                                   | Description                                        | Value example              |\n|---                                    |---                                                 |---                         |\n|`DBSHIFT_ABS_FOLDER_MIGRATIONS`        | Where migrations are created and stored.           | `/srv/app/migrations`      |\n|`DBSHIFT_OPTION_IS_CREATE_DISABLED`    | Disable create command (useful on production).     | `true` / `false` (default) |\n|`DBSHIFT_OPTION_IS_DOWNGRADE_DISABLED` | Disable downgrade command (useful on production).  | `true` / `false` (default) |\n|`DBSHIFT_OPTION_IS_UPGRADE_DISABLED`   | Disable upgrade command (useful on production).    | `true` / `false` (default) |\t\n\nThis configuration represents the basic configuration for the DbShift Core.\nMore configurations can be offered by the single DbShift Client.\n\n## Write good migrations\n\n1. Queries must be database name **agnostic**\n2. [SRP](https://en.wikipedia.org/wiki/Single_responsibility_principle) according to your description\n3. Write both upgrade and downgrade migrations \n\n## Exit codes\n\nThe following error-codes interval is reserved for core usage: `[1, 90]`.\n\n| Code      | Description                                                           |\n| ---       | ---                                                                   |\n| `1`       | When no command is passed in the no-interactive mode.                 |\n\n## Client implementation\n\n#### Exit codes\n\nThe client implementation interval is `[100,255]`.\n\n#### Environment\n\nThe environment variables must have the following prefix: `DBSHIFT_CLI_\u003cDBTYPE\u003e`.\n\nExample for `MySQL`: \n- Prefix: `DBSHIFT_CLI_MYSQL`\n- Variables: `DBSHIFT_CLI_MYSQL_X`, `DBSHIFT_CLI_MYSQL_Y`, `DBSHIFT_CLI_MYSQL_Z`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimoli%2Fdbshift-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimoli%2Fdbshift-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimoli%2Fdbshift-core/lists"}