aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Remove CHANGELOG entry [ci skip]Rafael Mendonça França2014-09-051-8/+0
|
* cover all cases of `For not` --> `Do not`, related to #16804Akshay Vishnoi2014-09-051-1/+1
|
* schema loading rake tasks maintain database connection for current env.Yves Senn2014-09-031-0/+7
| | | | | | | | | | [Joshua Cody & Yves Senn] Closes #16757. Prior to this patch schema loading rake tasks had the potential to leak a connection to a different database. This had side-effects when rake tasks operating on the current connection (like `db:seed`) were chained.
* MySQL: set connection collation along with the charsetJeremy Kemper2014-08-301-0/+12
| | | | | | | | | | 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.
* minor changelog formatting changes.Yves Senn2014-08-271-2/+3
|
* pg, `default_sequence_name` needs to return a string.Yves Senn2014-08-251-0/+4
| | | | | | | | | 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
* CHANGELOG & improvements to #16649Godfrey Chan2014-08-231-0/+7
| | | | | * Require either FIRST or LAST qualifier for "NULLS ..." * Require whitespace before "NULLS ..."
* Only merge scopes with zero arity in has_many throughAgis-2014-08-201-0/+7
| | | | | | | | | | | | | | | with dynamic conditions. Fixes #16128 This bug was introduced in https://github.com/rails/rails/commit/c35e438620f2d56562251571377995359546393d so it's present from 4.1.2-rc1 and after. https://github.com/rails/rails/commit/c35e438620f2d56562251571377995359546393d merges any relation scopes passed as proc objects to the relation, but does *not* take into account the arity of the lambda. To reproduce: https://gist.github.com/Agis-/5f1f0d664d2cd08dfb9b
* [ci skip] config.active_record.errors_in_transactional_callbacks -> ↵yuuji.yaginuma2014-08-191-1/+1
| | | | config.active_record.raise_in_transactional_callbacks
* Fixes the `Relation#exists?` to work with polymorphic associations.Kassio Borges2014-08-181-0/+6
| | | | Fixes #15821.
* Add option to stop swallowing errors on callbacks.Arthur Neves2014-08-181-0/+14
| | | | | | | | | | | | | | | Currently, Active Record will rescue any errors raised within after_rollback/after_create callbacks and print them to the logs. Next versions of rails will not rescue those errors anymore, and just bubble them up, as the other callbacks. This adds a opt-in flag to enable that behaviour, of not rescuing the errors. Example: # For not swallow errors in after_commit/after_rollback config.active_record.errors_in_transactional_callbacks = true [fixes #13460]
* Merge pull request #16458 from chancancode/ar_fix_reserved_inheritanceGodfrey Chan2014-08-171-0/+8
|\ | | | | | | | | | | | | Fixed issue w/custom accessors + reserved name + inheritance Conflicts: activerecord/CHANGELOG.md
| * Fixed issue w/custom accessors + reserved name + inheritanceGodfrey Chan2014-08-111-0/+8
| | | | | | | | | | | | | | | | | | | | Fixed an issue where custom accessor methods (such as those generated by `enum`) with the same name as a global method are incorrectly overridden when subclassing. This was partially fixed in 4155431 then broken again by e5f15a8. Fixes #16288.
* | Don't expose these new APIs yet (added in 877ea78 / #16189)Godfrey Chan2014-08-161-0/+5
| | | | | | | | | | | | | | WARNING: don't use them! They might change or go away between future beta/RC/ patch releases! Also added a CHANGELOG entry for this.
* | Fix regression on after_commit in nested transactions.Arthur Neves2014-08-151-0/+6
| | | | | | | | | | | | | | | | | | after_commit should not run in nested transactions, however they should run once the outermost transaction gets committed. This patch fixes the problem copying the records from the Savepoint to its parent. So the RealTransaction will have all records that needs to run callbacks on it. [fixes #16425]
* | Merge pull request #8813 from ↵Yves Senn2014-08-141-0/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | greyblake/dont_write_timestamps_if_they_are_not_attributes Write timestamps only if there are timestamps columns Conflicts: activerecord/CHANGELOG.md
| * | Do not try to write timestamps if they are missing #8813Potapov Sergey2014-02-161-0/+6
| | |
* | | `index_exists?` with `:name` checks specified columns.Yves Senn2014-08-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Yves Senn & Matthew Draper] The column check was embodied in the defaul index name. If the :name option was used, the specified columns were not verified at all. Given: ``` assert connection.index_exists?(table_name, :foo_id, :name => :index_testings_on_yo_momma) ``` That index could have been defined on any field, not necessarily on `:foo_id`.
* | | update error message to reflect that the record could have been destroyedlsylvester2014-08-111-0/+6
| |/ |/|
* | Define id_was to get the previous value of the primary keyRafael Mendonça França2014-08-061-0/+11
| | | | | | | | | | | | | | | | | | Currently when we call id_was and we have a custom primary key name Active Record will return the current value of the primary key. This make impossible to correctly do an update operation if you change the id. Fixes #16413
* | schema rake tasks are specific about the configuration to act on.Yves Senn2014-08-061-8/+14
| | | | | | | | | | | | | | | | | | | | The rake tasks and the `DatabaseTakss` adapter classes used to assume a configuration at some places. This forced the rake tasks to establish a specific connection before calling into `load_schema`. After #15394 this started to cause issues because it could `purge` the wrong database before loading the schema.
* | Revert "Revert "Merge pull request #15394 from ↵Yves Senn2014-08-061-1/+8
| | | | | | | | | | | | morgoth/fix-automatic-maintaining-test-schema-for-sql-format"" This reverts commit 5c87b5c5248154cf8aa76cce9a24a88769de022d.
* | Merge pull request #16333 from ↵Yves Senn2014-08-041-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | joker1007/fix_decimal_cast_from_float_with_large_precision Fix type casting to Decimal from Float with large precision Conflicts: activerecord/CHANGELOG.md
| * | Fix type casting to Decimal from Float with ...joker10072014-08-011-0/+4
| | | | | | | | | | | | | | | When I defines large precision column at RDBMS, I assigns float value, raise ArgumentError (precision too large).
* | | Deprecate source_macroeileencodes2014-08-021-0/+8
|/ / | | | | | | | | | | `source_macro` is no longer used in any ActiveRecord code. I've chosen to deprecate it because it was not marked as nodoc and may be in use outside of rails source.
* | No verbose backtrace by db:drop when database does not exist.Kenn Ejima2014-07-271-0/+6
| |
* | Merge pull request #16220 from pcreux/postgresql-jsonb-supportYves Senn2014-07-251-0/+10
|\ \ | | | | | | | | | Add support for Postgresql JSONB
| * | Add support for Postgresql JSONBPhilippe Creux2014-07-241-0/+10
|/ / | | | | | | [Philippe Creux, Chris Teague]
* | fix, mysql `db:purge` respects `Rails.env`.Yves Senn2014-07-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this method always established a connection to the test database. This resulted in buggy behavior when combined with other tasks like `bin/rake db:schema:load`. This was one of the reasons why #15394 (22e9a91189af2c4e6217a888e77f22a23d3247d1) was reverted: > I’ve replicated it on a new app by the following commands: 1) rails generate model post:title, 2) rake db:migrate, 3) rake db:schema:load, 4) rails runner ‘puts Post.first’. The last command goes boom. Problem is that rake db:schema:load wipes the database, and then doesn’t actually restore it. This is all on MySQL. There’s no problem with SQLite. -- DHH https://github.com/rails/rails/commit/22e9a91189af2c4e6217a888e77f22a23d3247d1#commitcomment-6834245
* | clenaup, unify CHANGELOG format. [ci skip]Yves Senn2014-07-241-5/+7
| |
* | pg, `change_column_default, :table, :column, nil` issues `DROP DEFAULT`.Yves Senn2014-07-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Closes #16261. [Matthew Draper, Yves Senn] Using `DEFAULT NULL` results in the same behavior as `DROP DEFAULT`. However, PostgreSQL will cast the default to the columns type, which leaves us with a default like "default NULL::character varying". /cc @matthewd
* | Merge pull request #16231 from Envek/type_in_referencesYves Senn2014-07-221-0/+11
|\ \ | | | | | | | | | | | | | | | * Allow to specify a type for foreign key column in migrations * unified the docs * some cleanup in CHANGELOG
| * | Allow to specify a type for foreign key column in migrationsAndrey Novikov2014-07-221-0/+11
|/ / | | | | | | [Andrey Novikov & Łukasz Sarnacki]
* | create_join_table uses same logic as HABTM reflectionsStefan Kanev2014-07-181-0/+7
| | | | | | | | | | | | | | | | Before this change, create_join_table would not remove the common prefix in the join table name, unlike ActiveRecord::Reflections. A HABTM between Music::Artist and Music::Record would use a table music_artists_records, while create_join table would create music_artists_music_records.
* | Merge pull request #15762 from arthurnn/better_error_on_bad_alias_methodMatthew Draper2014-07-181-0/+5
|\ \ | | | | | | | | | Dont swallow errors when bad alias_method
| * | Dont swallow errors when bad alias_methodArthur Neves2014-06-241-0/+5
| | |
* | | Merge pull request #15944 from seuros/uuidRafael Mendonça França2014-07-161-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Treat invalid uuid as nil Conflicts: activerecord/CHANGELOG.md
| * | | Treat invalid uuid as nilAbdelkader Boudih2014-07-141-0/+4
| | | |
* | | | Merge branch 'master' of git://github.com/rails/railsGodfrey Chan2014-07-151-0/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG.md
| * \ \ \ Merge branch 'jbrowning-fix_mariadb_rename_index'Rafael Mendonça França2014-07-151-0/+6
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Closes #15936
| | * | | | Fix version detection for RENAME INDEX support. Fixes #15931.Jeff Browning2014-07-151-0/+6
| | |/ / /
* | / / / Revert "Revert "Merge pull request #16059 from jenncoop/json-serialized-attr""Godfrey Chan2014-07-151-0/+41
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6f3c64eeb1dc8288dae49f114aaf619adc7dcb7f. Conflicts: activerecord/CHANGELOG.md
* / / / Add CHANGELOG entry for #15266Godfrey Chan2014-07-151-0/+5
|/ / /
* | | Merge pull request #16127 from Envek/fix_16111Matthew Draper2014-07-141-0/+7
|\ \ \ | | | | | | | | Dump PostgreSQL primary key with custom function as a default.
| * | | Dump PostgreSQL primary key with custom function as a default.Andrey Novikov2014-07-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Synced 4.2 release notes with the latest commits.Godfrey Chan2014-07-111-1/+1
|/ / / | | | | | | | | | | | | Also reordered some of the items to put newer ones on top (same order as CHANGELOGs), which makes it easier to diff while we are still working on it.
* | | [ci skip] Add changelog for PR #14899eileencodes2014-07-081-0/+15
| | | | | | | | | | | | The changelog entry for #14899 was missing.
* | | active_record: Type cast booleans and durations for string columns.Dylan Thacker-Smith2014-07-061-0/+11
| | |
* | | Revert "Merge pull request #16059 from jenncoop/json-serialized-attr"Godfrey Chan2014-07-051-41/+0
| | | | | | | | | | | | | | | | | | This reverts commit a03097759bd7103bb9db253e7ba095f011453f75. This needs more work before it would work correctly on master.
* | | Merge pull request #16059 from jenncoop/json-serialized-attrGodfrey Chan2014-07-051-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | Fixed issue with ActiveRecord serialize object as JSON Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods/serialization.rb