aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Rename to test_mysql_strict_mode_disabled_dont_override_global_sql_mode"Yasuo Honda2014-07-172-8/+6
| | | | | | | | | This reverts commit babc24c1b07c1fd58b9b3249b0256f9b0d45c0f0. Conflicts: activerecord/test/cases/adapters/mysql/connection_test.rb activerecord/test/cases/adapters/mysql2/connection_test.rb
* Address ORA-00972: identifier is too long when tested with OracleYasuo Honda2014-07-143-4/+5
| | | | by using shorter attribute names.
* Merge pull request #16127 from Envek/fix_16111Matthew Draper2014-07-143-1/+32
|\ | | | | Dump PostgreSQL primary key with custom function as a default.
| * Dump PostgreSQL primary key with custom function as a default.Andrey Novikov2014-07-113-1/+32
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Fixing typo in commentGregory Igelmund2014-07-121-1/+1
| |
* | Merge pull request #16136 from sgrif/sg-pg-bit-stringMatthew Draper2014-07-122-13/+33
|\ \ | | | | | | Don't rely on the column SQL type for bit string quoting
| * | Don't rely on the column SQL type for bit string quotingSean Griffin2014-07-112-13/+33
| | |
* | | Merge pull request #16055 from sgrif/sg-refactor-sqlite3-stringsMatthew Draper2014-07-122-14/+29
|\ \ \ | |/ / |/| | Use a type object for type casting behavior on SQLite3
| * | Use a type object for type casting behavior on SQLite3Sean Griffin2014-07-112-14/+29
| | |
* | | 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.
* | Include fixtures to prevent foreign key violation.Zuhao Wan2014-07-091-0/+2
| |
* | Merge pull request #16093 from ↵Rafael Mendonça França2014-07-081-0/+1
|\ \ | | | | | | | | | | | | zuhao/refactor_activerecord_nested_through_associations_test Warm up cache to prevent assertion failure.
| * | Warm up cache to prevent assertion failure.Zuhao Wan2014-07-081-0/+1
| | |
* | | Merge pull request #16071 from sgrif/sg-pg-type-castRafael Mendonça França2014-07-081-15/+0
|\ \ \ | | | | | | | | Remove PG's definition of `type_cast`
| * | | Remove PG's definition of `type_cast`Sean Griffin2014-07-061-15/+0
| |/ / | | | | | | | | | | | | All cases except for `nil` in an array have been removed. `nil` in an array is handled by the Array type object.
* | | Merge pull request #16072 from sgrif/sg-xml-quotingRafael Mendonça França2014-07-085-5/+56
|\ \ \ | | | | | | | | Don't rely on the sql type to quote XML columns in PG
| * | | Don't rely on the sql type to quote XML columns in PGSean Griffin2014-07-065-5/+56
| |/ /
* | | Merge pull request #16078 from tgxworld/retreive_connection_onceRafael Mendonça França2014-07-071-2/+3
|\ \ \ | | | | | | | | Avoid retrieving connection in ActiveRecord::QueryCache multiple times.
| * | | Avoid retrieving connection in ActiveRecord::QueryCache multiple times.Guo Xiang Tan2014-07-071-2/+3
| |/ /
* / / Remove the `text?` predicate from the type objectsSean Griffin2014-07-0618-32/+4
|/ / | | | | | | | | | | | | This was only used for uniqueness validations. The first usage was in conjunction with `limit`. Types which cast to string, but are not considered text cannot have a limit. The second case was only with an explicit `:case_sensitive => true` option given by the user.
* | Change back occurrences of SQLite(3) to sqlite3 when referring to theZachary Scott2014-07-063-10/+11
| | | | | | | | adapter, fixed from #16057 [ci skip]
* | Merge pull request #16057 from akshay-vishnoi/doc_changeZachary Scott2014-07-063-5/+5
|\ \ | | | | | | [ci skip] /sqlite/i --> SQLite
| * | [ci skip] /sqlite/i --> SQLiteAkshay Vishnoi2014-07-063-5/+5
| | |
* | | active_record: Type cast booleans and durations for string columns.Dylan Thacker-Smith2014-07-065-5/+49
| | |
* | | Revert "Merge pull request #16059 from jenncoop/json-serialized-attr"Godfrey Chan2014-07-055-76/+2
| | | | | | | | | | | | | | | | | | 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-055-2/+76
| | | | | | | | | | | | | | | | | | | | | | | | Fixed issue with ActiveRecord serialize object as JSON Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods/serialization.rb
* | | Merge pull request #16065 from matthewd/mysql-explicit-non-strictMatthew Draper2014-07-061-2/+2
|\ \ \ | | | | | | | | If our connection is explicitly non-strict, tell MySQL
| * | | If our connection is explicitly non-strict, tell MySQLMatthew Draper2014-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We default to making the connection strict, but have historically relied on the MySQL default when we want it to be non-strict. On some (recent?) versions of MySQL, new connections default to being strict, so if we've been told 'strict:false', we're obliged to pass that on. This fixes a test failure that we've seen turn up on relatively-new development machines, so we do already have a test covering it.
* | | | Fix mysql/mysql2 failing with FK constraint errorsGodfrey Chan2014-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the author fixture we have ("david") references an author address by ID. Since we disable FK checks when inserting fixtures, this is all fine until we try to update it, at which point MySQL would complain about the missing row referenced by the `author_address_id`. [Godfrey Chan, Matthew Draper]
* | | | Re-enable foriegn key tests on MySQLGodfrey Chan2014-07-052-5/+1
| | | | | | | | | | | | | | | | This reverts commit e84799d, e31104c and e6ca8e2
* | | | Use the type object for quoting PG RangesSean Griffin2014-07-056-54/+40
| | | |
* | | | CHANGELOG and release notes entry for #16056Sean Griffin2014-07-041-0/+5
| | | |
* | | | Add a `required` option to singular associationsSean Griffin2014-07-044-1/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to defining the association, a `required` association will also have its presence validated. Before: ```ruby belongs_to :account validates_presence_of :account ``` After: ```ruby belongs_to :account, required: true ``` This helps to draw a distinction between types of validations, since validations on associations are generally for data integrity purposes, and aren't usually set through form inputs.
* | | | Revert "Use a type object for type casting behavior on SQLite3"Matthew Draper2014-07-051-37/+13
|/ / /
* | | Fix typoRafael Mendonça França2014-07-041-1/+1
| | |
* | | Merge pull request #16003 from sgrif/sg-refactor-sqlite3-stringsMatthew Draper2014-07-051-13/+37
|\ \ \ | | | | | | | | Use a type object for type casting behavior on SQLite3
| * | | Use a type object for type casting behavior on SQLite3Sean Griffin2014-07-011-13/+37
| | |/ | |/| | | | | | | | | | Note: I'm not sure we actually need to be logging when this happens. This code would be a fair bit cleaner if we didn't need to log it.
* | | Merge pull request #16028 from ↵Rafael Mendonça França2014-07-043-1/+16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-023-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #16049 from matthewd/find-via-reloadMatthew Draper2014-07-053-0/+19
|\ \ \ \ | | | | | | | | | | After find-via-reload, the record is not new
| * | | | After find-via-reload, the record is not newMatthew Draper2014-07-053-0/+19
| | |_|/ | |/| |
* | | | Merge pull request #16037 from sgrif/sg-money-quotingRafael Mendonça França2014-07-043-11/+28
|\ \ \ \ | |/ / / |/| | | Remove unneccessary special case for money in quoting
| * | | Remove unneccessary special case for money in quotingSean Griffin2014-07-033-11/+28
| | | |
* | | | Merge pull request #16036 from sgrif/sg-datetime-infinityRafael Mendonça França2014-07-033-3/+46
|\ \ \ \ | | | | | | | | | | Do not rely on the column type when quoting infinity
| * | | | Do not rely on the column type when quoting infinitySean Griffin2014-07-033-3/+46
| |/ / /
* / / / Use the type object for type casting HStore columnsSean Griffin2014-07-034-66/+39
|/ / /
* / / Fix typo in commentCade Truitt2014-07-021-1/+1
|/ /
* | Merge pull request #16015 from sgrif/sg-ensure-initializedRafael Mendonça França2014-07-022-4/+7
|\ \ | | | | | | | | | | | | | | | | | | Move pk initialization logic onto `AttributeSet` Conflicts: activerecord/lib/active_record/attribute_set.rb
| * | Move pk initialization logic onto `AttributeSet`Sean Griffin2014-07-022-4/+7
| | | | | | | | | | | | Better encapsulates its internals from `ActiveRecord::Base`.