| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
A few of the tests weren't testing anything of value. The IP Address
tests are testing the type, not behavior of the connection adapter.
There are two CVE regression tests which are important, but don't have a
good place to go, so I've left them alone for now, as they call `quote`
and the focus right now is removing `column` from `type_cast`
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The column itself has no actual impact on the return value. These were
actually testing the behavior of the type object, which is sufficiently
covered elsewhere.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The behavior tested by the removed lines is sufficiently covered
elsewhere.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The string encoding test wasn't using the types for anything. The
boolean casting test included logic that should be in the tests for the
types, and the string test was legitimately not testing anything useful.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The validator has access to richer type information
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
SQL has mechanisms we can use to copy data from one table into another.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
As we move towards removing the types from the column objects, any
remaining places which have access to richer type information should be
using it.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The column is no longer used for anything besides type casting, which is
what we're trying to remove from the column entirely.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Update copyright notices to 2015 [ci skip]
|
| | | | | | | | | |
|
|/ / / / / / / / |
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Raise a better exception for renaming long indexes for mysql adapters
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This error only happens when the foreign key is missing.
Before this fix the following exception was being raised:
NoMethodError: undefined method `val' for #<Arel::Nodes::BindParam:0x007fc64d19c218>
Now the message is:
ActiveRecord::UnknownAttributeError: unknown attribute 'foreign_key' for Model.
|
|/ / / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
PostgreSQL, Fix change detection caused by superfluous bytea unescaping
|
| | |_|_|/ / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This showed up when running BinaryTest#test_load_save with the more
restrictive input string handling of pg-0.18.0.pre20141117110243.gem .
Bytea values sent to the server are in binary format, but are
returned back as escaped text. To fulfill the assumption that
type_cast_from_database(type_cast_for_database(binary)) == binary
we unescape only, if the value was really received from the server.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- Improved wording of CHANGELOG entry for https://github.com/arthurnn/rails/commit/5acd24bbeae0e9e5e81e87b5929e17f35527b2ea.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
When table has a composite primary key, the `primary_key` method for
sqlite3 and postgresql was only returning the first field of the key.
Ensures that it will return nil instead, as AR dont support composite pks.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Closes #7247.
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/models/owner.rb
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
ActiveRecord::Base `save` and `save!` take an option boolean
`:touch` parameter since #18225 (stems from #18202).
This commit document that parameter.
[ci skip]
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixes #18237
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This is no longer required now that we are injecting a type caster
object into the Arel table, with the exception of uniqueness
validations. Since it calls `ConnectionAdapter#type_cast`, the value has
already been cast for the database. We don't want Arel to attempt to
cast it further, so we need to continue wrapping it in a quoted node.
This can potentially go away when this validator is refactored to make
better use of `where` or the predicate builder.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This API will require much less consuming code to change to accomodate
the removal of automatic type casting from Arel. As long as the
predicates are constructed using the `arel_table` off of an AR subclass,
there will be no changes that need to happen.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
`eager_load` preserves readonly flag for associations
|
| |/ / / / / / / |
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It is already docummented at persistence.rb.
[ci skip]
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Require Ruby 2.2 for Rails 5.0
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Stems from [this comment](https://github.com/rails/rails/pull/18203#issuecomment-68138096) by @robin850
and by the blog post http://weblog.rubyonrails.org/2014/12/19/Rails-4-2-final
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
timestamps. [#18202]
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We only support classes which provide a no-args constructor to use as a
default value. We can provide a more helpful error message if we catch
this when `serialize` is called, rather than letting it error when you
try to assign the attribute.
Fixes #18224
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Example:
create_table :foos, id: :bigint do |t|
end
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
/cc @sgrif
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Most of the documentation very closely mirrors the matching
docs from `SchemaStatements`. I reduced duplicated copy and
added links to the underlying methods for the user to follow.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Because call the `column` method and set the `options[:primary_key]` is
handled at `super`, here need only treat the `options[:default]`.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Part of the larger refactoring to remove type casting from Arel. We can
inform it that we already have the right type by wrapping the value in
an `Arel::Nodes::Quoted`. This commit can be reverted when we have
removed type casting from Arel in Rail 5.1
|
| | | | | | | | |
|