diff options
author | Matthew Draper <matthew@trebex.net> | 2014-04-02 23:06:16 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2014-04-03 01:30:27 +1030 |
commit | f846828dae77696daea3bafd91a25a62977be481 (patch) | |
tree | fb0deb3d4916990c214ee05d51311386c9ab4250 /railties/test/application/rake | |
parent | c82483a10abd30310f3360f6ebb6a4dddafdb2ba (diff) | |
download | rails-f846828dae77696daea3bafd91a25a62977be481.tar.gz rails-f846828dae77696daea3bafd91a25a62977be481.tar.bz2 rails-f846828dae77696daea3bafd91a25a62977be481.zip |
Revise 'sqlite3:' URL handling for smoother upgrades
Restore the 4.0 behaviour for 'sqlite3:///', but deprecate it. We'll
change to the absolute-path interpretation in 4.2.
The current "correct" spellings for in-memory, relative, and absolute
URLs, respectively, are:
sqlite3::memory:
sqlite3:relative/path
sqlite3:/full/path
Substantially reverses/defers fbb79b517f3127ba620fedd01849f9628b78d6ce.
Uncovered by @guilleiguaran while investigating #14495, though that
sounds like a different issue.
Diffstat (limited to 'railties/test/application/rake')
-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 b2c52a092f..15414db00f 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -17,11 +17,11 @@ module ApplicationTests end def database_url_db_name - File.join(app_path, "db/database_url_db.sqlite3") + "db/database_url_db.sqlite3" end def set_database_url - ENV['DATABASE_URL'] = File.join("sqlite3://:@localhost", database_url_db_name) + ENV['DATABASE_URL'] = "sqlite3:#{database_url_db_name}" # ensure it's using the DATABASE_URL FileUtils.rm_rf("#{app_path}/config/database.yml") end |