Skip to content

Instantly share code, notes, and snippets.

@pbalduino
Last active December 16, 2015 18:20
Show Gist options
  • Save pbalduino/5477109 to your computer and use it in GitHub Desktop.
Save pbalduino/5477109 to your computer and use it in GitHub Desktop.
class AddFieldsToContato < ActiveRecord::Migration
def change
change_table :contatos do |t|
t.string :cidade , :limit => 60
t.string :cep , :limit => 8
t.string :telefone, :limit => 20
end
end
end
@pbalduino
Copy link
Author

Após executar, o resultado será parecido com esse:

rake db:migrate
== AddFieldsToContato: migrating =============================================
-- change_table(:contatos)
-> 0.0132s
== AddFieldsToContato: migrated (0.0134s) ====================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment