| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Closes #16907.
[Matthew Draper & Yves Senn]
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
SQLite3Adapter now checks for views in table_exists? fixes: 14041
Conflicts:
activerecord/CHANGELOG.md
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sets the connection collation to the database collation configured
in database.yml. Otherwise, `SET NAMES utf8mb4` will use the default
collation for that charset (utf8mb4_general_ci) when you may have chosen
a different collation, like utf8mb4_unicode_ci.
This only applies to literal string comparisons, not column values, so
it is unlikely to affect you.
|
| |
| |
| |
| |
| | |
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
|
| | |
|
|\ \
| | |
| | | |
Change the default `null` value for timestamps
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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]
|
|\ \
| | |
| | | |
Revert "Rename to test_mysql_strict_mode_disabled_dont_override_global_sql_mode"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit babc24c1b07c1fd58b9b3249b0256f9b0d45c0f0.
Conflicts:
activerecord/test/cases/adapters/mysql/connection_test.rb
activerecord/test/cases/adapters/mysql2/connection_test.rb
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Treat invalid uuid as nil
Conflicts:
activerecord/CHANGELOG.md
|
| |/ / |
|
|/ / |
|
|\ \
| | |
| | | |
Dump PostgreSQL primary key with custom function as a default.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
|/| | |
Use a type object for type casting behavior on SQLite3
|
| | | |
|
|\ \ \
| | | |
| | | | |
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.
|
| | |
| | |
| | |
| | | |
adapter, fixed from #16057 [ci skip]
|
|\ \ \
| | | |
| | | | |
[ci skip] /sqlite/i --> SQLite
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The only case where we got a column that was not `nil`, but did not
respond to `cast_type` was when type casting the default value during
schema creation. We can look up the cast type, and add that object to
the column definition. Will allow us to consistently rely on the type
objects for type casting in all directions.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|