Skip to content

fix: evaluate function defaults before enum/string normalization - #12508

Merged
alumni merged 7 commits into
typeorm:masterfrom
Cprakhar:fix/default-functions
Aug 26, 2026
Merged

alumni merged 7 commits into
typeorm:masterfrom
Cprakhar:fix/default-functions

Conversation

@Cprakhar

@Cprakhar Cprakhar commented May 17, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #12492

Description of change

This change updates normalizeDefault for (Postgres, CockroachDB, and MySQL) so that function-based defaults are handled earlier in the method flow.

What changed
In normalizeDefault method: moved typeof defaultValue === "function" branch above enum/string/number normalization branches

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • This pull request links relevant issues as Fixes #12492
  • There are new or updated tests validating the change (tests/**.test.ts)
  • Documentation has been updated to reflect this change (docs/docs/**.md) (N/A)

@pkg-pr-new

pkg-pr-new Bot commented May 17, 2026 •

Copy link
Copy Markdown
  • typeorm-sql-js-example

    npm i https://pkg.pr.new/typeorm@12508
    

commit: f954fc2

@Cprakhar
Cprakhar marked this pull request as ready for review May 18, 2026 00:30
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented May 18, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (2) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Issue test added under github-issues 📘 Rule violation ⚙ Maintainability
Description
The fix adds new coverage only under test/github-issues/12492, with no stated reason it cannot
live in the functional test suite. This violates the preference for functional tests for issue fixes
and can increase long-term maintenance burden.
Code

test/github-issues/12492/issue-12492.test.ts[R1-34]

+import { expect } from "chai"
+import type { DataSource } from "../../../src"
+import {
+    closeTestingConnections,
+    createTestingConnections,
+    reloadTestingDatabases,
+} from "../../utils/test-utils"
+
+describe("github issues > #12492 Postgres enum array column default callbacks are stringified instead of evaluated", () => {
+    let dataSources: DataSource[]
+    before(async () => {
+        dataSources = await createTestingConnections({
+            entities: [__dirname + "/entity/*{.js,.ts}"],
+            enabledDrivers: ["postgres", "cockroachdb"],
+            schemaCreate: true,
+            dropSchema: true,
+        })
+    })
+    beforeEach(() => reloadTestingDatabases(dataSources))
+    after(() => closeTestingConnections(dataSources))
+
+    it("should generate correct column definition for default as function", () =>
+        Promise.all(
+            dataSources.map(async (dataSource) => {
+                await using queryRunner = dataSource.createQueryRunner()
+                const table = (await queryRunner.getTable("single_enum"))!
+                const labels1Column = table.findColumnByName("labels1")
+                const labels2Column = table.findColumnByName("labels2")
+
+                expect(labels1Column!.default).to.equal("'VALUE2'")
+                expect(labels2Column!.default).to.equal("ARRAY[]")
+            }),
+        ))
+})
Evidence
PR Compliance ID 3 requires issue-fix coverage to be added/updated in test/functional rather than
in test/github-issues unless justified. This PR introduces the new test file under
test/github-issues/12492/, indicating the fix is only covered by a per-issue test.

Rule 3: Prefer functional tests over per-issue tests
test/github-issues/12492/issue-12492.test.ts[1-34]
test/github-issues/12492/entity/Enum.ts[1-30]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
New coverage for issue #12492 was added under `test/github-issues/12492`, but compliance requires issue fixes to live in `test/functional` unless there is a clear reason.
## Issue Context
The added test is currently scoped as a per-issue test (`github issues > #12492 ...`) and resides under `test/github-issues/`.
## Fix Focus Areas
- test/github-issues/12492/issue-12492.test.ts[1-34]
- test/github-issues/12492/entity/Enum.ts[1-30]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Postgres default compare mismatch 🐞 Bug ≡ Correctness
Description
PostgresDriver/CockroachDriver normalizeDefault now returns callback defaults verbatim (including
enum casts/qualifiers), but the corresponding QueryRunners strip those casts/type qualifiers when
reading column defaults, so defaultEqual sees a mismatch on every schema diff. This leads to
noisy/looping schema sync and migrations with repeated ALTER TABLE ... SET DEFAULT for casted enum
defaults (e.g. ARRAY[]::enum_def[]).
Code

src/driver/postgres/PostgresDriver.ts[R1215-1219]

+        if (typeof defaultValue === "function") {
+            const value = defaultValue()
+
+            return this.normalizeDatetimeFunction(value)
+        }
Evidence
The new test/entity pattern uses function (callback) defaults that return expressions containing
enum casts/qualifiers; the PostgresQueryRunner/CockroachQueryRunner logic that loads table metadata
normalizes column_default by stripping cast syntax (and, for CockroachDB, enum qualifiers), so the
persisted TableColumn.default is a stripped version of the original expression. Driver-side
defaultEqual compares normalizeDefault(columnMetadata)—which now returns the callback result
verbatim—to this stripped tableColumn.default, so casted/qualified enum defaults will never
compare equal and schema diffs will repeatedly report “default changed.”

test/github-issues/12492/entity/Enum.ts[11-29]
src/driver/postgres/PostgresDriver.ts[1204-1240]
src/driver/postgres/PostgresDriver.ts[1248-1271]
src/driver/postgres/PostgresDriver.ts[1476-1510]
src/driver/postgres/PostgresQueryRunner.ts[4079-4133]
src/driver/cockroachdb/CockroachDriver.ts[755-816]
src/driver/cockroachdb/CockroachDriver.ts[824-847]
src/driver/cockroachdb/CockroachQueryRunner.ts[3556-3596]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`PostgresDriver.normalizeDefault()` and `CockroachDriver.normalizeDefault()` now evaluate function defaults earlier and return the callback result verbatim (including enum casts/type qualifiers). However, `PostgresQueryRunner`/`CockroachQueryRunner` strip casts (and in CockroachDB also enum qualifiers) when loading `TableColumn.default`, and `defaultEqual()` compares the unstripped metadata default to the stripped DB default, causing perpetual “default changed” detection and repeated/noisy migrations (e.g. repeated `ALTER TABLE ... SET DEFAULT` for expressions like `ARRAY[]::enum_def[]`).
## Issue Context
This is triggered by patterns like the new test entity defaults where callbacks return casted/qualified enum defaults. The DB schema loaders normalize defaults by removing cast/type syntax, so comparisons must normalize both sides consistently; at the same time, casts may still be required for valid DDL generation (e.g., empty array defaults), so the fix should adjust comparison behavior rather than removing casts in `normalizeDefault`.
## Fix Focus Areas
- src/driver/postgres/PostgresDriver.ts[1204-1240]
- src/driver/postgres/PostgresDriver.ts[1248-1271]
- src/driver/postgres/PostgresQueryRunner.ts[4079-4133]
- src/driver/cockroachdb/CockroachDriver.ts[755-816]
- src/driver/cockroachdb/CockroachDriver.ts[824-847]
- src/driver/cockroachdb/CockroachQueryRunner.ts[3556-3596]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Docs omit default callbacks 📘 Rule violation ⚙ Maintainability
Description
This PR changes driver behavior to evaluate function-based column defaults and adds new usage of
default: () => ... for enum defaults, which is user-facing. The docs still describe @Column
option default as string, so the supported callback form and enum-default patterns are not
documented.
Code

test/github-issues/12492/entity/Enum.ts[R17-28]

+        default: () => "'VALUE2'::enum_def",
+    })
+    labels1: EnumDef
+
+    @Column({
+        type: "enum",
+        enum: enumDef,
+        enumName: "enum_def",
+        nullable: false,
+        array: true,
+        default: () => "ARRAY[]::enum_def[]",
+    })
Evidence
PR Compliance ID 2 requires docs to be updated for user-facing usage changes. The PR
introduces/relies on default callbacks in the new test entity and updates driver normalization to
evaluate defaultValue when it is a function, while the decorator reference still documents
default as string only.

Rule 2: Docs updated for user-facing changes
test/github-issues/12492/entity/Enum.ts[11-28]
src/driver/postgres/PostgresDriver.ts[1215-1219]
docs/docs/help/3-decorator-reference.md[131-147]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The documentation for `@Column` options describes `default` as `string`, but this PR relies on and adjusts behavior for function-based defaults (`default: () => ...`), especially for Postgres/Cockroach enum defaults.
## Issue Context
Without doc updates, users may not discover or correctly use callback defaults (including enum casts/array defaults), despite this PR making that behavior work.
## Fix Focus Areas
- docs/docs/help/3-decorator-reference.md[131-147]
- test/github-issues/12492/entity/Enum.ts[11-28]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. MySQL enum default rewritten ✓ Resolved 🐞 Bug ≡ Correctness
Description
MysqlDriver.normalizeDefault now evaluates callback defaults before enum/string normalization and
unconditionally runs the callback result through normalizeDatetimeFunction. If an enum default
callback returns a quoted literal containing "NOW"/"CURRENT_TIMESTAMP" (e.g. () => "'NOW'"), it will
be rewritten to CURRENT_TIMESTAMP, yielding an incorrect/invalid enum default during schema
create/sync.
Code

src/driver/mysql/MysqlDriver.ts[R828-831]

+        if (typeof defaultValue === "function") {
+            const value = defaultValue()
+            return this.normalizeDatetimeFunction(value)
+        }
Evidence
The new ordering sends evaluated callback results through normalizeDatetimeFunction, which
identifies datetime functions by substring match on the entire string (including quoted literals),
causing literals containing NOW to be rewritten.

src/driver/mysql/MysqlDriver.ts[821-859]
src/driver/mysql/MysqlDriver.ts[1289-1312]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`MysqlDriver.normalizeDefault()` now calls `normalizeDatetimeFunction()` on *all* evaluated callback defaults, including enum defaults. `normalizeDatetimeFunction()` treats any string containing `NOW` / `CURRENT_TIMESTAMP` as a datetime function, so quoted literals like `"'NOW'"` get rewritten to `CURRENT_TIMESTAMP`, corrupting enum defaults.
### Issue Context
- Callback defaults are allowed (`default?: any`) and used for enum defaults in this PR.
- `normalizeDatetimeFunction()` currently uses substring matching (`indexOf("NOW") !== -1`).
### Fix Focus Areas
- src/driver/mysql/MysqlDriver.ts[821-859]
- src/driver/mysql/MysqlDriver.ts[1289-1312]
### Suggested fix approach
- In `normalizeDefault()`, only apply `normalizeDatetimeFunction()` when the evaluated callback result is a **string** and matches a **strict function pattern** (e.g. `^\s*(CURRENT_TIMESTAMP|NOW)\b`), or only when the column type is a datetime/timestamp family.
- Otherwise return the callback result verbatim (string SQL fragment), preserving enum literals like `"'NOW'"`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Postgres callback type crash 🐞 Bug ☼ Reliability
Description
PostgresDriver.normalizeDefault evaluates default callbacks and unconditionally passes the result
into normalizeDatetimeFunction, which calls value.toUpperCase(). If the callback returns
undefined/null/non-string (allowed by ColumnOptions.default: any), schema creation/sync can throw a
TypeError instead of producing a normalized default.
Code

src/driver/postgres/PostgresDriver.ts[R1215-1219]

+        if (typeof defaultValue === "function") {
+            const value = defaultValue()
+
+            return this.normalizeDatetimeFunction(value)
+        }
Evidence
The driver now evaluates callback defaults here and forwards the value to a function that
unconditionally calls .toUpperCase(). Since ColumnOptions.default is any, non-string callback
returns are possible and will crash at runtime.

src/driver/postgres/PostgresDriver.ts[1215-1219]
src/driver/postgres/PostgresDriver.ts[1849-1852]
src/decorator/options/ColumnOptions.ts[50-54]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`PostgresDriver.normalizeDefault` assumes a function default returns a string and passes it into `normalizeDatetimeFunction`, which calls `.toUpperCase()`. If the callback returns `undefined`, `null`, or a non-string, schema generation/sync will throw a runtime `TypeError`.
## Issue Context
`ColumnOptions.default` is typed as `any`, so returning a non-string from a callback is currently possible at compile-time.
## Fix Focus Areas
- Add a guard around the evaluated callback result (handle null/undefined and non-string explicitly).
- Prefer throwing a clear `TypeORMError` (or similar) when the callback doesn’t return a string, to avoid silent bad SQL.
- src/driver/postgres/PostgresDriver.ts[1215-1219]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View review recommended (5)
6. Cockroach callback type crash 🐞 Bug ☼ Reliability
Description
CockroachDriver.normalizeDefault now evaluates default callbacks earlier and calls
value.toUpperCase() without verifying the callback returned a string. If the callback returns
undefined/null/non-string, schema creation/sync can throw a TypeError.
Code

src/driver/cockroachdb/CockroachDriver.ts[R762-770]

+        if (typeof defaultValue === "function") {
+            const value = defaultValue()
+            if (value.toUpperCase() === "CURRENT_TIMESTAMP") {
+                return "current_timestamp()"
+            } else if (value.toUpperCase() === "CURRENT_DATE") {
+                return "current_date()"
+            }
+            return value
+        }
Evidence
The code executes defaultValue() and immediately uses .toUpperCase() on the result; with
default typed as any, a non-string return will fail at runtime.

src/driver/cockroachdb/CockroachDriver.ts[755-770]
src/decorator/options/ColumnOptions.ts[50-54]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`CockroachDriver.normalizeDefault` calls `.toUpperCase()` on the evaluated callback return value without validating it’s a string, which can crash schema generation if the callback returns `undefined`, `null`, or a non-string.
## Issue Context
This PR moves the callback branch earlier, so enum defaults that previously got stringified now execute the callback and hit this string-only logic.
## Fix Focus Areas
- Validate `value` is a string before calling `.toUpperCase()`.
- Handle `null`/`undefined` by returning `undefined`.
- Consider throwing a clear error for non-string callback returns.
- src/driver/cockroachdb/CockroachDriver.ts[762-770]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


7. MySQL/Aurora change untested ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
This PR changes normalizeDefault ordering for MysqlDriver and AuroraMysqlDriver, but the added
regression test only runs against postgres and cockroachdb. That leaves the MySQL/Aurora behavior
change without direct test coverage, increasing the chance of shipping a driver-specific regression.
Code

test/github-issues/12492/issue-12492.test.ts[R12-17]

+        dataSources = await createTestingConnections({
+            entities: [__dirname + "/entity/*{.js,.ts}"],
+            enabledDrivers: ["postgres", "cockroachdb"],
+            schemaCreate: true,
+            dropSchema: true,
+        })
Evidence
The test explicitly restricts drivers to postgres/cockroach, while the PR diff includes
normalizeDefault changes in the MySQL and Aurora MySQL drivers.

test/github-issues/12492/issue-12492.test.ts[12-17]
src/driver/mysql/MysqlDriver.ts[821-840]
src/driver/aurora-mysql/AuroraMysqlDriver.ts[727-744]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new test suite only enables `postgres` and `cockroachdb`, but this PR also modifies `MysqlDriver` and `AuroraMysqlDriver`. A driver-specific regression in those code paths would not be caught.
## Issue Context
MySQL/Aurora enum defaults don’t use PG-style casts, so the exact assertions may differ; create a MySQL/Aurora-specific entity/test that verifies enum defaults provided as callbacks are not stringified (e.g., callback returns a SQL literal like `'VALUE2'`).
## Fix Focus Areas
- test/github-issues/12492/issue-12492.test.ts[12-17]
- src/driver/mysql/MysqlDriver.ts[828-840]
- src/driver/aurora-mysql/AuroraMysqlDriver.ts[734-744]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


8. EnumDef constant naming ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The new constant EnumDef uses PascalCase even though it is a runtime value, which is inconsistent
with the project’s prevailing camelCase naming for constants. This can reduce readability and
violates the consistent naming conventions requirement.
Code

test/github-issues/12492/entity/Enum.ts[R3-4]

+const EnumDef = ["VALUE1", "VALUE2"] as const
+type EnumDef = (typeof EnumDef)[number]
Evidence
The PR introduces a new PascalCase runtime constant EnumDef in the issue fixture, while similar
constants in existing tests use camelCase (e.g., databasesToTest), indicating an established
convention that this change deviates from.

Rule 1: Consistent Naming Conventions
test/github-issues/12492/entity/Enum.ts[3-4]
test/github-issues/8975/issue-8975.test.ts[7-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A runtime constant is introduced as `EnumDef` (PascalCase), which is typically reserved for types/classes; constants in this codebase commonly use camelCase.
## Issue Context
`EnumDef` is used as both a value and a type alias source, so renaming requires updating references.
## Fix Focus Areas
- test/github-issues/12492/entity/Enum.ts[3-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


9. Enum default mis-normalized ✓ Resolved 🐞 Bug ≡ Correctness
Description
PostgresDriver.normalizeDefault now routes enum default callbacks through normalizeDatetimeFunction,
which treats any value containing "CURRENT_TIMESTAMP" as a datetime function. A callback default
like () => "'CURRENT_TIMESTAMP'::my_enum" can be rewritten to "now()", yielding an invalid enum
default and breaking schema creation/sync.
Code

src/driver/postgres/PostgresDriver.ts[R1215-1219]

+        if (typeof defaultValue === "function") {
+            const value = defaultValue()
+
+            return this.normalizeDatetimeFunction(value)
+        }
Evidence
The new control flow evaluates callback defaults and passes their return value to datetime
normalization, and the datetime normalizer currently uses substring detection for CURRENT_TIMESTAMP
which can match inside quoted/casted enum expressions.

src/driver/postgres/PostgresDriver.ts[1204-1239]
src/driver/postgres/PostgresDriver.ts[1849-1885]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`PostgresDriver.normalizeDefault` evaluates callback defaults and passes the returned SQL string to `normalizeDatetimeFunction`. `normalizeDatetimeFunction` currently detects datetime functions using substring checks (e.g., `indexOf("CURRENT_TIMESTAMP") !== -1`), which can incorrectly match quoted literals/casted enum defaults like `"'CURRENT_TIMESTAMP'::enum_def"` and rewrite them to `now()`, producing an invalid default for enum columns.
### Issue Context
Callback defaults are used for raw SQL defaults (including enum casts), and this PR makes those callbacks run earlier. Datetime normalization should only apply when the entire expression is actually a datetime function call/keyword, not when the substring appears inside a larger expression or string literal.
### Fix Focus Areas
- src/driver/postgres/PostgresDriver.ts[1204-1239]
- src/driver/postgres/PostgresDriver.ts[1849-1885]
### Suggested approach
- Change `normalizeDatetimeFunction` to only normalize when the *trimmed* value matches an anchored pattern for the supported datetime functions (e.g., `^CURRENT_TIMESTAMP(\(\d+\))?$`, `^CURRENT_DATE$`, `^CURRENT_TIME(\(\d+\))?$`, `^LOCALTIMESTAMP(\(\d+\))?$`, `^LOCALTIME(\(\d+\))?$`) rather than substring checks.
- Optionally early-return without normalization when the expression contains quotes/casts (e.g., includes `'` or `::`) to avoid rewriting enum-literal defaults.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


10. Aurora enum defaults still stringified ✓ Resolved 🐞 Bug ≡ Correctness
Description
AuroraMysqlDriver.normalizeDefault still handles enum defaults before function defaults, so enum
defaults provided as callbacks will be converted to '${defaultValue}' and stringify the function
source rather than evaluating it. This leaves aurora-mysql behavior inconsistent with the MySQL fix
in this PR and keeps the original bug for Aurora users.
Code

src/driver/mysql/MysqlDriver.ts[R828-831]

+        if (typeof defaultValue === "function") {
+            const value = defaultValue()
+            return this.normalizeDatetimeFunction(value)
+        }
Evidence
MysqlDriver was updated in this PR to evaluate function defaults first; AuroraMysqlDriver still
checks enum types before functions and returns '${defaultValue}', which will stringify functions,
so the underlying bug remains for aurora-mysql.

src/driver/mysql/MysqlDriver.ts[821-859]
src/driver/aurora-mysql/AuroraMysqlDriver.ts[727-767]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
This PR fixes MySQL by evaluating function defaults before enum/string normalization to avoid stringifying callback functions. `AuroraMysqlDriver.normalizeDefault()` still returns `'${defaultValue}'` for enum types before checking for `typeof defaultValue === "function"`, so callback-based enum defaults remain broken for aurora-mysql.
### Issue Context
AuroraMysqlDriver has its own `normalizeDefault` implementation; it does not inherit the updated MySQL logic.
### Fix Focus Areas
- src/driver/aurora-mysql/AuroraMysqlDriver.ts[727-767]
### Implementation notes
- Move the `typeof defaultValue === "function"` branch above the enum/simple-enum branch (mirroring `MysqlDriver`).
- Consider using the same datetime normalization behavior as `MysqlDriver` (i.e., call `this.normalizeDatetimeFunction(value)` after invoking the callback) to keep driver behavior consistent.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

11. Enum column typed as array ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The new test entity defines labels1 with array: false but its TypeScript property type is
EnumDef[], which is misleading and risks future copy/paste mistakes in test fixtures.
Code

test/github-issues/12492/entity/Enum.ts[R11-20]

+    @Column({
+        type: "enum",
+        enum: EnumDef,
+        enumName: "enum_def",
+        nullable: false,
+        array: false,
+        default: () => "'VALUE2'::enum_def",
+    })
+    labels1: EnumDef[]
+
Evidence
The entity explicitly sets array: false for labels1 while declaring the property as an array
type.

test/github-issues/12492/entity/Enum.ts[11-29]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
In the new issue fixture entity, `labels1` is configured as a non-array enum column (`array: false`) but is typed as an array in TypeScript (`EnumDef[]`). This makes the fixture internally inconsistent and harder to understand/maintain.
### Issue Context
TypeORM won’t use the TS type at runtime here (because `type: "enum"` and `array` are explicitly provided), but the mismatch is confusing and can mislead future changes.
### Fix Focus Areas
- test/github-issues/12492/entity/Enum.ts[11-20]
### Suggested fix
- Change `labels1: EnumDef[]` to `labels1: EnumDef` (or change `array: false` to `true` if the intent was an array column).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


  • Author self-review: I have reviewed the code review findings, and addressed the relevant ones.

Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@alumni

alumni commented May 20, 2026

Copy link
Copy Markdown
Collaborator

@Cprakhar could you please take a look at Qodo's comments? Thanks :)

@alumni

alumni commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

@Cprakhar could you please take a look at Qodo's comments? Thanks :)

@Cprakhar I was thinking about the one about functional tests instead of per-issue tests :) I would also check the second point, it would be concerning if Qodo is right.

@Cprakhar

Cprakhar commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator Author

@alumni Qodo's second point can be tackled in a separate PR, it is probably the same with cockroachdb as well

@alumni

alumni commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

@alumni Qodo's second point can be tackled in a separate PR, it is probably the same with cockroachdb as well

well, I think Qodo might not be right on a first glance (hopefully we should have tests that prevent it), but if it is, it shouldn't be a separate PR.

@alumni
alumni merged commit c95b3bd into typeorm:master Aug 26, 2026
46 checks passed
@github-actions github-actions Bot added this to the 2.0.next milestone Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Postgres enum array column default callbacks are stringified instead of evaluated

3 participants