| 130 | | pending_migrations = ActiveRecord::Migrator.new(:up, 'db/migrate').pending_migrations |
|---|
| 131 | | |
|---|
| 132 | | if pending_migrations.any? |
|---|
| 133 | | puts "You have #{pending_migrations.size} pending migrations:" |
|---|
| 134 | | pending_migrations.each do |pending_migration| |
|---|
| 135 | | puts ' %4d %s' % [pending_migration.version, pending_migration.name] |
|---|
| 136 | | end |
|---|
| 137 | | abort "Run `rake db:migrate` to update your database then try again." |
|---|
| | 130 | if defined? ActiveRecord |
|---|
| | 131 | pending_migrations = ActiveRecord::Migrator.new(:up, 'db/migrate').pending_migrations |
|---|
| | 132 | |
|---|
| | 133 | if pending_migrations.any? |
|---|
| | 134 | puts "You have #{pending_migrations.size} pending migrations:" |
|---|
| | 135 | pending_migrations.each do |pending_migration| |
|---|
| | 136 | puts ' %4d %s' % [pending_migration.version, pending_migration.name] |
|---|
| | 137 | end |
|---|
| | 138 | abort "Run `rake db:migrate` to update your database then try again." |
|---|
| | 139 | end |
|---|