Skip to content

Instantly share code, notes, and snippets.

@benmanns
Created February 5, 2010 20:03
Show Gist options
  • Save benmanns/296161 to your computer and use it in GitHub Desktop.
Save benmanns/296161 to your computer and use it in GitHub Desktop.
class RemoveUsersUserid < ActiveRecord::Migration
def self.up
change_table :users do |t|
t.remove :userid
end
end
def self.down
change_table :users do |t|
t.integer :userid
end
end
end
class RenameConnectionsType < ActiveRecord::Migration
def self.up
change_table :connections do |t|
t.rename :type, :kind
end
end
def self.down
change_table :connections do |t|
t.rename :kind, :type
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment