LoginSignup
1
1

More than 5 years have passed since last update.

migration

migrationの利点はスキーマの変動が激しい開発現場では前の以前のものに復元したい場合があります。そのときにとても有効な機能

Ridgepole

Schemafileというファイルに Ruby DSLでテーブル定義を書くことで反映させます。

Schemafileに一行足せば、dbを変えることができる強力なものです。

コマンド

スキーマを変更

$bundle exec ridgepole -c config/database.yml -f Schemafile --apply

dbからのインポート

$bundle exec ridgepole -c config/database.yml --export -o Schemafile

dry run

$bundle exec ridgepole -c config/database.yml --dry-run -e test

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1