| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Fixes #19389.
|
|
|
|
|
| |
Lowercase raw SQL has been replaced by 07b659c already. This commit
replaces everything else of raw SQL.
|
|
|
|
|
| |
This predicate is only used in `query_attribute`, and is relatively easy
to remove without adding a bunch of is a checks.
|
|
|
|
| |
onwards.
|
|
|
|
|
|
| |
Remaining are `limit`, `precision`, `scale`, and `type` (the symbol
version). These will remain on the column, since they mirror the options
to the `column` method in the schema definition DSL
|
|
|
|
|
|
| |
Slightly refactoring `PostgreSQLColumn`. `array` should be readonly.
`default_function` should be initialized by `super`. `sql_type` has been
removed `[]`. Since we already choose to remove it we should not change.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
If we want to have type decorators mess with the attribute, but not the
column, we need to stop type casting on the column. Where possible, we
changed the tests to test the value of `column_defaults`, which is
public API. `Column#default` is not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
That data is internal to Active Record. What we care about is that
new records have the right default value.
|
|
|
|
|
| |
This is an intermediate solution. It is related to the refactoring @sgrif
is making and will change in the future.
|
|
|
|
| |
[Yves Senn & Matthew Draper]
|
| |
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Related - https://github.com/rails/rails/commit/5c55aafd38f45ac019573f98438ffdbdc8c580f9
|
| |
|
|
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.
|