{"id":39800918,"url":"https://github.com/nate-anderson/moogration","last_synced_at":"2026-01-18T12:33:23.830Z","repository":{"id":55114921,"uuid":"295091620","full_name":"nate-anderson/moogration","owner":"nate-anderson","description":"Simple MySQL migrations in Go","archived":false,"fork":false,"pushed_at":"2024-08-30T03:52:18.000Z","size":115,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-29T23:51:46.560Z","etag":null,"topics":["database","go","golang","migrations","mysql","sql"],"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/nate-anderson.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}},"created_at":"2020-09-13T06:22:49.000Z","updated_at":"2024-08-30T03:51:43.000Z","dependencies_parsed_at":"2022-08-14T12:30:31.900Z","dependency_job_id":null,"html_url":"https://github.com/nate-anderson/moogration","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nate-anderson/moogration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nate-anderson%2Fmoogration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nate-anderson%2Fmoogration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nate-anderson%2Fmoogration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nate-anderson%2Fmoogration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nate-anderson","download_url":"https://codeload.github.com/nate-anderson/moogration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nate-anderson%2Fmoogration/sbom","scorecard":{"id":675113,"data":{"date":"2025-08-11","repo":{"name":"github.com/nate-anderson/moogration","commit":"48b59863e09d182ff158a4765378a3be6f2cef70"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","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":-1,"reason":"no workflows found","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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":-1,"reason":"no dependencies found","details":null,"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"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":"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":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for 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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"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":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 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-21T21:13:36.423Z","repository_id":55114921,"created_at":"2025-08-21T21:13:36.424Z","updated_at":"2025-08-21T21:13:36.424Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["database","go","golang","migrations","mysql","sql"],"created_at":"2026-01-18T12:33:23.319Z","updated_at":"2026-01-18T12:33:23.822Z","avatar_url":"https://github.com/nate-anderson.png","language":"Go","readme":"\u003cimg src=\"https://github.com/nate-anderson/moogration/blob/master/moo.jpg\" width=\"150\" alt=\"Moo the database cow\"\u003e\n\n# moogration\n\nSimple MySQL migrations in Go. No dependencies, simple API, migration change detection and\nstatus tracking, and a cute cow.\n\nIt might work with other SQL databases, but I haven't tried. I wrote this as part of another\nproject and put it in this repo for my own convenience of reuse. I doubt it's ready for\nproduction.\n\n## Defining migrations\n\nMigrations should be defined using the `Migration` struct type and registered using the\n`Register` function, like so:\n\n```go\nmoogration.Register(\n    \u0026Migration{\n\t\tName: \"001_create_table_user\",\n\t\tUp: `CREATE TABLE user (\n\t\t\t...\n\t\t);`,\n\t\tDown: `DROP TABLE user;`,\n    }\n)\n```\n\n## Running migrations\n\nMigrations registered with `Register` will be sorted ascending by the `name` key\nand run in order. Previously run migrations will be skipped unless `force` is set to true.\n\n```go\nmoogration.RunLatest(db, down, force, logger)\n```\n\nYou can also roll back a specified number of migration batches with `moogration.Rollback()`.\n\n## Logging\n\nPass a `*log.Logger` to log migration status. Pass `nil` to silence migration logging.\n\n## Errors\n\nThis package assumes that database migrations are application critical and thus panics upon\nencountering an error.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnate-anderson%2Fmoogration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnate-anderson%2Fmoogration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnate-anderson%2Fmoogration/lists"}