Bugs: Browse | Submit New | Admin

[#3858] When Using migration rename_colum command - version table not updated

Date:
2006-03-18 00:54
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
Interface (example)
State:
Open
Summary:
When Using migration rename_colum command - version table not updated

Detailed description
I created a versionable table and the initial migration worked correctly.  I then tried to rename a column on the versionable
table.     It did not seem to work work. I thought it was going to work automactially.  There may be a command to do
it but I did not see it in the documentation.

**********migration 1*********
class Bugs < ActiveRecord::Migration

  
  def self.up
    create_table :apps do |t|
      t.column "owner_id", :integer
      t.column "name", :string, :limit => 30
      t.column "short_name", :string, :limit =>15
      t.column "description", :text
     end 
     
     create_table :bugs do |table|
       table.column "app_id", :integer
       table.column "company_id", :integer
       table.column "module", :string
       table.column "summary", :string, :limit => 50
       table.column "detail", :text
       table.column "report_by",  :string
       table.column "priority", :string
       table.column "severity", :string, :limit =>5
       table.column "status", :string
       table.column "reported_at", :datetime
       table.column "updated_at", :datetime
       table.column "closed_at", :datetime     
     end
    Bug.create_versioned_table 
    
     
  end
 

  def self.down 
     drop_table :bugs
     Bug.drop_versioned_table
  end
end


***********************migration 2************

class A < ActiveRecord::Migration
  def self.up
      rename_column("bugs", "module", "subsystem") 
  end

  def self.down
  end
end




Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item