golang-migrateでSQLiteをマイグレーションする

error: failed to open database: database driver: unknown driver sqlite3 (forgotten import?)に躓いたのでメモ。

環境

手順

  1. brew install golang-migrate
  2. go install -tags 'sqlite3' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
  3. migrate -database "sqlite3://db/db.sqlite" -path db/migrations up

※ 2.を実行せずに3.を実行すると、error: failed to open database: database driver: unknown driver sqlite3 (forgotten import?)が出力される。

参考文献

Lima上のDockerにRubymine(IntelliJ)から接続する

環境

Rubymine: 2024.3.2.1 Lima: 1.0.1

手順

  1. Settings > Build, Execution, Deployment > Docker
  2. (必要に応じて)+で新規設定を追加する。
  3. Connect to Docker daemon with: のSSHを選択する。
  4. 接続用のSSH Configurationを作成し、選択する。
    • Host: localhost
    • Port: limactl listで確認可能なDockerが稼働しているVMのポート
    • Authentication Type: Key pair
    • Private key file: ~/.lima/_config/user