| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Also checked to make sure this does not affect foreign key constraints.
(It doesn't).
Fixes #12856
Closes #14088
|
|
|
|
| |
Oh hey, we got to remove some code because of that!
|
|
|
|
|
|
| |
Arel handles this for us automatically. Updated tests, as BindParam is
no longer a subclass of SqlLiteral. We should remove the second argument
to substitute_at entirely, as it's no longer used
|
|
|
|
|
| |
`Computer` class needs to be require
See #17217 for more details
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This makes debugging the generated schema output much easier.
As a side effect it also shaves off 2.5 seconds of test runtime.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The behavior has changed since 4.1 and non-array values are no
longer type casted to a blank array. This way the user can define
custom validations on that property.
|
|
|
|
|
|
| |
it doesn't work on SQLite3 since it doesn't support truncate, but that's
OK. If you call truncate on the connection, you're now bound to that
database (same as if you use hstore or any other db specific feature).
|
|
|
|
|
|
| |
Closes #16907.
[Matthew Draper & Yves Senn]
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Asserting that the message contains "QUERY PLAN" is enough for the adapter's test.
The plan may vary according to number of tuples etc. but that's out of our concern.
|
|
|
|
|
|
|
|
|
| |
This is a reacon to https://github.com/rails/rails/commit/d6c1205584b1ba597db4071b168681678b1e9875#commitcomment-7502487
This backwards incompatibility was introduced with d6c12055 to fix #7516.
However both `connection.default_sequence_name` and `model.sequence_name` are public API.
The PostgreSQL adapter should honor the interface and return strings.
/cc @matthewd @chancancode
|
|
|
|
| |
Fixes #16623 introduced by https://github.com/rails/rails/commit/3d5a2019bcccc6fb01bee4811ca669f4383edb51
|
| |
|
|
|
|
|
|
|
| |
As per discussion, this changes the model generators to specify
`null: false` for timestamp columns. A warning is now emitted if
`timestamps` is called without a `null` option specified, so we can
safely change the behavior when no option is specified in Rails 5.
|
|
|
|
| |
[Philippe Creux, Chris Teague]
|
|
|
|
| |
[Andrey Novikov & Łukasz Sarnacki]
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
For example, if use pgcrypto extension in PostgreSQL 9.4 beta 1, where
uuid-ossp extension isn't available for moment of writing, and thus to
use a gen_random_uuid() method as a primary key default.
In this case schema dumper wasn't able to correctly reconstruct
create_table statement and lost primary key constraint on schema load.
Fixes #16111.
|
|\
| |
| | |
Don't rely on the sql type to quote XML columns in PG
|
| | |
|
|/
|
|
|
|
|
| |
This was only used for uniqueness validations. The first usage was in
conjunction with `limit`. Types which cast to string, but are not
considered text cannot have a limit. The second case was only with an
explicit `:case_sensitive => true` option given by the user.
|
| |
|
| |
|
|\
| |
| | |
Remove unneccessary special case for money in quoting
|
| | |
|
|\ \
| | |
| | | |
Do not rely on the column type when quoting infinity
|
| |/ |
|
|/ |
|
|
|
|
|
| |
The test case for CVE-2014-3483 doesn't actually send the generated SQL
to the database. The generated SQL is actually invalid for real inputs.
|
|
|
|
| |
Fix CVE-2014-3483 and protect against CVE-2014-3482.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have several test cases on "tricky" types that are essentially
testing that `update_all` goes through the same type casting behavior as
a normal assignment + save. We recently had another case to add this
test for another type in https://github.com/rails/rails/pull/12742.
Rather than testing this separately for every type which is "tricky"
when round tripping, let's instead have a fairly exhaustive test that
ensures we're getting the correct values at every step for `update_all`.
Given the structure of the code now, we can be confident that if the
type is correct, and `update_all` is type casting correctly, we're going
to get the right behavior for all types.
|
| |
|
|\
| |
| | |
Don't type cast the default on the column
|
| |
| |
| |
| |
| |
| |
| | |
If we want to have type decorators mess with the attribute, but not the
column, we need to stop type casting on the column. Where possible, we
changed the tests to test the value of `column_defaults`, which is
public API. `Column#default` is not.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
| |
Also takes a step towards supporting types which use a character other
than ',' for the delimiter (`box` is the only built in type for which
this is the case)
|
|
|
|
|
|
|
|
|
| |
HStore columns come back from the database separated by a comma and a
space, not just a comma. We need to mirror that behavior since we
compare the two values.
Also adds a regression test against JSON to ensure we don't have the
same bug there.
|
|\
| |
| | |
Detect in-place changes on mutable AR attributes
|