aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add newline between each migration in `structure.sql`Grey Baker2016-07-141-0/+7
| | | | | | | | | | | | Keeps schema migration inserts as a single commit, so we still get all of the benefits of https://github.com/rails/rails/commit/42dd2336b31a8d98776d039a2b9fd7f834156a78, but allows for easier git diff-ing. Fixes #25504.
* | adds support for limits in batch processingXavier Noria2016-07-131-0/+15
| |
* | Always prefer class types to query types when casting `group`Sean Griffin2016-07-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When `group` is used in combination with any calculation method, the resulting hash uses the grouping expression as the key. Currently we're incorrectly always favoring the type reported by the query, instead of the type known by the class. This causes differing behavior depending on whether the adaptor actually gives proper types with the query or not. After this change, the behavior will be the same on all adaptors -- we see if we know the type from the class, fall back to the type from the query, and finally fall back to the identity type. Fixes #25595
* | Cleanup CHANGELOGs [ci skip]Prathamesh Sonpatki2016-07-091-7/+7
| | | | | | | | | | | | - Cleanup Active Record CHANGELOG. - Add missing CHANGELOG for https://github.com/rails/rails/pull/25688. - Clarify that assets requests logging is suppressed.
* | fix to_param to maximize contentRob Biedenharn2016-07-081-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation states that parameter values longer than 20 characters will be truncated by words, but the example shows that a parameter based on "David Heinemeier Hansson" (with id: 125) becomes "125-david" when "David Heinemeier".length == 16 so why so short? The answer lies in the use of the #truncate option omission: nil which seems to have been intended to mean "nothing", but which actually causes the default string "..." to be used. This causes #truncate to cleave words until the "..." can be added and still remain within the requested size of 20 characters. The better option is omission: '' (which is probably what was originally intended). Furthermore, since the use of #parameterize will remove non-alphanumeric characters, we can maximize the useful content of the output by calling parameterize first and then giving truncate a separator: /-/ rather than a space.
* | Re-check that the connection is still stale before we reap itMatthew Draper2016-07-061-0/+7
| | | | | | | | | | | | | | A concurrent thread may have also detected it to be stale, and already released (or even reassigned) it by now. Fixes #25585
* | Do not specal case inspecting associated arrays of over 10 elements, ↵Kevin McPhillips2016-06-291-0/+6
| | | | | | | | preventing infinite looping in some cases.
* | Remove unused `ActiveRecord::Base.connection_id`Sean Griffin2016-06-291-0/+5
| | | | | | | | | | | | | | | | This method appears to have been partially used in connection pool caching, but it was introduced without much reasoning or any tests. One edge case test was added later on, but it was focused on implementation details. This method is no longer used outside of tests, and as such is removed.
* | Merge pull request #24773 from ralinc/fix-silent-fail-on-psql-commandArthur Nogueira Neves2016-06-161-0/+14
|\ \ | | | | | | PostgreSQL: Fix db:structure:load silent failure on SQL error
| * | PostgreSQL: Fix db:structure:load silent failure on SQL errorRalin Chimev2016-05-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | The command line flag "-v ON_ERROR_STOP=1" should be used when invoking psql to make sure errors are not suppressed. Example: psql -v ON_ERROR_STOP=1 -q -f awesome-file.sql my-app-db Fixes #23818.
* | | Ensure hashes can be passed to attributes using `composed_of`Sean Griffin2016-05-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This behavior was broken by 36e9be85. When the value is assigned directly, either through mass assignment or directly assigning a hash, the hash gets passed through to this writer method directly. While this is intended to handle certain cases, when an explicit converter has been provided, we should continue to use that instead. The positioning of the added guard caused the new behavior to override that case. Fixes #25210
* | | Merge pull request #25093 from Erol/activerecord-transaction-serialization-errorRafael França2016-05-211-0/+5
|\ \ \ | | | | | | | | Introduce AR::TransactionSerializationError for transaction serialization failures or deadlocks
| * | | Add AR::TransactionSerializationError for transaction serialization failures ↵Erol Fornoles2016-05-211-0/+5
| | | | | | | | | | | | | | | | or deadlocks
* | | | Whitespaces [ci skip]Rafael Mendonça França2016-05-211-0/+1
| | | |
* | | | Add CHANGELOG.md reference for #24958 (#25094)Jon Moss2016-05-211-0/+4
|/ / / | | | | | | | | | | | | | | | | | | Sorry for forgetting to include it in my original PR :grimacing: r? @rafaelfranca [ci skip]
* | | Merge pull request #23810 from xijo/fix_json_coder_when_mysql_strict_is_disabledSean Griffin2016-05-161-0/+4
|\ \ \ | |/ / |/| | | | | Fix bug in JSON deserialization when column default is an empty string
| * | Fix bug in JSON deserialization when column default is an empty stringJohannes Opper2016-02-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `ActiveRecord::Coders::JSON` serialization is used and the default of the column returns `''` it raises the following error: ``` JSON::ParserError: A JSON text must at least contain two octets! ``` If MySQL is running in non-strict mode, it returns an empty string as column default for a text column: ```ruby def extract_default if blob_or_text_column? @default = null || strict ? nil : '' end end ``` Since `''` is invalid JSON, there shouldn't be an attempt to parse it, it should be treated like nil. ActiveRecord::Coders::JSON should behave consistently for all possible non-user-set column default values.
* | | Start Rails 5.1 development :tada:Rafael Mendonça França2016-05-101-2114/+1
| | |
* | | Preparing for 5.0.0.rc1 releaseRafael Mendonça França2016-05-061-0/+5
| | |
* | | remove `empty?` from CHANGELOG [ci skip]yuuji.yaginuma2016-05-031-2/+1
| | | | | | | | | | | | Follow up to 98264a1343fad6bb6637893a37fd571916b4158c
* | | Prep Rails 5 beta 4eileencodes2016-04-271-0/+2
| | |
* | | Add Expression Indexes and Operator Classes support for PostgreSQLRyuta Kamizono2016-04-241-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: create_table :users do |t| t.string :name t.index 'lower(name) varchar_pattern_ops' end Fixes #19090. Fixes #21765. Fixes #21819. Fixes #24359. Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
* | | Merge pull request #23461 from kamipo/prepared_statements_for_mysql2_adapterJeremy Daer2016-04-231-0/+7
|\ \ \ | | | | | | | | | | | | Add prepared statements support for `Mysql2Adapter`
| * | | Add prepared statements support for `Mysql2Adapter`Ryuta Kamizono2016-04-211-0/+4
|/ / /
* | | Merge pull request #23557 from ↵Jeremy Daer2016-04-201-0/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | kamipo/dump_indexes_in_create_for_generates_sql_in_one_query Dump indexes in `create_table` for generates SQL in one query
| * | | Dump indexes in `create_table` for generates SQL in one queryRyuta Kamizono2016-04-201-0/+7
|/ / / | | | | | | | | | | | | If the adapter supports indexes in create table, it generates SQL in one query.
* | | Merge pull request #23523 from kamipo/avoid_truncation_in_uniqueness_validationJeremy Daer2016-04-181-0/+17
|\ \ \ | | | | | | | | | | | | Avoid a string value truncation in uniqueness validation
* \ \ \ Merge pull request #23522 from kamipo/add_value_too_long_exception_classJeremy Daer2016-04-181-0/+5
|\ \ \ \ | | | | | | | | | | | | | | | Add `ActiveRecord::ValueTooLong` exception class
* | | | | Merge pull request #24614 from ↵Jeremy Daer2016-04-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/foreign_key_respects_table_name_prefix_and_suffix `foreign_key` respects `table_name_prefix` and `table_name_suffix`
* | | | | Merge pull request #23622 from kamipo/primary_key_should_be_not_nullJeremy Daer2016-04-181-0/+17
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Primary key should be `NOT NULL`
* | | | | | Move CHANGELOG entry about database notices at the top [ci skip]Prathamesh Sonpatki2016-04-181-23/+20
| | | | | |
* | | | | | Merge pull request #24551 from bogdanvlviv/notice_for_tasksJeremy Daer2016-04-171-0/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | Added notice when a database is successfully created or dropped.
| * | | | | | Added notice when a database is successfully created or dropped.bogdanvlviv2016-04-171-0/+22
| | | | | | |
* | | | | | | Merge pull request #22911 from Envek/database_commentsJeremy Daer2016-04-161-0/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add support for specifying comments for tables, columns, and indexes in database itself
| * | | | | | | Add support for specifying comments for tables, columns, and indexes.Andrey Novikov2016-04-161-0/+17
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comments are specified in migrations, stored in database itself (in its schema), and dumped into db/schema.rb file. This allows to generate good documentation and explain columns and tables' purpose to everyone from new developers to database administrators. For PostgreSQL and MySQL only. SQLite does not support comments at the moment. See docs for PostgreSQL: http://www.postgresql.org/docs/current/static/sql-comment.html See docs for MySQL: http://dev.mysql.com/doc/refman/5.7/en/create-table.html
* / / / / / / Add changelog for #24542Vipul A M2016-04-151-0/+6
|/ / / / / / | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | Properly serialize all JSON primitives in the AR JSON typeSean Griffin2016-04-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were assuming that the only valid types for encoding were arrays and hashes. However, any JSON primitive is an accepted value by both PG and MySQL. This does involve a minor breaking change in the handling of `default` in the schema dumper. This is easily worked around, as passing a hash/array literal would have worked fine in previous versions of Rails. However, because of this, I will not be backporting this to 4.2 or earlier. Fixes #24234
* | | | | | Support microsecond datetime precision on MariaDB 5.3+.Jeremy Daer2016-04-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We support microsecond datetime precision for MySQL 5.6.4+. MariaDB has supported it since 5.3.0, but even 10.x versions return a compatible version string like `5.5.5-10.1.8-MariaDB-log` which we parse as 5.5.5, before MySQL supported microsecond precision. Specialize our version check to account for MariaDB to fix.
* | | | | | remove needless entry [ci skip]yuuji.yaginuma2016-04-081-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | The option backed to `start` in da26934313a31ae530b7537aba8a7662152f4dfe.
* | | | | | Pass over CHANGELOGs [ci skip]Prathamesh Sonpatki2016-03-301-2/+2
| | | | | |
* | | | | | Merge pull request #24349 from chrisarcand/add-changelog-for-24305Rafael França2016-03-291-0/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add changelog for #24305
| * | | | | | Add changelog for #24305 [skip ci]Chris Arcand2016-03-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forgot to add, sigh. Closes #24273
* | | | | | | Delegate some additional methods in querying.rbKenta2016-03-301-0/+13
|/ / / / / /
* | | | | | add `:index_errors` option to example [ci skip]yuuji.yaginuma2016-03-271-2/+2
| | | | | |
* | | | | | Memoize user provided defaults before type castingSean Griffin2016-03-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a proc is given as a default value, the form builder ends up displaying `Proc#to_s` when the default is used. That's because we didn't handle the proc until type casting. This issue technically can occur any time that a proc is the value before type casting, but in reality the only place that will occur is when a proc default is provided through the attributes API, so the best place to handle this edge case is there. I've opted to memoize instead of just moving the `Proc#call` up, as this made me realize that it could potentially interact very poorly with dirty checking. The code here is a little redundant, but I don't want to rely on how `value_before_type_cast` is implemented in the super class, even if it's just an `attr_reader`. Fixes #24249 Close #24306
* | | | | | Merge pull request #24167 from ↵Jeremy Daer2016-03-231-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/append_sql_mode_instead_of_overwriting_in_strict_mode Append sql_mode instead of overwriting in strict mode
* | | | | | guides, sync 5.0 release notes with changelogsYves Senn2016-03-221-1/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Sync AV, AR, AJ, AS, AM changelogs with our 5.0 release notes draft. This is a follow up to c94045d and contains changes made since the release of beta1.
* | | | | Execute default_scope defined by abstract class within the scope of subclassMehmet Emin İNAÇ2016-03-081-0/+6
| | | | |
* | | | | Add changelog for batch touch records.Arthur Neves2016-03-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related to #19324 and #18606 [skip ci]
* | | | | move changelog to right place [skip ci]Arthur Neves2016-03-071-6/+6
| | | | |