Sigma Photography

September 18, 2008

Rb

Filed under: Uncategorized — sigmaphotography @ 9:32 pm

Poor man’s migrations

Rubidium - Wikipedia, the free encyclopedia
Properties of the element, including its history, applications, and Rb-87, a naturally occurring isotope, is very slightly radioactive, with a half

In case you have read PJ’s post on Automatic migrations you might like this.

Rubidium
Sources, properties, isotopes, and uses. Atomic Number: 37. Atomic Radius: 247.5 pm. Atomic Symbol: Rb. Melting Point: 39.3 �C

Fit pc slim

PoorMansMigrations is a very simple Active Record extension that allows you to create/update/delete DB columns without using migrations directly.

Rb: Definition from Answers.com
Rb The symbol for the element rubidium. RB, the name used for a series of buses manufactured by Hyundai Motor Company. rb is also the extension


Playing with your models can be as easy as :

Doing Model.migrate will automatically sync the database table with the columns you define inside cialis your models. That is, if you add new column :what, :ever statements, those columns will be created in the table. Similarly, if you remove any column statements, respective columns will be removed from the table.

But hey, thats just stupid. Age is integer silly! Changing the column is a little tricky. As I didn’t want the library to be super smart in figuring out what changed when, I just used a simple/stupid/verbose solution. If you supply :force => true option to column definition, the column will be dropped viagra kaufen and recreated when you do Model.migrate

So the following will fix the age column :

And if you royally screw up, and just want to start everything from scratch :

Migrate with a !

Here’s the code for PoorMansMigrations :


Related posts: Leap wireless, Did bernie mac die, Brendan adams, Wall St. has worst drop since 2001, Teen planet

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress