database_exists.rb 427 B

12345678910111213
  1. def database_exists?
  2. begin
  3. retries ||= 0
  4. ActiveRecord::Base.connection
  5. rescue => e
  6. STDERR.puts "#{e}"
  7. exit 1
  8. else
  9. exit 0
  10. end
  11. end
  12. database_exists?