lib/tasks/setup.rake
#
# DO NOT CHANGE ANYTHING IN THIS METHOD
# This is last layer of defense against deleting data in production
# If you need to delete data in staging or in production
# please execute the command manually and do not change this method
#
DO NOT CHANGE ANYTHING IN THIS METHOD
This is last layer of defense against deleting data in production
If you need to delete data in staging or in production
please execute the command manually and do not change this method
DO NOT CHANGE ANYTHING IN THIS METHOD This is last layer of defense against deleting data in production If you need to delete data in staging or in production please execute the command manually and do not change this method
def delete_all_records_from_all_tables
  if Rails.env.production?
    raise "deleting all records in production is not alllowed"
  else
    Rake::Task["db:schema:load"].invoke
  end
end
def delete_all_records_from_all_tables if Rails . env . production? raise "deleting all records in production is not alllowed" else Rake :: Task [ "db:schema:load" ] . invoke end end
DO NOT CHANGE ANYTHING IN THIS METHOD
This is last layer of defense against deleting data in production
If you need to delete data in staging or in production
please execute the command manually and do not change this method
DO NOT CHANGE ANYTHING IN THIS METHOD This is last layer of defense against deleting data in production If you need to delete data in staging or in production please execute the command manually and do not change this method