# golang-migrate を Homebrew, dnf, Nix, scoop, apt でインストール

golang-migrate のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:golang-migrate
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install golang-migrate
```

  証拠: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install migrate
```

  証拠: Fedora Rawhide package metadata: migrate from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#migrate
```

  証拠: nixpkgs package indexes: pkgs/by-name/mi/migrate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- Ubuntu apt (92%):

```sh
sudo apt install python-migrate-doc
```

  証拠: Ubuntu 24.04 LTS package indexes: python-migrate-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz

### Windows

- Scoop (92%):

```sh
scoop install main/migrate
```

  証拠: Scoop official bucket manifest trees: bucket/migrate.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:golang-migrate
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/golang-migrate>
- **バージョン:** 4.19.1
- **ソース概要:** Database migrations CLI tool
- **ホームページ:** <https://github.com/golang-migrate/migrate>
- **リポジトリ:** <https://github.com/golang-migrate/migrate>
- **ライセンス:** MIT
- **ソースアーカイブ:** <https://github.com/golang-migrate/migrate/archive/refs/tags/v4.19.1.tar.gz>
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- migrate (cli)
- migrate (エイリアス)

## ビルド依存関係

- go

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 4.19.1
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/golang-migrate/migrate
- 検出された最新: v4.19.1 (最新)
- 情報: No package-manager update timestamp was available.
## プロジェクトの歴史と使われ方

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.

### ソース

- <https://github.com/golang-migrate/migrate>
- <https://github.com/golang-migrate/migrate/blob/master/GETTING_STARTED.md>
- <https://github.com/golang-migrate/migrate/releases>
- <https://github.com/mattes/migrate>
- <https://github.com/mattes/migrate/releases>
- <https://pkg.go.dev/github.com/golang-migrate/migrate/v4>


## セキュリティノート

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

- **Geiger リスク:** blue / 中
- broad file, network, media, or database tool signal

## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** golang-migrate
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 他のパッケージマネージャ記録

- Nix - migrate: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/mi/migrate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - python-migrate-doc - 0.13.0-0ubuntu2: installed executable or alias match | Ubuntu 24.04 LTS package indexes: python-migrate-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Database schema migration for SQLAlchemy - doc | https://github.com/openstack/sqlalchemy-migrate
- Ubuntu apt - python3-migrate - 0.13.0-0ubuntu2: installed executable or alias match | Ubuntu 24.04 LTS package indexes: python3-migrate from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Database schema migration for SQLAlchemy - Python 3.x | https://github.com/openstack/sqlalchemy-migrate
- dnf - migrate - 4.19.1-5.fc45: installed executable or alias match | Fedora Rawhide package metadata: migrate from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Go database migrations library and program | https://github.com/golang-migrate/migrate
- Scoop - main/migrate: installed executable or alias match | Scoop official bucket manifest trees: bucket/migrate.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 関連リンク

- [Source-control packages](https://pkg.so/ja/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/ja/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/ja/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://pkg.so/ja/brew/go/) - Build dependency declared by Homebrew.
- [liquibase](https://pkg.so/ja/brew/liquibase/) - Shares pkgdb curated category or tags: cli, database, developer-tools, migrations, schema.
- [sqlcmd](https://pkg.so/ja/brew/sqlcmd/) - Shares pkgdb curated category or tags: cli, database, developer-tools, go.
- [sqlc](https://pkg.so/ja/brew/sqlc/) - Shares pkgdb curated category or tags: cli, database, developer-tools, go.
- [pocketbase](https://pkg.so/ja/brew/pocketbase/) - Shares pkgdb curated category or tags: cli, database, developer-tools, go.
- [jet](https://pkg.so/ja/brew/jet/) - Shares pkgdb curated category or tags: cli, database, developer-tools, go.
- [sqlboiler](https://pkg.so/ja/brew/sqlboiler/) - Shares pkgdb curated category or tags: cli, database, developer-tools, go.
- [fzf](https://pkg.so/ja/brew/fzf/) - Shares pkgdb curated category or tags: cli, developer-tools, go.
- [libpq](https://pkg.so/ja/brew/libpq/) - Shares pkgdb curated category or tags: cli, database, developer-tools.
- [mjml-migrate](https://pkg.so/ja/npm/mjml-migrate/) - Executable or command metadata overlaps with this package. Shared terms: cli, developer, developer-tools, migrate.
- [sql-migrate](https://pkg.so/ja/brew/sql-migrate/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, database, developer, developer-tools, go.

## Combined YAML source

View the package source record on GitHub. [combined/golang-migrate.yml](https://github.com/mxcl/pkgdb/blob/main/combined/golang-migrate.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
