An example of Rails2.0:
def self.up
create_table :user do |t|
t.string :name, :address
t.timestamps
end
end
"created_at" and "updated_at" are automatically made when "timestamps" is written.
I'm a Japanese programmer. I write about C#, Ruby and JavaScript.
No comments:
Post a Comment