migrtion with data

    I have created a model Category Then in its migration file I have
  def self.up
    create_table :categories do |t|
     t.column :name, :string, :limit=>80
  def self.down
    drop_table :categories

      Here before doing migrate I have to enter data to this since this
is a master table.So I have to enter data
    id name
     1 category1
     2 category2
     3 category3

         Could you please tell how I can do this?Is this possible.And
also what shud be there in self.down method?

Thanks in advance

ActiveRecord::Base.connection.execute (“insert into categories (id,name) values(1,‘categody1’),(2,“category2”);”)

Not sure I entirely understand you, but, after the create_table you
could do:

Category.create(:name => "category1")
Category.create(:name => "category2")
Category.create(:name => "category3")

and in the down do

Thanks for all the reply