Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Serialize postgres' hstore, json and array types correctly in AR update methods. | Tadas Tamosauskas | 2013-12-23 | 3 | -0/+18 | |
| | | | | | | | | | | | | | | | | | | Fixes #12261. Closes #12395. Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/adapters/postgresql/array_test.rb activerecord/test/cases/adapters/postgresql/json_test.rb | |||||
* | | Do not consider PG array columns as number or text columns | Carlos Antonio da Silva | 2013-12-23 | 1 | -2/+6 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code uses these checks in several places to know what to do with a particular column, for instance AR attribute query methods has a branch like this: if column.number? !value.zero? end This should never be true for array columns, since it would be the same as running [].zero?, which results in a NoMethodError exception. Fixing this by ensuring that array columns in PostgreSQL never return true for number?/text? checks. Since most of the array support was based on the postgres_ext lib, it's worth noting it does the same thing for numeric array columns too: https://github.com/dockyard/postgres_ext/blob/v1.0.0/lib/postgres_ext/active_record/connection_adapters/postgres_adapter.rb#L72 This extended the same logic for text columns to ensure consistency. | |||||
* | | Tell how to Create a Database in Error Message | schneems | 2013-12-23 | 1 | -0/+7 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if you attempt to use a database that does not exist you get an error: ``` PG::ConnectionBad FATAL: database "db_error" does not exist ``` The solution is easy, create and migrate your database however new developers may not know these commands by memory. Instead of requiring the developer to search for a solution, tell them how to fix the problem in the error message: ``` ActiveRecord::NoDatabase: FATAL: database "db_error" does not exist Run `$ bin/rake db:create db:migrate` to create your database ``` Active Record should not know about `rake db:migrate` so this additional information needs to come from the railtie. Potential alternative implementation suggestions are welcome. | |||||
* | | fix quoting non-strings | Damien Mathieu | 2013-12-22 | 1 | -0/+6 | |
| | | | | | | | | Closes #13444 | |||||
* | | Fix indent in PG array tests | Carlos Antonio da Silva | 2013-12-19 | 1 | -5/+5 | |
| | | | | | | | | [ci skip] | |||||
* | | Merge pull request #13395 from kuldeepaggarwal/postgres-table-ref-regex | Carlos Antonio da Silva | 2013-12-19 | 1 | -0/+12 | |
|\ \ | | | | | | | modified regex for finding table_name from a multiline sql query in postgresql | |||||
| * | | Fix PostgreSQL insert to properly extract table name from multiline string SQL. | Kuldeep Aggarwal | 2013-12-19 | 1 | -0/+12 | |
| |/ | | | | | | | | | | | | | | | | | | | | | | | Previously, executing an insert SQL in PostgreSQL with a command like this: insert into articles( number) values( 5152 ) would not work because the adapter was unable to extract the correct articles table name. | |||||
* / | Fix PostgreSQL range tests | Matthew Draper | 2013-12-19 | 1 | -11/+11 | |
|/ | | | | The changes in c4044b2 meant the tests would error on a fresh DB. | |||||
* | refactor, reuse assertions in range_test.rb. | Yves Senn | 2013-12-13 | 1 | -186/+111 | |
| | ||||||
* | extract PG range tests from datatype_test.rb into range_test.rb | Yves Senn | 2013-12-13 | 2 | -282/+320 | |
| | ||||||
* | Don't skip tests if we don't need to. | Rafael Mendonça França | 2013-11-08 | 6 | -420/+401 | |
| | | | | | | | We can conditional define the tests depending on the adapter or connection. Lets keep the skip for fail tests that need to be fixed. | |||||
* | short arrays in inspect | Jan Bernacki | 2013-10-30 | 1 | -0/+5 | |
| | ||||||
* | Merge pull request #12643 from severin/pg_cast_json_on_write | Yves Senn | 2013-10-25 | 1 | -0/+7 | |
|\ | | | | | cast json values on write to be consistent with reading from the db. | |||||
| * | cast json values on write to be consistent with reading from the db. | Severin Schoepke | 2013-10-25 | 1 | -0/+7 | |
| | | | | | | | | See also commit 5ac2341fab689344991b2a4817bd2bc8b3edac9d | |||||
* | | Merge pull request #12633 from senny/no_more_time_zone_leaks | Yves Senn | 2013-10-25 | 1 | -25/+15 | |
|\ \ | |/ |/| | prevent global timezone state from leaking out of test cases. | |||||
| * | prevent global timezone state from leaking out of test cases. | Yves Senn | 2013-10-25 | 1 | -25/+15 | |
| | | ||||||
* | | `ActiveRecord::Store` works together with PG `hstore` columns. | Yves Senn | 2013-10-25 | 1 | -0/+21 | |
| | | | | | | | | | | | | This is necessary because as of 5ac2341 `hstore` columns are always stored as `Hash` with `String` keys. `ActiveRecord::Store` expected the attribute to be an instance of `HashWithIndifferentAccess`, which led to the bug. | |||||
* | | test to verify the `ActiveRecord::Store` behavior with PG's json type | Yves Senn | 2013-10-25 | 1 | -0/+18 | |
|/ | ||||||
* | Dump the default function when the primary key is uuid | Rafael Mendonça França | 2013-10-14 | 1 | -2/+2 | |
| | | | | Fixes #12489 | |||||
* | log the statement name along with the SQL | Aaron Patterson | 2013-10-04 | 1 | -0/+10 | |
| | ||||||
* | stop adding singleton methods to the mysql2 adapter | Aaron Patterson | 2013-10-04 | 1 | -15/+0 | |
| | ||||||
* | stop adding singleton methods to the PG connection | Aaron Patterson | 2013-10-04 | 1 | -11/+26 | |
| | ||||||
* | Merge pull request #12315 from gaurish/super | Rafael Mendonça França | 2013-09-23 | 1 | -26/+28 | |
|\ | | | | | TypeError: superclass mismatch for class PostgreSQLAdapter | |||||
| * | We shouldn't override PostgreSQLAdapter's superclass inheritance while ↵ | Gaurish Sharma | 2013-09-23 | 1 | -26/+28 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | monkeypatching Changing Inheritance section leads to following error on JRuby TypeError: superclass mismatch for class PostgreSQLAdapter After this change, Jruby: The above error no longer appear. Tests are still failing but they do run. Progress! MRI: No change, all green(tested by running take test_test_postgresql) Thanks to Aditya Sanghi(@asanghi) for help | |||||
* | | Merge pull request #11382 from kennyj/fix_10751-2 | Rafael Mendonça França | 2013-09-22 | 1 | -0/+1 | |
|\ \ | | | | | | | | | | | | | | | | | | | Dump UUID default functions to schema.rb [2nd version]. Fixes #10751. Conflicts: activerecord/CHANGELOG.md | |||||
| * | | Migration dump UUID default functions to schema.rb. Fixes #10751. | kennyj | 2013-07-10 | 1 | -0/+1 | |
| | | | ||||||
* | | | Merge pull request #10500 from kennyj/fix_10450 | Rafael Mendonça França | 2013-09-22 | 1 | -0/+40 | |
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | Fixed a bug in when using has_many association with :inverse_of option and UUID primary key. Conflicts: activerecord/CHANGELOG.md | |||||
| * | | Fixed a bug in when using has_many association with :inverse_of option and ↵ | kennyj | 2013-05-08 | 1 | -0/+40 | |
| | | | | | | | | | | | | UUID primary key. | |||||
* | | | Test that PostgreSQL adapter includes `usec` when quoting `DateTime` | Ben Cherry | 2013-08-28 | 1 | -0/+5 | |
| | | | ||||||
* | | | PG adapter deals with negative money values formatted with parenthesis. | Yves Senn | 2013-08-26 | 1 | -0/+8 | |
| | | | | | | | | | | | | Closes #11899. | |||||
* | | | Stop interpreting SQL 'string' columns as :string type. | Ben Woosley | 2013-08-17 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | SQL doesn't have a string type, and interpreting 'string' as text is contrary to at least SQLite3's behavior: "Note that a declared type of 'STRING' has an affinity of NUMERIC, not TEXT." http://www.sqlite.org/datatype3.html | |||||
* | | | Merge pull request #11574 from jetthoughts/11552_rescue_on_invalid_inet_assign | Yves Senn | 2013-08-14 | 1 | -0/+14 | |
|\ \ \ | | | | | | | | | Fix assign ip address with invalid values raise exception | |||||
| * | | | Rescue invalid ip address exceptions on assign. | Paul Nikitochkin | 2013-08-14 | 1 | -0/+14 | |
| | | | | | | | | | | | | | | | | In order that set attribute should not be bang method | |||||
* | | | | Removed redundant asserts for assigns attribute operation | Paul Nikitochkin | 2013-08-14 | 1 | -28/+28 | |
|/ / / | ||||||
* | | | using assert_not instead of refute | Rajarshi Das | 2013-08-13 | 1 | -3/+3 | |
| | | | ||||||
* | | | cast hstore values on write to be consistent with reading from the db. | Yves Senn | 2013-08-08 | 1 | -0/+7 | |
| | | | ||||||
* | | | Fix multidimensional PG arrays containing non-string items | Yves Senn | 2013-08-07 | 1 | -14/+19 | |
| | | | ||||||
* | | | test to express that we can't turn non-array columns to array columns. | Yves Senn | 2013-08-06 | 1 | -0/+9 | |
| | | | | | | | | | | | | Closes #11062 | |||||
* | | | fix for postgresql failing test in local | Karunakar (Ruby) | 2013-08-04 | 1 | -1/+1 | |
| | | | ||||||
* | | | Use assert_nil instead of testing for equality | Carlos Antonio da Silva | 2013-08-02 | 1 | -2/+1 | |
| | | | ||||||
* | | | Removed redundant xml override from pg adapter | Paul Nikitochkin | 2013-08-02 | 1 | -0/+39 | |
| | | | | | | | | | | | | Closes: #11706 | |||||
* | | | `change_column` for PG adapter respects `:array` option. | Yves Senn | 2013-07-16 | 1 | -0/+12 | |
| |/ |/| | ||||||
* | | Remove deprecated SchemaStatements#distinct | Francesco Rodriguez | 2013-07-02 | 1 | -46/+0 | |
| | | ||||||
* | | Add CHANGELOG enty for #11235 | Rafael Mendonça França | 2013-07-02 | 1 | -1/+0 | |
| | | ||||||
* | | the typecast value should be passed to the serializer. fixes #10830 | Aaron Patterson | 2013-06-05 | 1 | -1/+0 | |
| | | ||||||
* | | adding a test for #10830 | Aaron Patterson | 2013-06-05 | 1 | -0/+18 | |
| | | | | | | | | | | Conflicts: activerecord/test/cases/adapters/postgresql/bytea_test.rb | |||||
* | | Merge pull request #10495 from senny/postgres_test_cleanup | Rafael Mendonça França | 2013-05-28 | 1 | -29/+29 | |
|\ \ | | | | | | | PostgreSQL specific test cleanup | |||||
| * | | cleanup, switch arguments in assert_equal calls | Yves Senn | 2013-05-08 | 1 | -29/+29 | |
| |/ | ||||||
* | | test cleanup, replace `define_method` and `remove_method` with stubs. | Yves Senn | 2013-05-28 | 1 | -5/+1 | |
| | | ||||||
* | | Support array as root element in JSON | Alexey Noskov | 2013-05-14 | 1 | -0/+14 | |
| | |