aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* PostgreSQL, Support for materialized views. [Dave Lee & Yves Senn]Dave Lee2014-04-021-0/+4
| | | | | Expand the query used in #table_exists? to include materialized views in the kinds of relations it searches.
* PostgreSQL, register custom domains. Closes #14305.Yves Senn2014-04-011-0/+4
| | | | | | | This patch registers custom domains in our OID-type_map. They will behave exactly as the type specified by `pg_type.typbasetype`. /cc @matthewd
* PostgreSQL determine `Column#type` through corresponding OID. #7814Yves Senn2014-04-011-0/+8
| | | | | | | | | | | | | I ran the whole test suite and compared the old to the new types. Following is the list of types that did change with this patch: ``` DIFFERENT TYPE FOR mood: NEW: enum, BEFORE: DIFFERENT TYPE FOR floatrange: NEW: floatrange, BEFORE: float ``` The `floatrange` is a custom type. The old type `float` was simply a coincidence form the name `floatrange` and our type-guessing.
* fix bug on non empty defaults for pg array columnsLuke Steensen2014-03-301-0/+6
| | | | fixes #10613
* Merge pull request #14469 from tiegz/timestamp_inheritance_fixRafael Mendonça França2014-03-271-0/+4
| | | | Swap Timestamp/Callbacks order in ActiveRecord::Base
* AR .persisted? throws SystemStackError for an unsaved model with achrisfinne2014-03-271-0/+7
| | | | custom primary_key that didn't save due to validation error
* ActiveRecord/ActiveModel '#validate' alias for 'valid?'Henrik Nyh2014-03-271-0/+6
| | | | | | | | It's unintuitive to call '#valid?' when you want to run validations but don't care about the return value. The alias in ActiveRecord isn't strictly necessary (the ActiveModel alias is still in effect), but it clarifies.
* Improve CHANGELOG entryRafael Mendonça França2014-03-261-3/+5
|
* Fixes bugs for using indexes in CREATE TABLE by adding checks for table ↵Steve Rice2014-03-251-0/+15
| | | | | | | | existence Also: - updates tests by stubbing table_exists? method - adds entry for creating indexes in CREATE TABLE to changelog
* Revert "Merge pull request #8313 from alan/only_save_changed_has_one_objects"Rafael Mendonça França2014-03-251-6/+6
| | | | | | | | | This reverts commit 6e3ab3e15faf782f6a937ccf5574a4fb63e3e353, reversing changes made to 39e07b64ce3f4bb55e60ba0266e677f8e4f4893a. Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/autosave_association_test.rb
* clarify CHANGELOG [ci skip].Yves Senn2014-03-251-8/+2
|
* Fix Generation of proper migration whenKuldeep Aggarwal2014-03-251-0/+13
| | | | | | | | | | | | ActiveRecord::Base.pluralize_table_names = false. Previously, generation a migration like this: rails g migration add_column_name_to_user name would not generating the correct table name. Fixes #13426.
* Merge pull request #12955 from joshwilliams/masterYves Senn2014-03-201-0/+5
|\ | | | | Postgres schema: Constrain sequence search classid
| * Postgres schema: Constrain sequence search classidJosh Williams2014-03-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | The pk_an_sequence_for query previously joined against pg_class's oid for rows in pg_depend, but pg_depend's objid may point to other system tables, such as pg_attrdef. If a row in one of those other tables coincidentally has the same oid as an (unrelated) sequence, that sequence name may be returned instead of the real one. This ensures that only the pg_depend entries pointing to pg_class are considered.
* | Improve touch docs with extra attributes passed in [ci skip]Carlos Antonio da Silva2014-03-201-6/+3
| |
* | Merge pull request #14423 from yakko/persistence-touches-manyCarlos Antonio da Silva2014-03-201-0/+12
|\ \ | | | | | | | | | | | | | | | | | | ActiveRecord#touch should accept multiple attributes Conflicts: activerecord/CHANGELOG.md
| * | ActiveRecord#touch should accept multiple attributes #14423Thiago Pinto2014-03-191-0/+12
| |/
* / only dump schema information if migration table exists. Closes #14217Yves Senn2014-03-201-0/+7
|/
* Reap connections based on owning-thread deathMatthew Draper2014-03-181-0/+8
| | | | | | | | | | | | | | | | .. not a general timeout. Now, if a thread checks out a connection then dies, we can immediately recover that connection and re-use it. This should alleviate the pool exhaustion discussed in #12867. More importantly, it entirely avoids the potential issues of the reaper attempting to check whether connections are still active: as long as the owning thread is alive, the connection is its business alone. As a no-op reap is now trivial (only entails checking a thread status per connection), we can also perform one in-line any time we decide to sleep for a connection.
* `where.not` adds `references` for `includes`.Yves Senn2014-03-171-0/+6
| | | | Closes #14406.
* format ActiveRecord CHANGELOG. [ci skip]Yves Senn2014-03-171-8/+9
|
* Extend fixture label replacement to allow string interpolationEric Steele2014-03-151-0/+10
| | | | | | | | | | | | | | Allows fixtures to use their $LABEL as part of a string instead of limiting use to the entire value. mark: first_name: $LABEL username: $LABEL1973 email: $LABEL@$LABELmail.com users(:mark).first_name # => mark users(:mark).username # => mark1973 users(:mark).email # => mark@markmail.com
* Make select_all on query cache accept a Relation without binds.Arthur Neves2014-03-131-0/+6
| | | | | [fixes #14361] [related #13886]
* passing an instance of an AR object to `find` is deprecatedAaron Patterson2014-03-131-0/+3
| | | | please pass the id of the AR object by calling `.id` on the model first.
* passing an ActiveRecord object to `exists?` is deprecated.Aaron Patterson2014-03-131-0/+3
| | | | | Pass the id of the object to the method by calling `.id` on the AR object.
* Merge pull request #13040 from kamipo/case_sensitive_comparisonRafael Mendonça França2014-03-121-0/+4
|\ | | | | | | | | | | | | Only use BINARY for mysql case sensitive uniqueness check when column has a case insensitive collation. Conflicts: activerecord/CHANGELOG.md
| * Only use BINARY for mysql case sensitive uniqueness check when column has a ↵Ryuta Kamizono2013-11-261-0/+4
| | | | | | | | case insensitive collation.
* | Changelog entry for mysql56 microsecondsArthur Neves2014-03-121-0/+4
| |
* | register OID for PostgreSQL citex datatype [Troy Kruthoff & Lachlan Sylvester]lsylvester2014-03-111-0/+5
| | | | | | | | citext makes it possible to use AR Hash finders for case-insensitive matching as sql UPPER/LOWER functions are not needed.
* | Merge pull request #8313 from alan/only_save_changed_has_one_objectsRafael Mendonça França2014-03-101-0/+6
|\ \ | | | | | | | | | | | | | | | | | | Save has_one associations only if record has changes Conflicts: activerecord/CHANGELOG.md
| * | Save has_one associations only if record has changesAlan Kennedy2013-10-311-0/+6
| | | | | | | | | | | | | | | | | | Prevents save related callbacks such as `after_commit` being triggered when `has_one` objects are already persisted and have no changes.
* | | Remove a reference to an issue [ci skip]Robin Dupret2014-03-051-1/+1
| | | | | | | | | | | | | | | This actually not an issue fixing ; the changelog is referring to the introducing pull request itself.
* | | quick pass over Active Record CHANGELOG. [ci skip].Yves Senn2014-03-051-13/+10
| | |
* | | Allow string hash values on AR order methodMarcelo Casiraghi2014-03-041-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This behavior has almost no performance impact: String not allowed 66.910000 0.030000 66.940000 ( 67.024976) String allowed 69.360000 0.030000 69.390000 ( 69.503096) Benchmarked with http://git.io/Y0YuRw.
* | | Add Enum type to postgresql adapter's oids to prevent unknown OID warnings.Dieter Komendera2014-03-041-0/+5
| | |
* | | `includes` uses SQL parsing when String joins are involved.Yves Senn2014-02-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of 22b3481ba2aa55fad1f9a5db94072312b345fb55. The current implementation of `references_eager_loaded_tables?` needs to know every table involved in the query. With the current API this is not possible without SQL parsing. While a2dab46cae35a06fd5c5500037177492a047c252 deprecated SQL parsing for `includes`. It did not issue deprecation warnings when String joins are involved. This resulted in a breaking change after the deprecated behavior was removed (22b3481ba2aa55fad1f9a5db94072312b345fb55). We will need to rethink the usage of `includes`, `preload` and `eager_load` but for now, this brings back the old *working* behavior.
* | | Fix a bug affecting validations of enum attributesTheMonster2014-02-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where any enum attribute of a model would be evaluated always as 0 when calling the database on validations. This fix converts the value of the enum attribute to its integer value rather than the string before building the relation as the bug occured when the string finally gets converted to integer using string.to_i which converts it to 0. [Vilius Luneckas, Ahmed AbouElhamayed]
* | | let `insert_record` actuall save the object.Aaron Patterson2014-02-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `before_add` callbacks are fired before the record is saved on `has_and_belongs_to_many` assocations *and* on `has_many :through` associations. Before this change, `before_add` callbacks would be fired before the record was saved on `has_and_belongs_to_many` associations, but *not* on `has_many :through` associations. Fixes #14144
* | | Merge remote-tracking branch ↵Jon Leighton2014-02-251-0/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'chancancode/fix_instance_method_already_implemented' Conflicts: activerecord/CHANGELOG.md
| * | | Fixed STI classes not defining an attribute method if there is aGodfrey Chan2014-02-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conflicting private method defined on its ancestors. The problem is that `method_defined_within?(name, klass, superklass)` only works correclty when `klass` and `superklass` are both `Class`es. If both `klass` and `superklass` are both `Class`es, they share the same inheritance chain, so if a method is defined on `klass` but not `superklass`, this method must be introduced at some point between `klass` and `superklass`. This does not work when `superklass` is a `Module`. A `Module`'s inheritance chain contains just itself. So if a method is defined on `klass` but not on `superklass`, the method could still be defined somewhere upstream, e.g. in `Object`. This fix works by avoiding calling `method_defined_within?` with a module while still fufilling the requirement (checking that the method is defined withing `superclass` but not is not a generated attribute method). 4d8ee288 is likely an attempted partial fix for this problem. This unrolls that fix and properly check the `superclass` as intended. Fixes #11569.
* | | | Point master changelogs to 4-1-stable branchCarlos Antonio da Silva2014-02-251-1858/+1
| | | | | | | | | | | | | | | | Remove 4-1 related entries from master [ci skip]
* | | | Coerce strings when reading attributes.Yves Senn2014-02-231-0/+11
|/ / /
* | | deprecate support for pg ranges with excluding beginnings.Yves Senn2014-02-231-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ruby Range object does not support excluding beginnings. We currently support excluding beginnings for some subtypes using manually by incrementing them (now using the `#succ` method). This is approach is flawed as it's not equal to an excluding beginning. This commit deprecates the current support for excluding beginnings. It also raises an `ArgumentError` for subtypes that do not implement the `succ` method. This is a temporary solution to get rid of the broken state. We might still add complete support for excluding beginnings afterwards. (Probably with a new `PGRange` object, which acts like a `Range` but has excluding beginnings.
* | | dynamically define PostgreSQL OID range types.Yves Senn2014-02-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This gets AR working with custom defined range types. It also removes the need for subtype specific branches in `OID::Range`. This expands the interface of all `OID` types with the `infinity` method. It's responsible to provide a value for positive and negative infinity.
* | | Typo fix for unscopeAmit Thawait2014-02-181-1/+1
| | |
* | | Merge branch '4-1-0-beta2'Rafael Mendonça França2014-02-181-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: actionview/CHANGELOG.md activerecord/CHANGELOG.md
| * | | Preparing for 4.1.0.beta2 releaseRafael Mendonça França2014-02-181-0/+4
| | | |
* | | | Don't use `# =>` when it is not the expression valuesRafael Mendonça França2014-02-181-9/+9
| | | | | | | | | | | | | | | | [ci skip]
* | | | Fix the column name [ci skip]Rafael Mendonça França2014-02-181-6/+6
| | | |
* | | | Document the default scopes change on the release notes, CHANGELOGRafael Mendonça França2014-02-181-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | and upgrating guides [ci skip]