fix: drop if table exists

main
Washington Botelho 2018-02-06 18:05:20 -02:00
parent b3a42bd571
commit 7958664068
No known key found for this signature in database
GPG Key ID: 5DE4F42A8F073617
1 changed files with 2 additions and 2 deletions

View File

@ -9,8 +9,8 @@ require 'rating'
client = Mysql2::Client.new(host: :localhost, username: :root) client = Mysql2::Client.new(host: :localhost, username: :root)
client.query 'DROP DATABASE rating_test;' client.query 'DROP DATABASE IF EXISTS rating_test;'
client.query 'CREATE DATABASE rating_test;' client.query 'CREATE DATABASE IF NOT EXISTS rating_test;'
ActiveRecord::Base.establish_connection adapter: :mysql2, database: :rating_test, username: :root ActiveRecord::Base.establish_connection adapter: :mysql2, database: :rating_test, username: :root