21 Apr '17, 8am

You've messed up a Rails migration. Now what?

You've messed up a Rails migration. Now what?

You've messed up a migration. Now what? Apr 13, 2017 You’ve written a migration in your Ruby on Rails application, and like any normal human , you’ve made a mistake! In your development environment, you don’t want to drop and recreate the database you’re working in, you just want to ‘re-run’ the migration that you’ve now fixed. No need to fear - I’ve got your back. In your console, run: rake db:migrate:status Which will give you the following output: database: my_database Status Migration ID Migration Name -------------------------------------------------- up 20170104131525 Devise create users up 20170104174145 Create roles up 20170704182740 Create fish up 20170704192840 Create octopus up 20170704195845 Create new attributes for fish and migrate from octopus Nice. The latest one is the migration you want to ‘redo’, but this will work on any migration. Grab the migration id...

Full article: https://schwad.github.io/ruby/rails/migrations/2017/04/13...

Tweets

You've messed up a Rails migration. Now what?

rubyflow.com 21 Apr '17, 9am

× The Ruby and Rails community linklog Made a library? Written a blog post? Found a useful tutorial? Share it with the Rub...

data migration by talent90seconds

freelancer.com 21 Apr '17, 4am

We are looking for a rails developer with data migration experience. We are rebuilding our product and have changed the mo...

Earthy tones, yes please - stock up for spring ...

ninewest.com 23 Apr '17, 2pm

Buy 2 or more, get 40% off Shoes & Handbags offer valid between 04/21/2017 at 12:00AM EST and 04/24/2017 11:59PM EST or wh...

OUT NOW!

fluxxy.tictail.com 02 May '17, 5pm

About We sell big brand products for affordable prices, we ship very quickly and checking out is as simple as counting to ...

#ScienceMarch is happening now in Washington DC. Curious about our work in the nation’s capital? https://t.co/Kcz6VHfzi6

#ScienceMarch is happening now in Washington DC...

nature.org 22 Apr '17, 6pm

Bolstering this initiative, Prudential Financial announced at a White House event in March that it will invest $1.7 millio...