{"id":13398491,"url":"https://github.com/github/gh-ost","last_synced_at":"2026-01-16T05:31:59.582Z","repository":{"id":37502645,"uuid":"54378638","full_name":"github/gh-ost","owner":"github","description":"GitHub's Online Schema-migration Tool for MySQL","archived":false,"fork":false,"pushed_at":"2026-01-12T21:22:56.000Z","size":16982,"stargazers_count":13138,"open_issues_count":317,"forks_count":1351,"subscribers_count":594,"default_branch":"master","last_synced_at":"2026-01-13T07:46:56.760Z","etag":null,"topics":["mysql","schema-migrations"],"latest_commit_sha":null,"homepage":"","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/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-03-21T10:08:52.000Z","updated_at":"2026-01-13T05:47:16.000Z","dependencies_parsed_at":"2025-11-27T17:07:22.822Z","dependency_job_id":null,"html_url":"https://github.com/github/gh-ost","commit_stats":{"total_commits":1058,"total_committers":98,"mean_commits":"10.795918367346939","dds":0.3724007561436673,"last_synced_commit":"59db6fab40966c2c491de935e6a71b8c23aafa86"},"previous_names":["github/gh-osc"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/github/gh-ost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-ost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-ost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-ost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-ost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/gh-ost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-ost/sbom","scorecard":{"id":428184,"data":{"date":"2025-08-11","repo":{"name":"github.com/github/gh-ost","commit":"7cc7cc8d28e17ad1b1eeee24bb0593782db41fed"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6,"checks":[{"name":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:14","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:15","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/golangci-lint.yml:8","Warn: no topLevel permission defined: .github/workflows/replica-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/github/.github/SECURITY.md:1","Info: Found linked content: github.com/github/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/github/.github/SECURITY.md:1","Info: Found text in security policy: github.com/github/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.1.7 not signed: https://api.github.com/repos/github/gh-ost/releases/191768283","Warn: release artifact v1.1.6 not signed: https://api.github.com/repos/github/gh-ost/releases/127968381","Warn: release artifact v1.1.5 not signed: https://api.github.com/repos/github/gh-ost/releases/71466892","Warn: release artifact v1.1.4 not signed: https://api.github.com/repos/github/gh-ost/releases/58912808","Warn: release artifact v1.1.3 not signed: https://api.github.com/repos/github/gh-ost/releases/57480854","Warn: release artifact v1.1.7 does not have provenance: https://api.github.com/repos/github/gh-ost/releases/191768283","Warn: release artifact v1.1.6 does not have provenance: https://api.github.com/repos/github/gh-ost/releases/127968381","Warn: release artifact v1.1.5 does not have provenance: https://api.github.com/repos/github/gh-ost/releases/71466892","Warn: release artifact v1.1.4 does not have provenance: https://api.github.com/repos/github/gh-ost/releases/58912808","Warn: release artifact v1.1.3 does not have provenance: https://api.github.com/repos/github/gh-ost/releases/57480854"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is not required on branch 'master'","Info: status check found to merge onto on branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/golangci-lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/golangci-lint.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/golangci-lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/replica-tests.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/github/gh-ost/replica-tests.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile.packaging:1: pin your Docker image by updating golang:1.23-bullseye to golang:1.23-bullseye@sha256:161b8513c09cbfa4c174fd32e46eddc5eddf487a43958b9cf8b07d628e9e0f85","Warn: containerImage not pinned by hash: Dockerfile.test:1: pin your Docker image by updating golang:1.23-bullseye to golang:1.23-bullseye@sha256:161b8513c09cbfa4c174fd32e46eddc5eddf487a43958b9cf8b07d628e9e0f85","Warn: downloadThenRun not pinned by hash: script/ensure-golangci-lint-installed:14","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-48p4-8xcf-vxj5","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T02:42:50.814Z","repository_id":37502645,"created_at":"2025-08-19T02:42:50.814Z","updated_at":"2025-08-19T02:42:50.814Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","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":["mysql","schema-migrations"],"created_at":"2024-07-30T19:00:27.449Z","updated_at":"2026-01-16T05:31:59.563Z","avatar_url":"https://github.com/github.png","language":"Go","readme":"# gh-ost\n\n[![ci](https://github.com/github/gh-ost/actions/workflows/ci.yml/badge.svg)](https://github.com/github/gh-ost/actions/workflows/ci.yml) [![replica-tests](https://github.com/github/gh-ost/actions/workflows/replica-tests.yml/badge.svg)](https://github.com/github/gh-ost/actions/workflows/replica-tests.yml) [![downloads](https://img.shields.io/github/downloads/github/gh-ost/total.svg)](https://github.com/github/gh-ost/releases) [![release](https://img.shields.io/github/release/github/gh-ost.svg)](https://github.com/github/gh-ost/releases)\n\n#### GitHub's online schema migration for MySQL \u003cimg src=\"doc/images/gh-ost-logo-light-160.png\" align=\"right\"\u003e\n\n `gh-ost` is a triggerless online schema migration solution for MySQL. It is testable and provides pausability, dynamic control/reconfiguration, auditing, and many operational perks.\n\n`gh-ost` produces a light workload on the master throughout the migration, decoupled from the existing workload on the migrated table.\n\nIt has been designed based on years of experience with existing solutions, and changes the paradigm of table migrations.\n\n\n\n## How?\n\nAll existing online-schema-change tools operate in similar manner: they create a _ghost_ table in the likeness of your original table, migrate that table while empty, slowly and incrementally copy data from your original table to the _ghost_ table, meanwhile propagating ongoing changes (any `INSERT`, `DELETE`, `UPDATE` applied to your table) to the _ghost_ table. Finally, at the right time, they replace your original table with the _ghost_ table.\n\n`gh-ost` uses the same pattern. However it differs from all existing tools by not using triggers. We have recognized the triggers to be the source of [many limitations and risks](doc/why-triggerless.md).\n\nInstead, `gh-ost` [uses the binary log stream](doc/triggerless-design.md) to capture table changes, and asynchronously applies them onto the _ghost_ table. `gh-ost` takes upon itself some tasks that other tools leave for the database to perform. As result, `gh-ost` has greater control over the migration process; can truly suspend it; can truly decouple the migration's write load from the master's workload.\n\nIn addition, it offers many [operational perks](doc/perks.md) that make it safer, trustworthy and fun to use.\n\n![gh-ost general flow](doc/images/gh-ost-general-flow.png)\n\n## Highlights\n\n- Build your trust in `gh-ost` by testing it on replicas. `gh-ost` will issue same flow as it would have on the master, to migrate a table on a replica, without actually replacing the original table, leaving the replica with two tables you can then compare and satisfy yourself that the tool operates correctly. This is how we continuously test `gh-ost` in production.\n- True pause: when `gh-ost` [throttles](doc/throttle.md), it truly ceases writes on master: no row copies and no ongoing events processing. By throttling, you return your master to its original workload\n- Dynamic control: you can [interactively](doc/interactive-commands.md) reconfigure `gh-ost`, even as migration still runs. You may forcibly initiate throttling.\n- Auditing: you may query `gh-ost` for status. `gh-ost` listens on unix socket or TCP.\n- Control over cut-over phase: `gh-ost` can be instructed to postpone what is probably the most critical step: the swap of tables, until such time that you're comfortably available. No need to worry about ETA being outside office hours.\n- External [hooks](doc/hooks.md) can couple `gh-ost` with your particular environment.\n\nPlease refer to the [docs](doc) for more information. No, really, read the [docs](doc).\n\n## Usage\n\nThe [cheatsheet](doc/cheatsheet.md) has it all. You may be interested in invoking `gh-ost` in various modes:\n\n- a _noop_ migration (merely testing that the migration is valid and good to go)\n- a real migration, utilizing a replica (the migration runs on the master; `gh-ost` figures out identities of servers involved. Required mode if your master uses Statement Based Replication)\n- a real migration, run directly on the master (but `gh-ost` prefers the former)\n- a real migration on a replica (master untouched)\n- a test migration on a replica, the way for you to build trust with `gh-ost`'s operation.\n\nOur tips:\n\n- [Testing above all](doc/testing-on-replica.md), try out `--test-on-replica` first few times. Better yet, make it continuous. We have multiple replicas where we iterate our entire fleet of production tables, migrating them one by one, checksumming the results, verifying migration is good.\n- For each master migration, first issue a _noop_\n- Then issue the real thing via `--execute`.\n\nMore tips:\n\n- Use `--exact-rowcount` for accurate progress indication\n- Use `--postpone-cut-over-flag-file` to gain control over cut-over timing\n- Get familiar with the [interactive commands](doc/interactive-commands.md)\n\nAlso see:\n\n- [requirements and limitations](doc/requirements-and-limitations.md)\n- [common questions](doc/questions.md)\n- [what if?](doc/what-if.md)\n- [the fine print](doc/the-fine-print.md)\n- [Community questions](https://github.com/github/gh-ost/issues?q=label%3Aquestion)\n- [Using `gh-ost` on AWS RDS](doc/rds.md)\n- [Using `gh-ost` on Azure Database for MySQL](doc/azure.md)\n\n## What's in a name?\n\nOriginally this was named `gh-osc`: GitHub Online Schema Change, in the likes of [Facebook online schema change](https://www.facebook.com/notes/mysql-at-facebook/online-schema-change-for-mysql/430801045932/) and [pt-online-schema-change](https://www.percona.com/doc/percona-toolkit/2.2/pt-online-schema-change.html).\n\nBut then a rare genetic mutation happened, and the `c` transformed into `t`. And that sent us down the path of trying to figure out a new acronym. `gh-ost` (pronounce: _Ghost_), stands for GitHub's Online Schema Transmogrifier/Translator/Transformer/Transfigurator\n\n## License\n\n`gh-ost` is licensed under the [MIT license](https://github.com/github/gh-ost/blob/master/LICENSE)\n\n`gh-ost` uses 3rd party libraries, each with their own license. These are found [here](https://github.com/github/gh-ost/tree/master/vendor).\n\n## Community\n\n`gh-ost` is released at a stable state, but with mileage to go. We are [open to pull requests](https://github.com/github/gh-ost/blob/master/.github/CONTRIBUTING.md). Please first discuss your intentions via [Issues](https://github.com/github/gh-ost/issues).\n\nWe develop `gh-ost` at GitHub and for the community. We may have different priorities than others. From time to time we may suggest a contribution that is not on our immediate roadmap but which may appeal to others.\n\nPlease see [Coding gh-ost](doc/coding-ghost.md) for a guide to getting started developing with gh-ost.\n\n## Download/binaries/source\n\n`gh-ost` is now GA and stable.\n\n`gh-ost` is available in binary format for Linux and Mac OS/X\n\n[Download latest release here](https://github.com/github/gh-ost/releases/latest)\n\n`gh-ost` is a Go project; it is built with Go `1.15` and above. To build on your own, use either:\n- [script/build](https://github.com/github/gh-ost/blob/master/script/build) - this is the same build script used by CI hence the authoritative; artifact is `./bin/gh-ost` binary.\n- [build.sh](https://github.com/github/gh-ost/blob/master/build.sh) for building `tar.gz` artifacts in `/tmp/gh-ost-release`\n\nGenerally speaking, `master` branch is stable, but only [releases](https://github.com/github/gh-ost/releases) are to be used in production.\n\n## Authors\n\n`gh-ost` is designed, authored, reviewed and tested by the database infrastructure team at GitHub:\n- [@jonahberquist](https://github.com/jonahberquist)\n- [@ggunson](https://github.com/ggunson)\n- [@tomkrouper](https://github.com/tomkrouper)\n- [@shlomi-noach](https://github.com/shlomi-noach)\n- [@jessbreckenridge](https://github.com/jessbreckenridge)\n- [@gtowey](https://github.com/gtowey)\n- [@timvaillancourt](https://github.com/timvaillancourt)\n","funding_links":[],"categories":["Go","Misc","开源类库","Open source library","Go (531)","数据库管理系统","Projects by main language","Schema"],"sub_categories":["数据库","Database","网络服务_其他","go","Changes"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgh-ost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fgh-ost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgh-ost/lists"}