Farmbot-Web-App/db/migrate/20180410192539_create_in_use_resources.rb

18 lines
483 B
Ruby
Raw Normal View History

2018-04-10 13:43:27 -06:00
class CreateInUseResources < ActiveRecord::Migration[5.1]
# I goofed up on this migration and deployed to staging before I could fix.
# See later migration that creates a new view using the `scenic` gem. - RC
safety_assured
2018-04-10 13:43:27 -06:00
def up
execute "DROP VIEW IF EXISTS in_use_tools;"
execute "DROP VIEW IF EXISTS in_use_points;"
create_view :in_use_tools
create_view :in_use_points
end
def down
drop_view :in_use_tools
drop_view :in_use_points
end
end