Files
nairobi/db/migrate/20150926113052_drop_addresses_table.rb
Javi Martín 91a3184281 Simplify creating timestamps in migrations
We were using the `timestamps` method most of the time, but sometimes we
were creating the columns manually.

Note editing past migrations if fine as long as the SQL they generate
remains identical, which is the case here.
2019-10-24 21:20:16 +02:00

27 lines
633 B
Ruby

class DropAddressesTable < ActiveRecord::Migration[4.2]
def self.up
drop_table :addresses
end
def self.down
create_table "addresses", force: :cascade do |t|
t.integer "user_id"
t.string "street"
t.string "street_type"
t.string "number"
t.string "number_type"
t.string "letter"
t.string "portal"
t.string "stairway"
t.string "floor"
t.string "door"
t.string "km"
t.string "neighbourhood"
t.string "district"
t.string "postal_code"
t.string "toponymy"
t.timestamps null: false
end
end
end