diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2017-01-19 17:33:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-19 17:33:43 +0000 |
commit | 0e18aece9199596c03d10236a2bc47516581ad6d (patch) | |
tree | 3bac56825921135e8f2d91432841bc2b7216d590 /railties | |
parent | c64ee8ed5339245ab7e8638f464b070fba910917 (diff) | |
parent | bdc8818330ec051cd226590e9539588e492e3c9d (diff) | |
download | rails-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
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/rake/dbs_test.rb | 4 |
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 |