views:

47

answers:

2

Now in rails we can use t.string instead of t.column

using t.string is easy.But

t.column is a deprecated feature?

any other advantage of using t.datatype other than easiness.

Is there any way to convert all current migrations to new style easily.

+1  A: 

1) sed. :)

2) Do you need to convert them? If you have schema.rb checked in as advised (or even a local copy somewhere), that should represent the current state of the database, right? If you do a "rake db:schema:dump" that should set you up with all the migrations up to that point in one schema.rb file, then you can go from there.

John Lockwood
+1  A: 

t.column is not deprecated. You can use it without losing any sleep. The t.string syntax is just a "sugar" on top of the good old t.column.

August Lilleaas