aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2017-01-19 17:33:43 +0000
committerGitHub <noreply@github.com>2017-01-19 17:33:43 +0000
commit0e18aece9199596c03d10236a2bc47516581ad6d (patch)
tree3bac56825921135e8f2d91432841bc2b7216d590
parentc64ee8ed5339245ab7e8638f464b070fba910917 (diff)
parentbdc8818330ec051cd226590e9539588e492e3c9d (diff)
downloadrails-0e18aece9199596c03d10236a2bc47516581ad6d.tar.gz
rails-0e18aece9199596c03d10236a2bc47516581ad6d.tar.bz2
rails-0e18aece9199596c03d10236a2bc47516581ad6d.zip
Merge pull request #27734 from y-yagi/update_create_table_statements_in_sqlite3
update CREATE TABLE statements generated by `sqlite3` command
-rw-r--r--railties/test/application/rake/dbs_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb
index 51db634b75..8bbae64d5e 100644
--- a/railties/test/application/rake/dbs_test.rb
+++ b/railties/test/application/rake/dbs_test.rb
@@ -175,7 +175,7 @@ module ApplicationTests
`bin/rails generate model book title:string;
bin/rails db:migrate db:structure:dump`
structure_dump = File.read("db/structure.sql")
- assert_match(/CREATE TABLE \"books\"/, structure_dump)
+ assert_match(/CREATE TABLE (?:IF NOT EXISTS )?\"books\"/, structure_dump)
`bin/rails environment db:drop db:structure:load`
assert_match expected_database, ActiveRecord::Base.connection_config[:database]
require "#{app_path}/app/models/book"
@@ -203,7 +203,7 @@ module ApplicationTests
stderr_output = capture(:stderr) { `bin/rails db:structure:dump` }
assert_empty stderr_output
structure_dump = File.read("db/structure.sql")
- assert_match(/CREATE TABLE \"posts\"/, structure_dump)
+ assert_match(/CREATE TABLE (?:IF NOT EXISTS )?\"posts\"/, structure_dump)
end
end