We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02da705 commit 3201473Copy full SHA for 3201473
bin/git_rails
@@ -30,12 +30,13 @@ if [ ! -z "$migrations_removed" ]; then
30
fi
31
git checkout "$old_ref" -- "$migration"
32
version=`echo "$migration" | cut -d'_' -f1 | cut -d'/' -f3`
33
- bundle exec rake db:migrate:down VERSION="$version"
34
- git reset
35
- rm "$migration"
+ migrate_commands="$migrate_commandsActiveRecord::Migrator.run(:down, 'db/migrate', $version) rescue nil"
36
done
+ echo "$migrate_commands" | bundle exec rails c
37
bundle exec rake db:test:prepare
38
git checkout $new_ref -- db/schema.rb
+ git reset HEAD -- db/migrate
39
+ git clean -df db/migrate
40
41
42
if [ ! -z "$migrations_added" ]; then
0 commit comments