Automic VaultAutomic Vault

brew

使用 Homebrew, dnf, Nix, scoop, apt 安装 golang-migrate

查看 golang-migrate 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install golang-migrate

local Homebrew formula metadata

Linux

Fedora dnf已验证 · 92%
sudo dnf install migrate

Fedora Rawhide package metadata · migrate · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#migrate

nixpkgs package indexes · pkgs/by-name/mi/migrate/package.nix · 来源: api.github.com

Ubuntu apt已验证 · 92%
sudo apt install python-migrate-doc

Ubuntu 24.04 LTS package indexes · python-migrate-doc · 来源: archive.ubuntu.com

Windows

Scoop已验证 · 92%
scoop install main/migrate

Scoop official bucket manifest trees · bucket/migrate.json · 来源: api.github.com

概览

软件包摘要

Database migrations CLI tool

命令和别名

  • migrate

历史

项目历史与用法

golang-migrate is a Go database migration project distributed as both a CLI and a Go library. It applies ordered migration files from source drivers to database drivers, deliberately keeping database drivers simple while centralizing migration logic in the core package.

项目历史

The project traces back to `mattes/migrate`, a database migration repository created in 2014. The maintained `golang-migrate/migrate` repository was created in January 2018 and states that it was forked from `mattes/migrate`.

The fork preserved the core CLI/library model while continuing the driver architecture. Its README documents a broad matrix of database drivers, including PostgreSQL, MySQL/MariaDB, SQLite, SQL Server, Cassandra/ScyllaDB, ClickHouse, MongoDB, CockroachDB, and cloud-oriented sources such as GitHub, GitLab, S3, and Google Cloud Storage.

The project standardized on Go module import paths for v4 and explicitly marks v3 as unsupported in its README. That version boundary matters because many Go projects embed migration support directly in their own binaries rather than only shelling out to the CLI.

采用历史

golang-migrate became a common Go ecosystem migration tool because it works both as a standalone `migrate` binary and as an importable library. The README points to packagecloud deb packages, Docker images, GitHub releases, and Go documentation, while the batch input records Homebrew, Fedora, Nix, Scoop, and other package-manager entries.

The maintained fork's GitHub repository had over 18,000 stars and more than 1,500 forks in the 2026 GitHub API snapshot used for this batch, making it one of the better-known Go-native database migration tools.

使用方式

The standard workflow is to create paired up/down SQL files with `migrate create`, then run them with a source such as `file://path/to/migrations` and a database URL. The getting-started guide emphasizes running migrations up, down, and up again before committing them.

Operationally, golang-migrate is intentionally explicit: the README says the CLI has no config search paths, no config files, and no magic environment-variable injection. Users pass source and database URLs directly, and database credentials normally live in those URLs or in caller-managed secret handling rather than in a tool-owned credentials file.

The getting-started guide highlights dirty database states, force operations, idempotent migrations, transaction wrapping, and database locking when multiple app instances may run migrations. Those warnings are why package users often treat `migrate` as deployment infrastructure rather than a casual development helper.

为什么软件包爱好者会关心

For package nerds, golang-migrate is the archetypal Go single-binary infrastructure tool: it can be installed from Homebrew, run from Docker, vendored as a library, or baked into a release artifact. The driver split also makes downstream builds interesting, because packagers and application authors decide which database/source drivers to include.

Its significance is also cultural: it represents the Go preference for explicit URLs, small binaries, and predictable failure over framework-managed migration magic. That makes it popular in CI pipelines and container entrypoints where reproducibility beats convenience.

时间线

  • 2014: `mattes/migrate` repository created for database migrations in Go.
  • 2017: `mattes/migrate` v3 preview releases published.
  • 2018: `golang-migrate/migrate` repository created as a fork of `mattes/migrate`.
  • 2018: `golang-migrate/migrate` v3.1.0 and later v3 releases published.
  • 2019-2026: v4 import path and driver ecosystem documented as the supported line; v3 documented as unsupported.

Related projects

  • `mattes/migrate` is the direct upstream ancestor named by the maintained repository.
  • The README points users coming from other migration systems to `migradaptor`, and it links broader database-tool alternatives through Awesome Go.
  • Database and source drivers connect golang-migrate to PostgreSQL, MySQL/MariaDB, SQLite, MongoDB, ClickHouse, SQL Server, GitHub, GitLab, S3, and Google Cloud Storage workflows.

安全态势

风险级别:blue

broad file, network, media, or database tool signal.

风险分类器

blue 风险 · 中 置信度 · tool

原因

  • broad file, network, media, or database tool signal

信号

  • text:database

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 构建元数据列出 1 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
migratecli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本4.19.1
管理器更新时间
本地数据OK
上游当前
检测到的最新版本v4.19.1

https://github.com/golang-migrate/migrate

  • 信息No package-manager update timestamp was available.低 置信度

安装元数据

软件包元数据

软件包键brew:golang-migrate
版本4.19.1
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/golang-migrate
主页https://github.com/golang-migrate/migrate
仓库https://github.com/golang-migrate/migrate
上游文档https://github.com/golang-migrate/migrate#readme
许可证MIT
源码归档https://github.com/golang-migrate/migrate/archive/refs/tags/v4.19.1.tar.gz
构建依赖go
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namegolang-migrate
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix92%

migrate

nix profile install nixpkgs#migrate
  • installed executable or alias match
  • 匹配方式:Migrate
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/mi/migrate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt92%

python-migrate-doc 0.13.0-0ubuntu2

Database schema migration for SQLAlchemy - doc

https://github.com/openstack/sqlalchemy-migrate

sudo apt install python-migrate-doc
  • Section: doc
  • Architecture: all
  • Source Package: migrate
  • 1 依赖
  • installed executable or alias match
  • 匹配方式:Migrate
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: python-migrate-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt92%

python3-migrate 0.13.0-0ubuntu2

Database schema migration for SQLAlchemy - Python 3.x

https://github.com/openstack/sqlalchemy-migrate

sudo apt install python3-migrate
  • Section: python
  • Architecture: all
  • Source Package: migrate
  • 7 依赖
  • 1 可选依赖
  • installed executable or alias match
  • 匹配方式:Migrate
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: python3-migrate from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
dnf92%

migrate 4.19.1-4.fc44

Go database migrations library and program

https://github.com/golang-migrate/migrate

sudo dnf install migrate
  • License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC0-1.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: migrate
  • 3 依赖
  • 2 提供
  • installed executable or alias match
  • 匹配方式:Migrate
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: migrate from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
Scoop92%

main/migrate

scoop install main/migrate
  • installed executable or alias match
  • 匹配方式:Migrate
Scoop official bucket manifest trees · api.github.com · Scoop official bucket manifest trees: bucket/migrate.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment