aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/enum_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "test pg, we don't care about the internal state of `column#default`."Yves Senn2014-06-031-0/+1
| | | | | | | | | | | | | | Revert "test pg, remove unused column assignments. Follow up to 254cdf47" Related to #15492 This reverts commit 254cdf4728291277f3fbaa854f34495030e476b4. This reverts commit 4bcf9029452e0c760af04faab6b549710401e8cf. There are public methods that assume `Column#default` is type casted. The return value of `Column#default` is publicly relevant and should not change. /cc @sgrif
* test pg, we don't care about the internal state of `column#default`.Yves Senn2014-06-031-1/+0
| | | | | That data is internal to Active Record. What we care about is that new records have the right default value.
* 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.
* PostgreSQL, adapter automatically reloads it's type map. Closes #14678.Yves Senn2014-04-111-2/+0
| | | | [Yves Senn & Matthew Draper]
* Add ConnectionHelper to refactor tests.Guo Xiang Tan2014-04-031-3/+3
|
* Allow postgresql enum_test to be run in random order.Guo Xiang Tan2014-04-011-5/+9
| | | | Creating and dropping similar tables within the same connection causes postgresql to look up old values in the cache of tables which have already been dropped.
* PostgreSQL determine `Column#type` through corresponding OID. #7814Yves Senn2014-04-011-2/+1
| | | | | | | | | | | | | 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.
* PostgreSQL, test cases to lock the current column types.Yves Senn2014-03-281-0/+11
|
* Use teardown helper method.Guo Xiang Tan2014-03-141-1/+1
| | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14348 Ensure that SQLCounter.clear_log is called after each test. This is a step to prevent side effects when running tests. This will allow us to run them in random order.
* Inline block to fix indent [ci skip]Carlos Antonio da Silva2014-03-041-3/+1
|
* Fix enum test unused variable warning.Vipul A M2014-03-041-1/+1
| | | | Related - https://github.com/rails/rails/commit/5c55aafd38f45ac019573f98438ffdbdc8c580f9
* Add Enum type to postgresql adapter's oids to prevent unknown OID warnings.Dieter Komendera2014-03-041-0/+28
|
* test case for custom PostgreSQL enum type.Yves Senn2014-02-261-0/+38
This test currently outputs the following warning: ``` unknown OID: current_mood(3567879) (SELECT "postgresql_enums".* FROM "postgresql_enums" ORDER BY "postgresql_enums"."id" ASC LIMIT 1) unknown OID: current_mood(3567879) (SELECT "postgresql_enums".* FROM "postgresql_enums" WHERE "postgresql_enums"."id" = $1 LIMIT 1) ``` We have an open PR to deal with this issue. It will dynamically register the OID for enum columns. This test case is merely to exhibit the current behavior of PostgreSQL enum columns.