| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use utf8mb4 character set by default
`utf8mb4` character set supports supplementary characters including emoji.
`utf8` character set with 3-Byte encoding is not enough to support them.
There was a downside of 4-Byte length character set with MySQL 5.5 and 5.6:
"ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes"
for Rails string data type which is mapped to varchar(255) type.
MySQL 5.7 supports 3072 byte key prefix length by default.
* Remove `DEFAULT COLLATE` from Active Record unit test databases
There should be no "one size fits all" collation in MySQL 5.7.
Let MySQL server choose the default collation for Active Record
unit test databases.
Users can choose their best collation for their databases
by setting `options[:collation]` based on their requirements.
* InnoDB FULLTEXT indexes support since MySQL 5.6
it does not have to use MyISAM storage engine whose maximum key length is 1000 bytes.
Using MyISAM storag engine with utf8mb4 character set would cause
"Specified key was too long; max key length is 1000 bytes"
https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html
* References
"10.9.1 The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)"
https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-utf8mb4.html
"10.9.2 The utf8mb3 Character Set (3-Byte UTF-8 Unicode Encoding)"
https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-utf8.html
"14.8.1.7 Limits on InnoDB Tables"
https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html
> If innodb_large_prefix is enabled (the default), the index key prefix limit is 3072 bytes
> for InnoDB tables that use DYNAMIC or COMPRESSED row format.
* CI against MySQL 5.7
Followed this instruction and changed root password to empty string.
https://docs.travis-ci.com/user/database-setup/#MySQL-57
* The recommended minimum version of MySQL is 5.7.9
to support utf8mb4 character set and `innodb_default_row_format`
MySQL 5.7.9 introduces `innodb_default_row_format` to support 3072 byte length index by default.
Users do not have to change MySQL database configuration to support Rails string type.
https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_default_row_format
https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html
> If innodb_large_prefix is enabled (the default),
> the index key prefix limit is 3072 bytes for InnoDB tables that use DYNAMIC or COMPRESSED row format.
* The recommended minimum version of MariaDB is 10.2.2
MariaDB 10.2.2 is the first version of MariaDB supporting `innodb_default_row_format`
Also MariaDB says "MySQL 5.7 is compatible with MariaDB 10.2".
- innodb_default_row_format
https://mariadb.com/kb/en/library/xtradbinnodb-server-system-variables/#innodb_default_row_format
- "MariaDB versus MySQL - Compatibility"
https://mariadb.com/kb/en/library/mariadb-vs-mysql-compatibility/
> MySQL 5.7 is compatible with MariaDB 10.2
- "Supported Character Sets and Collations"
https://mariadb.com/kb/en/library/supported-character-sets-and-collations/
|
| |
|
|
|
|
|
|
| |
Pushing scope attributes was added at d4007d5 for fixing inheritance
object creation. But it was not a better fix, since we could just pull
that on demand in `Inheritance` module.
|
| |
|
|
|
|
|
| |
I'd like to use this `scoping` handling on klass level to address
unwanted internal scoping issues.
|
|
|
|
|
| |
`scoping` stashes the reciever and then returning that as `klass.all`.
`all.scoping` has no effect to the public behavior, so it is redundant.
|
|
|
|
|
| |
The `existing` arg was added at 8bc0fce, but it is no longer used since
aac9da2.
|
|\
| |
| |
| |
| | |
darwin67/33610-duplicated-nested-records-with-create_with
Make sure there are no duplicated nested records with create_with
|
|/
|
|
|
|
|
|
|
|
|
|
| |
In order to avoid double assignments of nested_attributes for `has_many`
relations during record initialization, nested_attributes in `create_with`
should not be passed into `klass.new` and have them populate during
`initialize_internals_callback` with scope attributes.
However, `create_with` keys should always have precedence over where
clauses, so if there are same keys in both `create_with` and
`where_values_hash`, the value in `create_with` should be the one that's
used.
|
|
|
|
| |
Follow up of 3e81490717a314437f9123d86fa3e9dc55558e95.
|
|
|
|
|
| |
Followup to a recently merged PR, too minor and detailed to require a
modification to the contributed patch.
|
|\
| |
| | |
ActiveJob Backburner adapter: fix priority
|
| |
| |
| |
| |
| |
| |
| | |
The priority wasn't being passed from ActiveJob to Backburner, despite
priority being supported. This also brings it inline with the docs,
which mark Backburner as supporting priorities in the "Backend Features"
table: https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters.html
|
|\ \
| | |
| | | |
Add #unfreeze_time to ActiveSupport::Testing::TimeHelpers
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
docs: Fix typo in activerecord/CHANGELOG.md
[ci skip]
|
|/ / |
|
|\ \
| | |
| | | |
retry_on argument `attempts` clarification
|
| | | |
|
|\ \ \
| | | |
| | | | |
Follow up #33637 and #33770
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
CHANGELOG
Since #33770 `#configs_for` changed method signature and it isn't
supposed to work with a passed block.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
See `ConnectionUrlResolver#database_from_path` in
`activerecord/lib/active_record/connection_adapters/connection_specification.rb`
|
| |/ /
|/| |
| | |
| | | |
Without `perform_enqueued_jobs`, job are not executed and assertion is not done.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The writer was added during Arel refactoring to pass Active Record
tests at 7a29220.
That is no longer used since 846832a.
|
| | | |
|
|/ /
| |
| |
| | |
Rather than a configuration on the connection.
|
|/ |
|
|\
| |
| | |
Don’t allocate array on no args
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When no dependencies are present to be digested there is no reason to build an array just to turn around and turn it back into a string.
The dependencies array is not mutated in this method so we can use the same empty array across all invocations.
Total allocated: 791402 bytes (7294 objects)
Total allocated: 777442 bytes (7132 objects)
(791402 - 777442) / 791402.0 # => 1.76 % speed improvement
|
|/
|
|
| |
Closes #32885.
|
|\
| |
| | |
Fix non_numeric_string?
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For example, dirty checking was not right for the following case:
```
model.int_column = "+5"
model.float_column = "0.5E+1"
model.decimal_column = "0.5e-3"
```
It is enough to see whether leading character is a digit for avoiding
invalid numeric expression like 'wibble' to be type-casted to 0, as
this method's comment says.
Fixes #33801
|
|\ \
| | |
| | |
| | |
| | | |
Larochelle/i18n_full_message_with_nested_attributes
`ActiveModel.full_message` interaction with `index_errors`
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add `inspection_masks` to make values of sensitive database columns w…
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
sensitive value of database column when call `#inspect`
* Why
Some sensitive data will be exposed in log accidentally by calling `#inspect`, e.g.
```ruby
@account = Account.find params[:id]
payload = { account: @account }
logger.info "payload will be #{ payload }"
```
All the information of `@account` will be exposed in log.
* Solution
Add a class attribute filter_attributes to specify which values of columns shouldn't be exposed.
This attribute equals to `Rails.application.config.filter_parameters` by default.
```ruby
Rails.application.config.filter_parameters += [:credit_card_number]
Account.last.insepct # => #<Account id: 123, credit_card_number: [FILTERED] ...>
```
|
| | |
| | |
| | |
| | | |
Fixing code block rendering, indentation, backticks, etc.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`spec` is the same variable name as gemspec generated by bundler, and its
intention is easier to understand than a one-letter variable.
https://github.com/bundler/bundler/blob/00fd58eaa69015092ee272c4cb5aa92a5e7ee45c/lib/bundler/templates/newgem/newgem.gemspec.tt#L11
This is follow up on 1c59b4840c58097186022f68427c46e0046c5d0d. `spec` is already in use there.
|
|\ \ \
| | | |
| | | | |
Maintain html_safe? on sliced HTML safe strings
|
| | | |
| | | |
| | | |
| | | | |
Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
|
| | | |
| | | |
| | | |
| | | | |
Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
original buffer was safe.
Co-Authored-By: no-itsbackpack <no-itsbackpack@github.com>
|
|\ \ \ \
| | | | |
| | | | | |
Document ActionView::OutputBuffer
|
| | | | | |
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
[ci skip] Improve remove_column documentation
|