aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #15934 from seuros/renameRafael Mendonça França2014-06-271-0/+4
|\ \ \ | | | | | | | | | | | | rename primary key sequence only if it exists
| * | | rename sequence only if it existsAbdelkader Boudih2014-06-271-0/+4
|/ / /
* | | Merge pull request #12450 from iantropov/masterRafael Mendonça França2014-06-271-0/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug, when ':dependent => :destroy' violates foreign key constraints Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/associations/builder/association.rb activerecord/lib/active_record/associations/builder/has_one.rb
| * | | Fix bug, when ':dependent => :destroy' option violates foreign key ↵Ivan Antropov2013-10-261-0/+7
| | | | | | | | | | | | | | | | constraints, issue #12380
* | | | Merge pull request #15788 from sgrif/sg-mutable-stringsRafael Mendonça França2014-06-271-0/+22
|\ \ \ \ | | | | | | | | | | | | | | | Detect in-place modifications on Strings
* \ \ \ \ Merge pull request #8639 from bogdan/valid-with-bangRafael Mendonça França2014-06-271-0/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Add AR::Base#valid! method
* | | | | | credit Matthew Higgins for the integration of foreign keys. [ci skip]Yves Senn2014-06-271-0/+3
| | | | | |
* | | | | | fk: add docsYves Senn2014-06-261-0/+12
| | | | | |
* | | | | | Move writing unknown column exception to null attributeSean Griffin2014-06-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making this change revealed several subtle bugs related to models with no primary key, and anonymous classes. These have been fixed as well, with regression tests added.
* | | | | | Deprecate automatic counter caches on has_many :throughSean Griffin2014-06-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reliant on https://github.com/rails/rails/pull/15747 but pulled to a separate PR to reduce noise. `has_many :through` associations have the undocumented behavior of automatically detecting counter caches. However, the way in which it does so is inconsistent with counter caches everywhere else, and doesn't actually work consistently. As with normal `has_many` associations, the user should specify the counter cache on the `belongs_to`, if they'd like it updated.
* | | | | | synchronize Active Record deprecations / removals with 4.2 release notesYves Senn2014-06-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] /cc @chancancode @zzak
* | | | | | `preload` preserves readonly flag on associations. #15853Yves Senn2014-06-251-0/+6
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | This is a partial fix for #15853. It only works when a `preload` is issued and not an `eager_load`. I've added a skipped failing test-case to keep in mind that we need to deal with `eager_load`.
* | | | | Always assume strings with non-numeric characters change numeric typesSean Griffin2014-06-241-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously only did this if the old value was zero, to make sure numericality validations run and failed if the user gave 'wibble' as the value, which would be type cast to 0. However, numericality validations will fail if there are any non-numeric characters in the string, so 5 -> '5wibble' should also be marked as changed.
* | | | | Add a deprecation cycle for `NullColumn` from `column_for_attribute`Sean Griffin2014-06-231-1/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | This is public API, and `simple_form` depends on the `nil` return value. We need to go through a deprecation cycle to return a null object. If people want hash access, they can access the hash.
* | | | changelog entries for #15866 and #15848Yves Senn2014-06-221-0/+11
| | | | | | | | | | | | | | | | /cc @sgrif
* | | | Merge pull request #15728 from sgrif/sg-double-save-hm-tRafael Mendonça França2014-06-191-0/+8
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | Don't save through records twice Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/associations/has_many_through_associations_test.rb
| * | | Don't save through records twiceSean Griffin2014-06-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the through record gets created in an `after_create` hook that is defined before the association is defined (therefore after its `after_create` hook) get saved twice. This ensures that the through records are created only once, regardless of the order of the hooks.
* | | | Detect mutations of arrays and array membersSean Griffin2014-06-171-0/+4
|/ / /
* | | add `bin/rake db:purge` task to empty the current database.Yves Senn2014-06-171-0/+4
| | |
* | | Merge pull request #15723 from akshay-vishnoi/sql-correctionZachary Scott2014-06-151-2/+2
|\ \ \ | | | | | | | | [ci skip] Use `an` for SQL
| * | | [ci skip] Use `an` for SQLAkshay Vishnoi2014-06-141-2/+2
| | | |
* | | | Deprecate `serialized_attributes` without replacementSean Griffin2014-06-141-0/+5
|/ / / | | | | | | | | | | | | We've stopped using it internally, in favor of polymorphism. So should you!
* | | Parsing DATABASE_URI, use URI#hostname: it's smarter about IPv6Matthew Draper2014-06-141-0/+7
| | | | | | | | | | | | Fixes #15705.
* | | Through associations should set both parent ids on join modelsSean Griffin2014-06-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | member = Member.new(club: Club.new) member.save! Before: member.current_membership.club_id # => nil After: member.current_membership.club_id # => club's id
* | | Detect in-place changes on mutable AR attributesSean Griffin2014-06-131-0/+6
| | | | | | | | | | | | | | | | | | We have several mutable types on Active Record now. (Serialized, JSON, HStore). We need to be able to detect if these have been modified in place.
* | | Merge pull request #15394 from ↵Yves Senn2014-06-121-0/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | morgoth/fix-automatic-maintaining-test-schema-for-sql-format ActiveRecord::Migration.maintain_test_schema! doesn't work with structure.sql Conflicts: activerecord/CHANGELOG.md
| * | | Fixed automatic maintaining test schema to properly handle sql structure ↵Wojciech Wnętrzak2014-06-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | schema format. Additionally: * It changes `purge` task on `sqlite3` adapter to recreate database file, to be consistent with other adapters. * Adds `purge` step when loading from `schema.rb`
* | | | Pluck should work with columns of the same name from different tablesSean Griffin2014-06-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The column name given by the adapter doesn't include the table namespace, so going through the hashed version of the result set causes overridden keys. Fixes #15649
* | | | rm cached attributesSean Griffin2014-06-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original patch that added this concept can be found [here](https://web.archive.org/web/20090601022739/http://dev.rubyonrails.org/ticket/9767). The current default behavior is to cache everything except serialized columns, unless the user specified otherwise. If anyone were to specify otherwise, many types would actually be completely broken. Still, the method is left in place with a deprecation warning in case anyone is actually still calling this method.
* | | | Remove deprecated method ActiveRecord::Base.quoted_locking_columnAkshay Vishnoi2014-06-101-0/+4
| | | |
* | | | ActiveRecord::FinderMethods.find passes proc parameter #15382James Yang2014-06-101-0/+7
| | | |
* | | | Timestamp values should be present on callbacksRafael Mendonça França2014-06-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dd3ea17191e316aeebddaa7b176f6cfeee7a6365 and add a regression test. Fixes #15418
* | | | changelog for #15556 and credit @kuldeepaggarwal [Kuldeep Aggarwal]Yves Senn2014-06-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | This is a follow up to #15556 @kuldeepaggarwal did submit this patch way back (#13624).
* | | | credit JoseLuis Torres for #15051. [JoseLuis Torres]Yves Senn2014-06-061-1/+1
| | | | | | | | | | | | | | | | [ci skip]
* | | | `ActiveRecord::SchemaMigration` has no primary key.Yves Senn2014-06-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, using `ActiveRecord::Base.primary_key_prefix_type` with `:table_name_with_underscore` would change the `SchemaMigration` model to have a primary key. This resulted in broken queries for PG because it tried to return the inserted PK (which does not exist). Closes #15051. Closes #15419.
* | | | `bin/rake db:migrate:status` works with legacy migration numbers.Yves Senn2014-06-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The migration numbers were normalized different ways. This left the task output in an inconsistent state. Closes #15538.
* | | | Merge pull request #14971 from versioncontrol/#14785Yves Senn2014-06-061-0/+9
|\ \ \ \ | | | | | | | | | | | | | | | Baseclass becomes! subclass
| * | | | Fix Baseclass becomes! subclass.Edo Balvers2014-05-131-0/+9
| | | | |
* | | | | Merge pull request #15512 from akshay-vishnoi/delete-deprecated-methodYves Senn2014-06-051-0/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Remove deprecated method ActiveRecord::Migrator.proper_table_name
| * | | | | Remove deprecated method ActiveRecord::Migrator.proper_table_nameAkshay Vishnoi2014-06-051-0/+4
|/ / / / /
* | | | | Merge pull request #15482 from laurocaetano/fix-regression-for-eager-loadCarlos Antonio da Silva2014-06-041-0/+7
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression on eager loading association based on SQL query rather than existing column. Conflicts: activerecord/CHANGELOG.md
| * | | | | Fix regression on eager loading association based on SQL query ratherLauro Caetano2014-06-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than existing column. Fixes #15480.
* | | | | | Cleaned up duplicated CHANGELOG entry [ci skip]Godfrey Chan2014-06-031-3/+2
| | | | | |
* | | | | | Merge pull request #15438 from sgrif/sg-null-columnRafael Mendonça França2014-06-031-0/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a null column when no column exists for an attribute Conflicts: activerecord/CHANGELOG.md
| * | | | | | Return a null column when no column exists for an attributeSean Griffin2014-06-031-0/+4
| | | | | | |
* | | | | | | Merge pull request #15172 from notEthan/active_record_pretty_printRafael Mendonça França2014-06-031-0/+4
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implement ActiveRecord::Base#pretty_print Conflicts: activerecord/CHANGELOG.md
| * | | | | | implement ActiveRecord::Base#pretty_print + changelogEthan2014-05-291-0/+4
| | | | | | |
* | | | | | | pg, preserve money type when dumping schema and extract money default.Yves Senn2014-06-031-5/+2
| |/ / / / / |/| | | | |
* | | | | | pg, preserve type when schema dumping bit and bit varying columns.Yves Senn2014-06-031-1/+5
| | | | | |
* | | | | | pg, preserve point type when schema dumping.Yves Senn2014-06-031-0/+4
| | | | | |