Skip to content

Instantly share code, notes, and snippets.

@gusgollings
Forked from technoweenie/gist:169616
Created August 18, 2009 16:49
Show Gist options
  • Save gusgollings/169825 to your computer and use it in GitHub Desktop.
Save gusgollings/169825 to your computer and use it in GitHub Desktop.
class AddAccountNotes < TableMigration
migrates :accounts, :multi_pass => false, :create_temp_table => false, :dry_run => false
schema_changes.push <<-SQL
ALTER TABLE :new_table_name
ADD COLUMN `notes` VARCHAR(255)
SQL
schema_changes.push <<-SQL
ALTER TABLE :new_table_name
ADD INDEX `idx_updated_at` (`updated_at`)
SQL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment