How to create database migrations in Ruby on Rails without Using Scaffolding
I want to create the Model and everything on my own without using the scaffolding in Ruby on Rails. I create the following class:
class Dog < ActiveRecord::Base
end
Now, I want to add a开发者_JAVA百科 table Dogs. I am using sqlite3. I think I need to write migration manually!
Rails 2:
ruby script/generate migration CreateDogs
Rails 3:
rails g migration CreateDogs
精彩评论