aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | CHANGELOG and release notes entry for #16056Sean Griffin2014-07-041-0/+5
| |
* | Merge pull request #16028 from ↵Rafael Mendonça França2014-07-041-0/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | cade/fix_counter_cache_count_with_association_selects Add `:all` argument to `count` in `reset_counters` Conflicts: activerecord/CHANGELOG.md
| * | Add `:all` argument to `count` in `reset_counters`Cade Truitt2014-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this fix, if an association had a scope with a `select`, calls to `reset_counters` would generate invalid SQL and throw: ActiveRecord::StatementInvalid: [$DB_ADAPTER]: wrong number of arguments to function COUNT() References #10710, #13648
* | | After find-via-reload, the record is not newMatthew Draper2014-07-051-0/+6
|/ /
* | Revert "Merge pull request #15394 from ↵Rafael Mendonça França2014-07-021-8/+1
| | | | | | | | | | | | | | | | | | | | morgoth/fix-automatic-maintaining-test-schema-for-sql-format" This reverts commit 46139d33c06715e74ad450428ece3ee84da98579, reversing changes made to 8f247871bb18b2e3036a05df5f62cbfe3b402586. Conflicts: activerecord/CHANGELOG.md
* | 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