# sql-migrate を Homebrew, apt, Nix でインストール

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

## インストール

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

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

### macOS

- Homebrew (100%):

```sh
brew install sql-migrate
```

  証拠: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install sql-migrate
```

  証拠: Debian stable package indexes: sql-migrate from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

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

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

## パッケージ情報

- **パッケージキー:** brew:sql-migrate
- **パッケージマネージャ:** Homebrew
- **バージョン:** 1.8.1
- **ソース概要:** SQL schema migration tool for Go
- **ホームページ:** <https://github.com/rubenv/sql-migrate>
- **リポジトリ:** <https://github.com/rubenv/sql-migrate>
- **最終更新:** 2026-07-26T04:03:44+02:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- sql-migrate (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 1.8.1
## プロジェクトの歴史と使われ方

sql-migrate is a Go SQL schema migration tool that can be used as either a standalone CLI or an importable Go library. Its README describes it as based on gorp and goose, with migrations written directly in SQL.

### プロジェクトの歴史

The public GitHub repository was created in September 2014, in the period when Go database tooling was maturing around small command-line programs and libraries. The project kept the classic migration commands: `up`, `down`, `redo`, `status`, and `new`.

### 採用の歴史

The project accumulated broad package-manager availability in the supplied package facts, including Homebrew, Debian, Ubuntu, and Nix. Its GitHub repository also shows thousands of stars, indicating durable use beyond a single distribution channel.

### 使われ方

As a CLI, sql-migrate reads `dbconfig.yml` by default, selects an environment with `-env`, and applies or rolls back SQL migration files. As a Go library, it can run migrations from memory, a folder, embedded assets, or an HTTP filesystem, which made it useful for Go applications that wanted migration logic inside the binary.

### パッケージ好きにとっての重要性

For package-manager culture, sql-migrate represents the Go tradition of shipping one small static-ish executable that can also serve as a library. Package maintainers care because database migration tools sit in deployment paths, and users often want the exact same binary available in local development, CI, and server provisioning.

### タイムライン

- 2014: GitHub repository created.
- 2014: README examples show migration status output and timestamped SQL migration files.
- 2020s: README documents Go module-era installation with `go install ...@latest` for Go 1.18 and later.
- 2026: Repository remained active according to GitHub metadata.

### Related projects

- The README explicitly says sql-migrate is based on gorp and goose and works well with sqlx. It also documents database drivers for SQLite, PostgreSQL, MySQL, MSSQL, and Oracle.

### ソース

- <https://api.github.com/repos/rubenv/sql-migrate>
- <https://github.com/rubenv/sql-migrate#readme>
- <https://pkg.go.dev/github.com/rubenv/sql-migrate>
- source_facts.package-manager


## セキュリティノート

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

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: dbconfig.yml

## Credential files

- Unix: dbconfig.yml
## 他のパッケージマネージャ記録

- Debian apt - sql-migrate - 0.0~git20191213.0633851-3+b16: normalized package name match | Debian stable package indexes: sql-migrate from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | SQL schema migration tool for Go (program) | https://github.com/rubenv/sql-migrate
- Nix - sql-migrate: normalized package name match | nixpkgs package indexes: pkgs/by-name/sq/sql-migrate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - sql-migrate - 0.0~git20191213.0633851-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: sql-migrate from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | SQL schema migration tool for Go (program) | https://github.com/rubenv/sql-migrate


## Combined YAML source

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


## ソース

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
