aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql
Commit message (Collapse)AuthorAgeFilesLines
...
* Respect limit for PG bit stringsSean Griffin2014-06-031-8/+8
|
* pg, preserve type when schema dumping bit and bit varying columns.Yves Senn2014-06-031-8/+8
|
* test pg, move bit string type tests into `bit_string_test.rb`.Yves Senn2014-06-032-34/+80
|
* test pg, we don't care about the internal state of `column#default`.Yves Senn2014-06-035-9/+0
| | | | | That data is internal to Active Record. What we care about is that new records have the right default value.
* pg, preserve point type when schema dumping.Yves Senn2014-06-031-8/+8
|
* pg test, examples for default values and schema dumping of point types.Yves Senn2014-06-031-0/+21
| | | | /cc @sgrif
* test pg, add basic test cases for point datatype.Yves Senn2014-06-021-0/+45
|
* Remove most code related to serialized propertiesSean Griffin2014-06-011-0/+1
| | | | | | | | | | | Nearly completely implemented in terms of custom properties. `_before_type_cast` now stores the raw serialized string consistently, which removes the need to keep track of "state". The following is now consistently true: - `model.serialized == model.reload.serialized` - A model can be dumped and loaded infinitely without changing - A model can be saved and reloaded infinitely without changing
* pg, support default values for enum types. Closes #7814.Yves Senn2014-05-301-0/+11
| | | | | This is an intermediate solution. It is related to the refactoring @sgrif is making and will change in the future.
* pg, `default_sequence_name` respects schema. Closes #7516.Yves Senn2014-05-301-8/+6
|
* Merge pull request #11896 from nkondratyev/fix_pg_columns_for_distinctYves Senn2014-05-301-0/+11
|\ | | | | | | | | | | | | Fixed #columns_for_distinct of postgresql adapter Conflicts: activerecord/CHANGELOG.md
| * Fixed `columns_for_distinct` of postgresql adapterNikolay Kondratyev2013-08-151-0/+11
| |
* | pg, `reset_pk_sequence!` respects schemas. Closes #14719.Yves Senn2014-05-302-5/+16
| |
* | pg, `PostgreSQL::Name` to hold schema qualified names.Yves Senn2014-05-301-2/+43
| |
* | Merge pull request #15370 from sgrif/sg-type-namespaceRafael Mendonça França2014-05-281-1/+1
|\ \ | | | | | | Move types to the top level `ActiveRecord` namespace
| * | Move types to the top level `ActiveRecord` namespaceSean Griffin2014-05-271-1/+1
| | | | | | | | | | | | | | | `ActiveRecord::ConnectionAdapters::Type::Value` => `ActiveRecord::Type::Value`
* | | pg, keep `hstore` and `json` attributes as `Hash` in @attributes.Yves Senn2014-05-282-0/+18
|/ / | | | | | | | | | | | | | | | | | | | | The solution presented in this patch is not efficient. We should replace it in the near future. The following needs to be worked out: * Is `@attributes` storing the Ruby or SQL representation? * `cacheable_column?` is broken but `hstore` and `json` rely on that behavior Refs #15369. /cc @sgrif @rafaelfranca
* | Merge pull request #15307 from sgrif/sg-type-cast-for-writeYves Senn2014-05-261-1/+0
|\ \ | | | | | | Add an interface for type objects to control Ruby => SQL
| * | Add an interface for type objects to control Ruby => SQLSean Griffin2014-05-261-1/+0
| | | | | | | | | | | | | | | Adds the ability to save custom types, which type cast to non-primitive ruby objects.
* | | remove unused variable warningKuldeep Aggarwal2014-05-261-1/+1
|/ / | | | | | | `warning: assigned but unused variable - album`
* | Merge pull request #15249 from sgrif/sg-register-types-in-adapterRafael Mendonça França2014-05-221-9/+1
|\ \ | | | | | | Use the generic type map for all PG type registrations
| * | Use the generic type map for all PG type registrationsSean Griffin2014-05-221-9/+1
| | | | | | | | | | | | | | | | | | | | | We're going to want all of the benefits of the type map object for registrations, including block registration and real aliasing. Moves type name registrations to the adapter, and aliases the OIDs to the named types
* | | pg test, extract tsvector tests into `postgresql/full_text_test.rb`Yves Senn2014-05-222-27/+31
| | |
* | | pg test, move timestamp tests over to `postgresql/timestamp_test.rb`.Yves Senn2014-05-222-43/+53
| | |
* | | pg test, extract network address type tests into separate file.Yves Senn2014-05-223-51/+79
| | |
* | | pg test, remove unused code.Yves Senn2014-05-221-3/+0
|/ /
* | Rename `oid_type` to `cast_type` to make PG columns consistentSean Griffin2014-05-211-10/+1
| |
* | pg, extract money tests into separate file.Yves Senn2014-05-212-35/+55
| | | | | | | | | | - Added assertions about the column. Specifically scale. - Move record insertion from setup into test method.
* | Delegate predicate methods to injected type object on ColumnSean Griffin2014-05-201-1/+1
| |
* | Have Postgres OID types inherit from general typesSean Griffin2014-05-201-4/+4
| | | | | | | | | | Using general types where possible. Several more can go away once infinity gets figured out.
* | Fixed the inferred table name for HABTM within a schemaEric Chahin2014-05-201-0/+26
| | | | | | | | Fixes #14824.
* | Fixing test order issuesRafael Mendonça França2014-05-191-2/+8
| |
* | Merge pull request #10798 from ↵Rafael Mendonça França2014-05-191-0/+59
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | jcxplorer/fix-enable_extension-with-table_name_prefix Fix migrations that use enable_extension with table_name_prefix/suffix Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/migration.rb
| * | Fix migrations with enable_extensionJoao Carlos2013-05-291-0/+59
| | | | | | | | | | | | | | | | | | | | | When using ActiveRecord::Base.table_name_prefix and/or table_name_suffix, extension names got the same treatment as table names when running migrations. This led to migrations that tried to call, for example, enable_extension("prefix_hstore") on the connection.
* | | Delegate `Column#type` to the injected type objectSean Griffin2014-05-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The decision to wrap type registrations in a proc was made for two reasons. 1. Some cases need to make an additional decision based on the type (e.g. a `Decimal` with a 0 scale) 2. Aliased types are automatically updated if they type they point to is updated later. If a user or another adapter decides to change the object used for `decimal` columns, `numeric`, and `number` will automatically point to the new type, without having to track what types are aliased explicitly. Everything else here should be pretty straightforward. PostgreSQL ranges had to change slightly, since the `simplified_type` method is gone.
* | | pg, re-introduce `PostgreSQL::Utils` to unify schema/table extraction.Yves Senn2014-05-192-15/+20
| | | | | | | | | | | | Partial revert of c0bfc3f412834ffe8327a15ae3a46602cc28e425
* | | Merge pull request #15088 from kares/shareable-modulesRafael Mendonça França2014-05-142-20/+15
|\ \ \ | | | | | | | | | | | | [postgres] remove (outer) sub-class declarations with nested modules/classes
| * | | PostgreSQLAdapter::Utils seems to be only used from a single spot - quite ↵kares2014-05-142-20/+15
| | | | | | | | | | | | | | | | redundant
* | | | remove warning `ambiguous first argument; put parentheses or even spaces`Kuldeep Aggarwal2014-05-151-1/+1
|/ / /
* | | pg, clarify default behavior for composite types.Yves Senn2014-05-131-7/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * by default composite types are mapped as `OID::Identity` and issue a warning * the user is advised to register his own `OID::Type` to make use of composite types Registering a new `OID::Type` does currently not allow to specify the type casting behavior when writing to the database. In order for it to work we need to use the values within `@attributes`. They are already being type casted and are ready to be written to the DB. See https://github.com/rails/rails/blob/57643c961feb24b662620d330e71103a830003e8/activerecord/lib/active_record/attribute_methods.rb#L460-L462
* | | test, move all pg array tests into `postgresql/array_test.rb`.Yves Senn2014-05-132-51/+29
| | |
* | | test, use `columns_hash[]` in place of `columns.find {}`.Yves Senn2014-05-128-12/+12
| | |
* | | pg, `change_column_default` accepts `[]`. Closes #11586.Yves Senn2014-05-121-1/+9
| | |
* | | pg, map `char` and `name` types as string. [dark-panda & Yves Senn]Yves Senn2014-05-121-0/+23
| | | | | | | | | | | | Closes #10802.
* | | pg, fix Infinity and NaN values conversion.Innokenty Mihailov2014-05-121-0/+7
| | | | | | | | | | | | Before this patch `Infinity`, `-Infinity` and `Nan` were read as `0`.
* | | test, regression test for unparsable PostgreSQL defaults.Yves Senn2014-05-081-0/+17
| | | | | | | | | | | | | | | This test was inspired by #14866. That PR would break this functionality and we should make sure we notice that in the future.
* | | test, reset changed state in PG's uuid tests.Yves Senn2014-05-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This resulted in some unrelated errors on Traivs: 1) Error: PostgresqlUUIDTest#test_treat_blank_uuid_as_nil: ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column "thingy" of relation "uuid_data_type" does not exist LINE 1: INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNIN... ^ : INSERT INTO "uuid_data_type" ("thingy") VALUES ($1) RETURNING "id" /cc @zuhao
* | | Merge branch 'master' into adequaterecordAaron Patterson2014-04-201-0/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (74 commits) [ci skip] builtin -> built-in Fix code indentation and improve formatting Grammar fix in Getting Started Guide Make URL escaping more consistent Optimize URI escaping Always escape string passed to url helper. Remove statement assuming coffee shop/public space wifi is inherently insecure Don't rely on Arel master in bug report template [ci skip] wrap methods in backticks [ci skip] "subhash" --> "sub-hash" multibyte_conformance.rb --> multibyte_conformance_test.rb Fix inconsistent behavior from String#first/#last `@destroyed` should always be set to `false` when an object is duped. remove warning `warning: ambiguous first argument; put parentheses or even spaces` :uglify -> :uglifier Regression test for irregular inflection on has_many Singularize association names before camelization Fix spelling and proper nouns Optimize select_value, select_values, select_rows and dry up checking whether to exec with cache for Postgresql adapter Include default rails protect_from_forgery with: :exception ... Conflicts: activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
| * | | Changed change_column in PG schema_statements.rb to make sure that the ↵Eric Chahin2014-04-151-0/+13
| | | | | | | | | | | | | | | | uuid_generate function was not being quoted.
* | | | Merge branch 'master' into adequaterecordAaron Patterson2014-04-145-7/+40
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (70 commits) [ci skip] Added link to ruby-lang.org installation. Use the index on hidden field `collection_check_boxes` respects `:index` option for the hidden filed name. docs, double meaning of `serialize` argument. Closes #14284. Just call read_attribute, no need to use `send`. - Fix lingering reference to `:text` instead of the newer `:plain` - Section references `form_tag` instead of the `form_for` used in the example again, read_attribute is public, so just call it read_attribute is public, so we should just call it Disable assest cache store in docs [ci skip] Make counter cache decrementation on destroy idempotent Write the failing test case for concurrent counter cache [ci skip] Use plain underscore instead of "\_". Update documentation to use Rails.application instead Add a changelog entry for #14546 [ci skip] Move tests for deep_dup and duplicable to object directory Missing 'are' in note - [ci skip] CollectionHelpers now accepts a readonly option Fix a few typos [ci skip] Bundle tzinfo-data on :x64_mingw (64-bit Ruby on Windows). don't bother with an offset if the offset is zero ...