| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
object. Fixes a regression from 3.0.x
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
fetching connection.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With transactional fixtures enabled, the session records would end up in
@_current_transaction_records, and at the end of the transaction,
methods would be called on them that would trigger method_missing and
trigger attribute methods to be generated.
However, at this point the sessions table would not exist, and the
columns were not cached, so an exception would be raised because we
can't find the columns to generate attribute methods for.
Not sure exactly why this didn't crop up before but there have been
changes to the schema cache code and perhaps that means that column data
that was cached previously at that point is now uncached.
|
|
|
|
|
|
|
|
|
|
| |
It was a bad idea to rescue exceptions here. This can interfere with
transaction rollbacks which seems to be the cause of current CI
failure.
Instead, each adapter should implement its own DB-specific O(1)
implementation, and we fall back on the generic, slower, implementation
otherwise.
|
|\ |
|
| |
| |
| | |
because with select p.* you can no longer use count(). Using count will result in an SQL error message.
|
| |
| |
| | |
people.* will not work when the alias is named p
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Add ActiveSupport::Cache::NullStore for testing and development
|
| | |
| | |
| | |
| | | |
actually caching for development and test environments.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
This can be turned off by setting `config.reload_classes_only_on_change` to false.
Extensions like Active Record should add their respective files like db/schema.rb and db/structure.sql to `config.watchable_files` if they want their changes to affect classes reloading.
Thanks to https://github.com/paneq/active_reload and Pastorino for the inspiration. <3
|
| |
| |
| |
| | |
during setup
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Example:
ActiveRecord::Migrator.migrate(path) do |migration|
migration.name =~ /User/
end
The above example will migrate only migrations with User in
the name
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
With this commit, ActiveRecord will also look for migrations
in db/migrate subdirectories.
|
| |
| |
| |
| |
| |
| |
| | |
49ebe51 fixed copying migrations, but existing migrations would still
trigger warnings. The proper way to compare migrations is to ignore
origin lines - if migration is identical it means that we can
silently skip it, regardless where it comes from.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was a bug in ActiveRecord::Migration.copy method, which
prevented adding special comment about the origin of migration.
Because of that, the check if migration is identical or if it's
not and should be skipped was always saying that migration is
skipped, which was causing additional useless warnings about
skipped migrations.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removing this feature causes boost in performance when using Ruby 1.9.
Ruby 1.9 started to do implicit conversions using `to_ary` and `to_str`
in some STDLIB methods (like Array#join). To do such implicit conversions,
Ruby 1.9 always dispatches the method and rescues the NoMethodError exception
in case one is raised.
Therefore, since the whiners feature defined NilClass#method_missing, such
implicit conversions for nil became much, much slower. In fact, just defining
NilClass#method_missing (even without the whiners feature) already causes a
massive slow down. Here is a snippet that shows such slow down:
require "benchmark"
Benchmark.realtime { 1_000.times { [nil,nil,nil].join } }
class NilClass
def method_missing(*args)
raise NoMethodError
end
end
Benchmark.realtime { 1_000.times { [nil,nil,nil].join } }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
new one
|
| | |
|
| | |
|