29 May '14, 5pm

Workflows for Writing Migrations With Rollbacks in Mind

Workflows for Writing Migrations With Rollbacks in Mind Simon Taranto May 29, 2014 rails rake thoughtbot’s dotfiles include an alias mapping migrate to rake db:migrate db:rollback && rake db:migrate It is also a good practice in our workflow to use the migrate alias in place of rake db:migrate . Let’s explore what this command does and why we recommend it. Reversibility rake db:migrate db:rollback will run any pending migrations and then attempt to roll back those migrations. If the migration and rollback are successful (signified by && ), rake db:migrate will then run the migration again. If the command is not successful, an error will be thrown. In this way we can be confident our migrations' down commands are syntactically valid (no typos) and logically valid (no invalid castings of values, for example). Beyond having a short alias in place of a multi-word rake command,...

Full article: http://robots.thoughtbot.com/workflows-for-writing-migrat...

Tweets

Mind Control

robbreport.com 29 May '14, 8am

Patients who come to Johns Hopkins for epilepsy surgery sometimes require a prequel to their treatment: a multiday stint i...

Writing a Domain-Specific Language in Ruby

robots.thoughtbot.com 28 May '14, 6pm

, or DSL, is “a programming language of limited expressiveness focused on a particular domain”. It makes tasks in its doma...

@mperham that's what led to us writing

rubygems.org 09 Jun '14, 9pm

raca 0.3.3 A simple wrapper for the Rackspace Cloud API with no dependencies install gem install raca Download Documentati...

Not sure if you should run today? This nifty in...

runnersworld.com 30 May '14, 11am

It's All Good Forget about comparisons to other runners. Every mile you run is a symbol of accomplishment. 10 Reasons the ...

These shark species will blow your mind: #World...

nwf.org 08 Jun '14, 7pm

What do you picture when you think of a shark? A torpedo-shaped body? Big, sharp teeth? As you'll soon see, a shark can st...

Health #Health_News #meditation #military #mindfulness War and Peace (of Mind): The post War and Peace (of Mind)...

Health #Health_News #meditation #military #mind...

theepochtimes.com 01 Jun '14, 5pm

Researchers from the University of California, San Diego School of Medicine and Naval Health Research Center have found th...

p51 AddXXXToYYYのルールは説明しなくても良い?対象読者にRails触ってない人も...

guides.rubyonrails.org 01 Jun '14, 11am

You can think of each migration as being a new 'version' of the database. A schema starts off with nothing in it, and each...