Question : Generated Migration Scripts for Models via Console

Hello,

I'm doing some basic relational table creation and I can't seem to find the syntax for generating a migration script via the console.  I can find lots of scripts themselves online, but I can't seem to locate any examples using the console.

Does anyone have an example or a link for creating a one to many and a many to many relation?

Thanks,
-Torrwin

Answer : Generated Migration Scripts for Models via Console

ruby script/generation migration
... will give you the help info.

ruby script/generation migration Post title:string body:text
... will create the file.

http://guides.rails.info/migrations.html

... has more background, but it's for rails 3, so the syntax is different.
Random Solutions  
 
programming4us programming4us