Files
nairobi/db/migrate/20150926113052_drop_addresses_table.rb
Julian Herrero 65c30c8d2d Remove migrations warning
DEPRECATION WARNING: Directly inheriting from ActiveRecord::Migration
is deprecated. Please specify the Rails release the migration was
written for:

class MigrationClass < ActiveRecord::Migration[4.2]

(called from require at bin/rails:4)
2019-04-17 17:40:56 +02:00

28 lines
694 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.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
end
end