| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
mistakenly getting utf8 collation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport for #7521
- added tests to confirm establish_connection uses DATABASE_URL and
Rails.env correctly even when no arguments are passed in.
- updated rake db tasks to support DATABASE_URL, and added tests to
confirm correct behavior for these rake tasks. (Removed
establish_connection call from some tasks since in those cases
the :environment task already made sure the function would be called)
- updated Resolver so that when it resolves the database url, it
removes hash values with empty strings from the config spec (e.g.
to support connection to postgresql when no username is specified).
- updated ResolverTest to use current_adapter? to check the type of
the current adapter.
|
|
|
|
|
|
|
| |
`ENV['RAILS_ENV']` is not defined unless explicitly specified on the
command line when running `rake db:structure:load`. This patch lets
the rake task retrieve the environment from `Rails.env` which defaults
to "development".
|
|
|
|
|
| |
Conflicts:
activerecord/lib/active_record/railties/databases.rake
|
|
|
|
| |
configuration use not charset but encoding.
|
|
|
|
|
|
|
|
| |
Make sure :environment task is executed before db:schema:load or
db:structure:load
Conflicts:
activerecord/CHANGELOG.md
|
|
|
|
| |
`Rails.env` already use development if ENV["RAILS_ENV"] is not present.
|
|
|
|
|
|
|
|
|
|
| |
`:rails_env` tasks is not needed in all the tasks that depends of
`load_config`, only in the tasks that uses `Rails.env`.
Since `:rails_env` task set the `Rails.env` to be "development" if it is
not set we don't need the `||` statements too
Fix #7175.
|
|
|
|
|
|
| |
Fixing load config in some tasks
Conflicts:
activerecord/lib/active_record/railties/databases.rake
|
|
|
|
| |
fixes #5913
|
| |
|
|
|
|
| |
Fix usage of psql in db:test:prepare
|
|
|
|
| |
Always reenable _dump task in AR databases rake. Closes #5030
|
| |
|
|
|
|
|
| |
Otherwise, the schema and seed will be loaded onto the
test database.
|
|
|
|
|
| |
This is mostly the same as 876bade5999c51f5031861f703933d50e48512ff
that was reverted due to test failures, but now with a correction.
|
|
|
|
|
| |
This reverts commit a0edfb4d204857f0885784bd12582ae526af43c3, reversing
changes made to 4012fcff22e4fe7833aae53b98e3ca9acfe3d3ad.
|
| |
|
| |
|
| |
|
|
|
|
| |
simple testcase.
|
|
|
|
| |
db:schema dump and clean up a bit.
|
|
|
|
|
|
|
|
|
|
|
| |
Scope in migrations can be defined by adding suffix in filename,
like: 01_a_migration.blog.rb. Such migration have blog scope.
Scope is automatically added while copying migrations from engine,
so if you want to revert all of the migrations from given engine,
you can just run db:migrate with SCOPE, like:
rake db:migrate SCOPE=blog
|
|
|
|
| |
Fix regression introduced by 38d26b0cb56d82093889efa95992a35ba3bb9f29
|
| |
|
|
|
| |
same as 4c1a1933cbc5ab96efe340a3b31ac5fee12c99c8
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This commit adds a db:structure:load task that is run instead of
db:schema:load when schema_format is set to :sql. This patch also removes
the prefixing of the structure.sql files to mimic the use of a single
schema.rb file. The patch originates from github issue #715.
|
| |
|
| |
|
|\
| |
| |
| |
| | |
dmitriy-kiriyenko/drop_test_database_in_development_when_running_rake_db_drop
When running "rake db:drop" also drop test database in development environment
|
| | |
|
|\ \
| | |
| | | |
Use quotes for command substitution
|
| | | |
|
|\ \ \
| | | |
| | | | |
db:test:clone_structure if path to .sql file contains spaces or dashes
|
| | |/
| |/|
| | | |
Leaving the path unquoted causes errors in paths containing spaces or dashes.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
running :load_config alone will lead to the dumper being run without including extensions such as those included in foreigner and spatial_adapter.
This reverses a change made here: https://github.com/rails/rails/commit/5df72a238e9fcb18daf6ab6e6dc9051c9106d7bb#L0L324
I'm assuming here that :load_config needs to be invoked separately from :environment, as it is elsewhere in the file for db operations, if not the alternative is to go back to "task :dump => :environment do".
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
| |
| |
| | |
db:migrate:status not looking at all migration paths
|
| |
| |
| |
| |
| | |
Commit ecd37084b28a05f05251 did not take into account the use of
creation_options inside the access denied exception handler.
|
| | |
|
| |
| |
| |
| | |
having a bug with "Calling return within begin still executes else".
|
| |
| |
| |
| |
| |
| |
| | |
See new method mysql_creation_options. It is used by both
create_database and recreate_database so they are consistent.
(Cherry pick of 3ba3125b24b532876c95c8d9d00c9b69faab5a60)
|
| |
| |
| |
| |
| |
| | |
* Uses open source smoscript since scptxfr came out in 2000.
* Uses sqlcmd which replaces osql.
* Takes advantage of host/user/pass passed down by TinyTDS.
|
| | |
|
| | |
|
| | |
|