the VERSION value at in rake db:migrate VERSION=[versionNumber] is the
migration number right?  for instance lets say I have 3 models
generated in this respective order albums, users, and reviews.  If I
do "rake db:migrate VERSION=0", it will delete the data and existence
of all three tables....if I do VERSION=1, it will delete the existance/
data of users and reviews etc etc...

So my problem is I rolled back to VERSION=0, added a column to Review
in the migration file, and migrated again.  For some reason rails
didn't acknowledge the change and the table indecies are still the
same.

So my before I rolled back to version 0:

class CreateReviews < ActiveRecord::Migration
  def self.up
    create_table :reviews, :force => true do |t|
      t.text :productReview
      t.string :product
      t.string :productCreator

      t.timestamps
    end

  end

  def self.down
    drop_table :reviews
  end
end


I then put in a coloumn called album_id

class CreateReviews < ActiveRecord::Migration
  def self.up
    create_table :reviews, :force => true do |t|
      t.text :productReview
      t.string :product
      t.string :productCreator
      t.integer :album_id
      t.timestamps
    end

  end

  def self.down
    drop_table :reviews
  end
end


Rand db:migrate and checked my structure in the console and it's still
the previous version without album_id....

Any thoughts?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to