Class: CreateTableAddresses
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateTableAddresses
- Defined in:
- lib/generators/address_by_cep/templates/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
17 18 19 |
# File 'lib/generators/address_by_cep/templates/migration.rb', line 17 def self.down drop_table :addresses end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/address_by_cep/templates/migration.rb', line 2 def self.up create_table :addresses do |t| t.string :zip_code t.string :street t.string :number t.string :neighborhood t.string :city t.string :state t.string :complement t.references :addressable, :polymorphic => true t. end end |