Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken migrations for indices on TIMESTAMP WITH TIMEZONE Oracle Database columns #10493

Closed
1 of 18 tasks
gabrielkim13 opened this issue Nov 17, 2023 · 0 comments · Fixed by #10506 · 4 remaining pull requests
Closed
1 of 18 tasks

Broken migrations for indices on TIMESTAMP WITH TIMEZONE Oracle Database columns #10493

gabrielkim13 opened this issue Nov 17, 2023 · 0 comments · Fixed by #10506 · 4 remaining pull requests

Comments

@gabrielkim13
Copy link
Contributor

Issue description

When creating indices for columns of type TIMESTAMP WITH TIMEZONE, on Oracle Database, a virtual column named 'SYS_NC0000*$' will be created in order for the DB to be able to index the actual column. Since the index will reference this virtual column, any further TypeORM migrations will be broken, attempting to: drop the index; drop the virtual column - which fails; re-create the previously dropped index.

Expected Behavior

After running the first migration, which creates the index on the TIMESTAMP WITH TIMEZONE column, further migrations shouldn't attempt to re-create it and just ignore the virtual column.

Actual Behavior

A second run of the MCVE will result in the following error:

❯ npm run start

> typeorm-mcve@0.0.1 start
> ts-node src/index.ts

QueryFailedError: ORA-00942: table or view does not exist
    at OracleQueryRunner.query (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:274:19)
    at async /home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:2576:49
    at async Promise.all (index 5)
    at async /home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:2385:33
    at async Promise.all (index 0)
    at async OracleQueryRunner.loadTables (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:2368:
16)
    at async OracleQueryRunner.getTables (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/query-runner/BaseQueryRunner.ts:158:29)
    at async RdbmsSchemaBuilder.build (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/schema-builder/RdbmsSchemaBuilder.ts:92:13)
    at async DataSource.synchronize (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/data-source/DataSource.ts:335:9)
    at async DataSource.initialize (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/data-source/DataSource.ts:273:43) {
  query: 'SELECT * FROM "TEST"."typeorm_metadata" "t" WHERE "type" = :1 AND "name" = :2 AND "table" = :3',
  parameters: [ 'GENERATED_COLUMN', 'SYS_NC00006$', 'user' ],
  driverError: Error: ORA-00942: table or view does not exist
      at async OracleQueryRunner.query (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:210:25)
      at async /home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:2576:49
      at async Promise.all (index 5)
      at async /home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:2385:33
      at async Promise.all (index 0)
      at async OracleQueryRunner.loadTables (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:236
8:16)
      at async OracleQueryRunner.getTables (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/query-runner/BaseQueryRunner.ts:158:29)
      at async RdbmsSchemaBuilder.build (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/schema-builder/RdbmsSchemaBuilder.ts:92:13
)
      at async DataSource.synchronize (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/data-source/DataSource.ts:335:9)
      at async DataSource.initialize (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/data-source/DataSource.ts:273:43) {
    errorNum: 942,
    offset: 21
  },
  errorNum: 942,
  offset: 21
}

Even after manually creating the "typeorm_metadata" table, the example will fail:

CREATE TABLE "typeorm_metadata" (
    "type" VARCHAR2(255) NOT NULL,
    "database" VARCHAR2(255) DEFAULT NULL,
    "schema" VARCHAR2(255) DEFAULT NULL,
    "table" VARCHAR2(255) DEFAULT NULL,
    "name" VARCHAR2(255) DEFAULT NULL,
    "value" CLOB
);
❯ npm run start

> typeorm-mcve@0.0.1 start
> ts-node src/index.ts

QueryFailedError: ORA-00904: "SYS_NC00006$": invalid identifier
    at OracleQueryRunner.query (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:274:19)
    at async OracleQueryRunner.executeQueries (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/query-runner/BaseQueryRunner.ts:659:
13)
    at async OracleQueryRunner.dropColumn (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:1693:
9)
    at async OracleQueryRunner.dropColumns (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:1707
:13)
    at async RdbmsSchemaBuilder.dropRemovedColumns (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/schema-builder/RdbmsSchemaBuild
er.ts:777:13)
    at async RdbmsSchemaBuilder.executeSchemaSyncOperationsInProperOrder (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/schema-bu
ilder/RdbmsSchemaBuilder.ts:225:9)
    at async RdbmsSchemaBuilder.build (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/schema-builder/RdbmsSchemaBuilder.ts:95:13)
    at async DataSource.synchronize (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/data-source/DataSource.ts:335:9)
    at async DataSource.initialize (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/data-source/DataSource.ts:273:43) {
  query: 'ALTER TABLE "user" DROP COLUMN "SYS_NC00006$"',
  parameters: undefined,
  driverError: Error: ORA-00904: "SYS_NC00006$": invalid identifier
      at async OracleQueryRunner.query (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:210:25)
      at async OracleQueryRunner.executeQueries (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/query-runner/BaseQueryRunner.ts:65
9:13)
      at async OracleQueryRunner.dropColumn (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:169
3:9)
      at async OracleQueryRunner.dropColumns (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/driver/oracle/OracleQueryRunner.ts:17
07:13)
      at async RdbmsSchemaBuilder.dropRemovedColumns (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/schema-builder/RdbmsSchemaBui
lder.ts:777:13)
      at async RdbmsSchemaBuilder.executeSchemaSyncOperationsInProperOrder (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/schema-
builder/RdbmsSchemaBuilder.ts:225:9)
      at async RdbmsSchemaBuilder.build (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/schema-builder/RdbmsSchemaBuilder.ts:95:13
)
      at async DataSource.synchronize (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/data-source/DataSource.ts:335:9)
      at async DataSource.initialize (/home/gabrielkim13/Desktop/github.com/gabrielkim13/typeorm-mcve/src/data-source/DataSource.ts:273:43) {
    errorNum: 904,
    offset: 31
  },
  errorNum: 904,
  offset: 31
}

Notice the error message: "ORA-00904: "SYS_NC00006$": invalid identifier" - TypeORM attempts to drop the virtual column, which fails.

Steps to reproduce

MCVE: https://github.com/gabrielkim13/typeorm-mcve/tree/oracle-timestamp-with-timezone-index

My Environment

Dependency Version
Operating System Ubuntu 22.04.3 LTS (WSL)
Node.js version 20.9.0
Typescript version 4.5.2
TypeORM version 0.3.17

Additional Context

When TypeORM lists a table's columns with:

SELECT *
FROM "ALL_TAB_COLS" "C"
WHERE ("C"."OWNER" = 'TEST' AND "C"."TABLE_NAME" = 'user')

image

The virtual column "SYS_NC00006$" shows up. Since it isn't explicitly declared on any schema, TypeORM will attempt to drop it on future migrations / schema syncs.

Furthermore, when it loads all indices with the following query:

SELECT "C"."INDEX_NAME",
       "C"."OWNER",
       "C"."TABLE_NAME",
       "C"."UNIQUENESS",
       LISTAGG("COL"."COLUMN_NAME", ',') WITHIN GROUP (ORDER BY "COL"."COLUMN_NAME") AS "COLUMN_NAMES"
FROM "ALL_INDEXES" "C"
         INNER JOIN "ALL_IND_COLUMNS" "COL"
                    ON "COL"."INDEX_OWNER" = "C"."OWNER" AND "COL"."INDEX_NAME" = "C"."INDEX_NAME"
         LEFT JOIN "ALL_CONSTRAINTS" "CON" ON "CON"."OWNER" = "C"."OWNER" AND "CON"."CONSTRAINT_NAME" = "C"."INDEX_NAME"
WHERE (("C"."OWNER" = 'TEST' AND "C"."TABLE_NAME" = 'user'))
  AND "CON"."CONSTRAINT_NAME" IS NULL
GROUP BY "C"."INDEX_NAME", "C"."OWNER", "C"."TABLE_NAME", "C"."UNIQUENESS";

The index references the virtual column:

image

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, and I know how to start.

gabrielkim13 added a commit to gabrielkim13/typeorm that referenced this issue Nov 19, 2023
ignore auto-generated virtual columns and attempt to map them into
their respective reference columns

Closes: typeorm#10493
AlexMesser pushed a commit that referenced this issue Dec 29, 2023
…10506)

ignore auto-generated virtual columns and attempt to map them into
their respective reference columns

Closes: #10493
Vylpes pushed a commit to Vylpes/card-drop that referenced this issue Jan 8, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [typeorm](https://typeorm.io) ([source](https://github.com/typeorm/typeorm)) | dependencies | patch | [`0.3.17` -> `0.3.19`](https://renovatebot.com/diffs/npm/typeorm/0.3.17/0.3.19) |

---

### Release Notes

<details>
<summary>typeorm/typeorm (typeorm)</summary>

### [`v0.3.19`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0319-2024-01-03)

[Compare Source](typeorm/typeorm@0.3.18...0.3.19)

##### Bug Fixes

-   fixed `Cannot read properties of undefined (reading 'sync')` caused after glob package upgrade

### [`v0.3.18`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0318-2024-01-03)

[Compare Source](typeorm/typeorm@0.3.17...0.3.18)

##### Bug Fixes

-   add BaseEntity to model-shim ([#&#8203;10503](typeorm/typeorm#10503)) ([3cf938e](typeorm/typeorm@3cf938e))
-   add error handling for missing join columns ([#&#8203;10525](typeorm/typeorm#10525)) ([122c897](typeorm/typeorm@122c897)), closes [#&#8203;7034](typeorm/typeorm#7034)
-   add missing export for View class ([#&#8203;10261](typeorm/typeorm#10261)) ([7adbc9b](typeorm/typeorm@7adbc9b))
-   added fail callback while opening the database in Cordova ([#&#8203;10566](typeorm/typeorm#10566)) ([8b4df5b](typeorm/typeorm@8b4df5b))
-   aggregate function throw error when column alias name is set ([#&#8203;10035](typeorm/typeorm#10035)) ([022d2b5](typeorm/typeorm@022d2b5)), closes [#&#8203;9927](typeorm/typeorm#9927)
-   backport postgres connection error handling to crdb ([#&#8203;10177](typeorm/typeorm#10177)) ([149226d](typeorm/typeorm@149226d))
-   bump better-sqlite3 version range ([#&#8203;10452](typeorm/typeorm#10452)) ([75ec8f2](typeorm/typeorm@75ec8f2))
-   caching always enabled not caching queries ([#&#8203;10524](typeorm/typeorm#10524)) ([8af533f](typeorm/typeorm@8af533f))
-   circular dependency breaking node.js 20.6 ([#&#8203;10344](typeorm/typeorm#10344)) ([ba7ad3c](typeorm/typeorm@ba7ad3c)), closes [#&#8203;10338](typeorm/typeorm#10338)
-   correctly keep query.data from ormOption for commit / rollback subscribers ([#&#8203;10151](typeorm/typeorm#10151)) ([73ee70b](typeorm/typeorm@73ee70b))
-   default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns ([#&#8203;10563](typeorm/typeorm#10563)) ([#&#8203;10564](typeorm/typeorm#10564)) ([af77a5d](typeorm/typeorm@af77a5d))
-   deletedAt column leaking as side effect of object update while creating a row ([#&#8203;10435](typeorm/typeorm#10435)) ([7de4890](typeorm/typeorm@7de4890))
-   empty objects being hydrated when eager loading relations that have a `@VirtualColumn` ([#&#8203;10432](typeorm/typeorm#10432)) ([b53e410](typeorm/typeorm@b53e410)), closes [#&#8203;10431](typeorm/typeorm#10431)
-   extend GiST index with range types for Postgres driver ([#&#8203;10572](typeorm/typeorm#10572)) ([a4900ae](typeorm/typeorm@a4900ae)), closes [#&#8203;10567](typeorm/typeorm#10567)
-   ignore changes for columns with `update: false` in persistence ([#&#8203;10250](typeorm/typeorm#10250)) ([f8fa1fd](typeorm/typeorm@f8fa1fd)), closes [#&#8203;10249](typeorm/typeorm#10249)
-   improve helper for cli for commands missing positionals ([#&#8203;10133](typeorm/typeorm#10133)) ([9f8899f](typeorm/typeorm@9f8899f))
-   loading datasource unable to process a regular default export ([#&#8203;10184](typeorm/typeorm#10184)) ([201342d](typeorm/typeorm@201342d)), closes [#&#8203;8810](typeorm/typeorm#8810)
-   logMigration has incorrect logging condition ([#&#8203;10323](typeorm/typeorm#10323)) ([d41930f](typeorm/typeorm@d41930f)), closes [#&#8203;10322](typeorm/typeorm#10322) [#&#8203;10322](typeorm/typeorm#10322)
-   ManyToMany ER_DUP_ENTRY error ([#&#8203;10343](typeorm/typeorm#10343)) ([e296063](typeorm/typeorm@e296063)), closes [#&#8203;5704](typeorm/typeorm#5704)
-   migrations on indexed TIMESTAMP WITH TIME ZONE Oracle columns ([#&#8203;10506](typeorm/typeorm#10506)) ([cf37f13](typeorm/typeorm@cf37f13)), closes [#&#8203;10493](typeorm/typeorm#10493)
-   mongodb - undefined is not constructor ([#&#8203;10559](typeorm/typeorm#10559)) ([ad5bf11](typeorm/typeorm@ad5bf11))
-   mongodb resolves leaked cursor ([#&#8203;10316](typeorm/typeorm#10316)) ([2dc9624](typeorm/typeorm@2dc9624)), closes [#&#8203;10315](typeorm/typeorm#10315)
-   mssql datasource testonborrow not affecting anything ([#&#8203;10589](typeorm/typeorm#10589)) ([122b683](typeorm/typeorm@122b683))
-   nested transactions issues ([#&#8203;10210](typeorm/typeorm#10210)) ([25e6ecd](typeorm/typeorm@25e6ecd))
-   prevent using absolute table path in migrations unless required ([#&#8203;10123](typeorm/typeorm#10123)) ([dd59524](typeorm/typeorm@dd59524))
-   remove `date-fns` in favor of `DayJs` ([#&#8203;10306](typeorm/typeorm#10306)) ([cf7147f](typeorm/typeorm@cf7147f))
-   remove dynamic require calls ([#&#8203;10196](typeorm/typeorm#10196)) ([a939654](typeorm/typeorm@a939654))
-   resolve circular dependency when using Vite ([#&#8203;10273](typeorm/typeorm#10273)) ([080528b](typeorm/typeorm@080528b))
-   resolve issue building eager relation alias for nested relations ([#&#8203;10004](typeorm/typeorm#10004)) ([c6f608d](typeorm/typeorm@c6f608d)), closes [#&#8203;9944](typeorm/typeorm#9944)
-   resolve issue of generating migration for numeric arrays repeatedly ([#&#8203;10471](typeorm/typeorm#10471)) ([39fdcf6](typeorm/typeorm@39fdcf6)), closes [#&#8203;10043](typeorm/typeorm#10043)
-   resolve issue queryBuilder makes different parameter identifiers for same parameter ([#&#8203;10327](typeorm/typeorm#10327)) ([6c918ea](typeorm/typeorm@6c918ea)), closes [#&#8203;7308](typeorm/typeorm#7308)
-   resolve issues on upsert ([#&#8203;10588](typeorm/typeorm#10588)) ([dc1bfed](typeorm/typeorm@dc1bfed)), closes [#&#8203;10587](typeorm/typeorm#10587)
-   scrub all comment end markers from comments ([#&#8203;10163](typeorm/typeorm#10163)) ([d937f61](typeorm/typeorm@d937f61))
-   serialize bigint when building a query id [#&#8203;10336](typeorm/typeorm#10336) ([#&#8203;10337](typeorm/typeorm#10337)) ([bfc1cc5](typeorm/typeorm@bfc1cc5))
-   should automatically cache if alwaysEnable ([#&#8203;10137](typeorm/typeorm#10137)) ([173910e](typeorm/typeorm@173910e)), closes [#&#8203;9910](typeorm/typeorm#9910)
-   SQLite simple-enum column parsing ([#&#8203;10550](typeorm/typeorm#10550)) ([696e688](typeorm/typeorm@696e688))
-   update UpdateDateColumn on upsert ([#&#8203;10458](typeorm/typeorm#10458)) ([fdb9866](typeorm/typeorm@fdb9866)), closes [#&#8203;9015](typeorm/typeorm#9015)
-   upgrade ts-node version to latest(10.9.1) version ([#&#8203;10143](typeorm/typeorm#10143)) ([fcb9904](typeorm/typeorm@fcb9904))
-   using async datasource to configure typeorm ([#&#8203;10170](typeorm/typeorm#10170)) ([fbd45db](typeorm/typeorm@fbd45db))

##### Features

-   ability to change default replication mode ([#&#8203;10419](typeorm/typeorm#10419)) ([72b1d1b](typeorm/typeorm@72b1d1b))
-   add concurrent indexes for postgres ([#&#8203;10442](typeorm/typeorm#10442)) ([f4e6eaf](typeorm/typeorm@f4e6eaf))
-   add exists and exists by ([#&#8203;10291](typeorm/typeorm#10291)) ([b6b46fb](typeorm/typeorm@b6b46fb))
-   add isolated where statements ([#&#8203;10213](typeorm/typeorm#10213)) ([3cda7ec](typeorm/typeorm@3cda7ec))
-   add MSSQL disableAsciiToUnicodeParamConversion option and tests ([#&#8203;10161](typeorm/typeorm#10161)) ([df7c069](typeorm/typeorm@df7c069)), closes [#&#8203;10131](typeorm/typeorm#10131)
-   add support for mssql server DefaultAzureCredential usage ([#&#8203;10246](typeorm/typeorm#10246)) ([c8ee5b1](typeorm/typeorm@c8ee5b1))
-   add support for table comment in MySQL ([#&#8203;10017](typeorm/typeorm#10017)) ([338df16](typeorm/typeorm@338df16))
-   allow to use custom type witch extends object type for find where argument ([#&#8203;10475](typeorm/typeorm#10475)) ([48f5f85](typeorm/typeorm@48f5f85))
-   BeforeQuery and AfterQuery events ([#&#8203;10234](typeorm/typeorm#10234)) ([5c28154](typeorm/typeorm@5c28154)), closes [#&#8203;3302](typeorm/typeorm#3302)
-   custom STI discriminator value for EntitySchema ([#&#8203;10508](typeorm/typeorm#10508)) ([b240d87](typeorm/typeorm@b240d87)), closes [#&#8203;10494](typeorm/typeorm#10494)
-   enabled CTE for oracle driver ([#&#8203;10319](typeorm/typeorm#10319)) ([65858f3](typeorm/typeorm@65858f3))
-   entityId in InsertEvent ([#&#8203;10540](typeorm/typeorm#10540)) ([ae006af](typeorm/typeorm@ae006af))
-   expose countDocuments in mongodb ([#&#8203;10314](typeorm/typeorm#10314)) ([ebd61d1](typeorm/typeorm@ebd61d1))
-   exposed entity and criteria properties on EntityNotFoundError ([#&#8203;10202](typeorm/typeorm#10202)) ([bafcd17](typeorm/typeorm@bafcd17))
-   implement column comments for SAP HANA ([#&#8203;10502](typeorm/typeorm#10502)) ([45e31cc](typeorm/typeorm@45e31cc))
-   implement OR operator ([#&#8203;10086](typeorm/typeorm#10086)) ([a00b1df](typeorm/typeorm@a00b1df)), closes [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054)
-   implement streaming for SAP HANA ([#&#8203;10512](typeorm/typeorm#10512)) ([7e9cead](typeorm/typeorm@7e9cead))
-   implements QueryFailedError generic for driverError typing ([#&#8203;10253](typeorm/typeorm#10253)) ([78b2f48](typeorm/typeorm@78b2f48))
-   modify repository.extend method for chaining repositories ([#&#8203;10256](typeorm/typeorm#10256)) ([ca29c0f](typeorm/typeorm@ca29c0f))
-   nullable embedded entities ([#&#8203;10289](typeorm/typeorm#10289)) ([e67d704](typeorm/typeorm@e67d704))
-   support for MongoDB 6.x ([#&#8203;10545](typeorm/typeorm#10545)) ([3647b26](typeorm/typeorm@3647b26))
-   support mssql@10 ([#&#8203;10356](typeorm/typeorm#10356)) ([f6bb671](typeorm/typeorm@f6bb671)), closes [#&#8203;10340](typeorm/typeorm#10340)
-   use node-oracledb 6 ([#&#8203;10285](typeorm/typeorm#10285)) ([3af891a](typeorm/typeorm@3af891a)), closes [#&#8203;10277](typeorm/typeorm#10277)
-   user-defined index name for STI discriminator column ([#&#8203;10509](typeorm/typeorm#10509)) ([89c5257](typeorm/typeorm@89c5257)), closes [#&#8203;10496](typeorm/typeorm#10496)

##### Performance Improvements

-   improve SapQueryRunner performance ([#&#8203;10198](typeorm/typeorm#10198)) ([f6b87e3](typeorm/typeorm@f6b87e3))

##### BREAKING CHANGES

-   With node-oracledb the thin client is used as default. Added a option to use the thick client. Also added the option to specify the instant client lib
-   MongoDB: from the previous behavior of returning a result with metadata describing when a document is not found.
    See: https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES\_6.0.0.md
-   [new nullable embeds feature](typeorm/typeorm#10289) introduced a breaking change which might enforce you to update types on your entities to `  | null `,
    if all columns in your embed entity are nullable. Since database queries now return embedded property as `null` if all its column values are null.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/External/card-drop/pulls/136
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
Vylpes pushed a commit to Vylpes/vylbot-app that referenced this issue Jan 31, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [typeorm](https://typeorm.io) ([source](https://github.com/typeorm/typeorm)) | dependencies | patch | [`0.3.17` -> `0.3.20`](https://renovatebot.com/diffs/npm/typeorm/0.3.17/0.3.20) |

---

### Release Notes

<details>
<summary>typeorm/typeorm (typeorm)</summary>

### [`v0.3.20`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0320-2024-01-26)

[Compare Source](typeorm/typeorm@0.3.19...0.3.20)

##### Bug Fixes

-   added missing parentheses in where conditions ([#&#8203;10650](typeorm/typeorm#10650)) ([4624930](typeorm/typeorm@4624930)), closes [#&#8203;10534](typeorm/typeorm#10534)
-   don't escape indexPredicate ([#&#8203;10618](typeorm/typeorm#10618)) ([dd49a25](typeorm/typeorm@dd49a25))
-   fallback runMigrations transaction to DataSourceOptions ([#&#8203;10601](typeorm/typeorm#10601)) ([0cab0dd](typeorm/typeorm@0cab0dd))
-   hangup when load relations with relationLoadStrategy: query ([#&#8203;10630](typeorm/typeorm#10630)) ([54d8d9e](typeorm/typeorm@54d8d9e)), closes [#&#8203;10481](typeorm/typeorm#10481)
-   include asExpression columns in returning clause ([#&#8203;10632](typeorm/typeorm#10632)) ([f232ba7](typeorm/typeorm@f232ba7)), closes [#&#8203;8450](typeorm/typeorm#8450) [#&#8203;8450](typeorm/typeorm#8450)
-   multiple insert in SAP Hana ([#&#8203;10597](typeorm/typeorm#10597)) ([1b34c9a](typeorm/typeorm@1b34c9a))
-   resolve issue CREATE/DROP Index concurrently ([#&#8203;10634](typeorm/typeorm#10634)) ([8aa8690](typeorm/typeorm@8aa8690)), closes [#&#8203;10626](typeorm/typeorm#10626)
-   type inferencing of EntityManager#create ([#&#8203;10569](typeorm/typeorm#10569)) ([99d8249](typeorm/typeorm@99d8249))

##### Features

-   add json type support for Oracle ([#&#8203;10611](typeorm/typeorm#10611)) ([7e85460](typeorm/typeorm@7e85460))
-   add postgres multirange column types ([#&#8203;10627](typeorm/typeorm#10627)) ([d0b7670](typeorm/typeorm@d0b7670)), closes [#&#8203;10556](typeorm/typeorm#10556)
-   add table comment for postgres ([#&#8203;10613](typeorm/typeorm#10613)) ([4493db4](typeorm/typeorm@4493db4))

##### Reverts

-   Revert "fix: prevent using absolute table path in migrations unless required ([#&#8203;10123](typeorm/typeorm#10123))" ([#&#8203;10624](typeorm/typeorm#10624)) ([8f371f2](typeorm/typeorm@8f371f2)), closes [#&#8203;10123](typeorm/typeorm#10123) [#&#8203;10624](typeorm/typeorm#10624)
-   revert "feat: nullable embedded entities ([#&#8203;10289](typeorm/typeorm#10289))" ([#&#8203;10614](typeorm/typeorm#10614)) ([15de46f](typeorm/typeorm@15de46f)), closes [#&#8203;10289](typeorm/typeorm#10289) [#&#8203;10614](typeorm/typeorm#10614)

### [`v0.3.19`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0319-2024-01-03)

[Compare Source](typeorm/typeorm@0.3.18...0.3.19)

##### Bug Fixes

-   fixed `Cannot read properties of undefined (reading 'sync')` caused after glob package upgrade

### [`v0.3.18`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0318-2024-01-03)

[Compare Source](typeorm/typeorm@0.3.17...0.3.18)

##### Bug Fixes

-   add BaseEntity to model-shim ([#&#8203;10503](typeorm/typeorm#10503)) ([3cf938e](typeorm/typeorm@3cf938e))
-   add error handling for missing join columns ([#&#8203;10525](typeorm/typeorm#10525)) ([122c897](typeorm/typeorm@122c897)), closes [#&#8203;7034](typeorm/typeorm#7034)
-   add missing export for View class ([#&#8203;10261](typeorm/typeorm#10261)) ([7adbc9b](typeorm/typeorm@7adbc9b))
-   added fail callback while opening the database in Cordova ([#&#8203;10566](typeorm/typeorm#10566)) ([8b4df5b](typeorm/typeorm@8b4df5b))
-   aggregate function throw error when column alias name is set ([#&#8203;10035](typeorm/typeorm#10035)) ([022d2b5](typeorm/typeorm@022d2b5)), closes [#&#8203;9927](typeorm/typeorm#9927)
-   backport postgres connection error handling to crdb ([#&#8203;10177](typeorm/typeorm#10177)) ([149226d](typeorm/typeorm@149226d))
-   bump better-sqlite3 version range ([#&#8203;10452](typeorm/typeorm#10452)) ([75ec8f2](typeorm/typeorm@75ec8f2))
-   caching always enabled not caching queries ([#&#8203;10524](typeorm/typeorm#10524)) ([8af533f](typeorm/typeorm@8af533f))
-   circular dependency breaking node.js 20.6 ([#&#8203;10344](typeorm/typeorm#10344)) ([ba7ad3c](typeorm/typeorm@ba7ad3c)), closes [#&#8203;10338](typeorm/typeorm#10338)
-   correctly keep query.data from ormOption for commit / rollback subscribers ([#&#8203;10151](typeorm/typeorm#10151)) ([73ee70b](typeorm/typeorm@73ee70b))
-   default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns ([#&#8203;10563](typeorm/typeorm#10563)) ([#&#8203;10564](typeorm/typeorm#10564)) ([af77a5d](typeorm/typeorm@af77a5d))
-   deletedAt column leaking as side effect of object update while creating a row ([#&#8203;10435](typeorm/typeorm#10435)) ([7de4890](typeorm/typeorm@7de4890))
-   empty objects being hydrated when eager loading relations that have a `@VirtualColumn` ([#&#8203;10432](typeorm/typeorm#10432)) ([b53e410](typeorm/typeorm@b53e410)), closes [#&#8203;10431](typeorm/typeorm#10431)
-   extend GiST index with range types for Postgres driver ([#&#8203;10572](typeorm/typeorm#10572)) ([a4900ae](typeorm/typeorm@a4900ae)), closes [#&#8203;10567](typeorm/typeorm#10567)
-   ignore changes for columns with `update: false` in persistence ([#&#8203;10250](typeorm/typeorm#10250)) ([f8fa1fd](typeorm/typeorm@f8fa1fd)), closes [#&#8203;10249](typeorm/typeorm#10249)
-   improve helper for cli for commands missing positionals ([#&#8203;10133](typeorm/typeorm#10133)) ([9f8899f](typeorm/typeorm@9f8899f))
-   loading datasource unable to process a regular default export ([#&#8203;10184](typeorm/typeorm#10184)) ([201342d](typeorm/typeorm@201342d)), closes [#&#8203;8810](typeorm/typeorm#8810)
-   logMigration has incorrect logging condition ([#&#8203;10323](typeorm/typeorm#10323)) ([d41930f](typeorm/typeorm@d41930f)), closes [#&#8203;10322](typeorm/typeorm#10322) [#&#8203;10322](typeorm/typeorm#10322)
-   ManyToMany ER_DUP_ENTRY error ([#&#8203;10343](typeorm/typeorm#10343)) ([e296063](typeorm/typeorm@e296063)), closes [#&#8203;5704](typeorm/typeorm#5704)
-   migrations on indexed TIMESTAMP WITH TIME ZONE Oracle columns ([#&#8203;10506](typeorm/typeorm#10506)) ([cf37f13](typeorm/typeorm@cf37f13)), closes [#&#8203;10493](typeorm/typeorm#10493)
-   mongodb - undefined is not constructor ([#&#8203;10559](typeorm/typeorm#10559)) ([ad5bf11](typeorm/typeorm@ad5bf11))
-   mongodb resolves leaked cursor ([#&#8203;10316](typeorm/typeorm#10316)) ([2dc9624](typeorm/typeorm@2dc9624)), closes [#&#8203;10315](typeorm/typeorm#10315)
-   mssql datasource testonborrow not affecting anything ([#&#8203;10589](typeorm/typeorm#10589)) ([122b683](typeorm/typeorm@122b683))
-   nested transactions issues ([#&#8203;10210](typeorm/typeorm#10210)) ([25e6ecd](typeorm/typeorm@25e6ecd))
-   prevent using absolute table path in migrations unless required ([#&#8203;10123](typeorm/typeorm#10123)) ([dd59524](typeorm/typeorm@dd59524))
-   remove `date-fns` in favor of `DayJs` ([#&#8203;10306](typeorm/typeorm#10306)) ([cf7147f](typeorm/typeorm@cf7147f))
-   remove dynamic require calls ([#&#8203;10196](typeorm/typeorm#10196)) ([a939654](typeorm/typeorm@a939654))
-   resolve circular dependency when using Vite ([#&#8203;10273](typeorm/typeorm#10273)) ([080528b](typeorm/typeorm@080528b))
-   resolve issue building eager relation alias for nested relations ([#&#8203;10004](typeorm/typeorm#10004)) ([c6f608d](typeorm/typeorm@c6f608d)), closes [#&#8203;9944](typeorm/typeorm#9944)
-   resolve issue of generating migration for numeric arrays repeatedly ([#&#8203;10471](typeorm/typeorm#10471)) ([39fdcf6](typeorm/typeorm@39fdcf6)), closes [#&#8203;10043](typeorm/typeorm#10043)
-   resolve issue queryBuilder makes different parameter identifiers for same parameter ([#&#8203;10327](typeorm/typeorm#10327)) ([6c918ea](typeorm/typeorm@6c918ea)), closes [#&#8203;7308](typeorm/typeorm#7308)
-   resolve issues on upsert ([#&#8203;10588](typeorm/typeorm#10588)) ([dc1bfed](typeorm/typeorm@dc1bfed)), closes [#&#8203;10587](typeorm/typeorm#10587)
-   scrub all comment end markers from comments ([#&#8203;10163](typeorm/typeorm#10163)) ([d937f61](typeorm/typeorm@d937f61))
-   serialize bigint when building a query id [#&#8203;10336](typeorm/typeorm#10336) ([#&#8203;10337](typeorm/typeorm#10337)) ([bfc1cc5](typeorm/typeorm@bfc1cc5))
-   should automatically cache if alwaysEnable ([#&#8203;10137](typeorm/typeorm#10137)) ([173910e](typeorm/typeorm@173910e)), closes [#&#8203;9910](typeorm/typeorm#9910)
-   SQLite simple-enum column parsing ([#&#8203;10550](typeorm/typeorm#10550)) ([696e688](typeorm/typeorm@696e688))
-   update UpdateDateColumn on upsert ([#&#8203;10458](typeorm/typeorm#10458)) ([fdb9866](typeorm/typeorm@fdb9866)), closes [#&#8203;9015](typeorm/typeorm#9015)
-   upgrade ts-node version to latest(10.9.1) version ([#&#8203;10143](typeorm/typeorm#10143)) ([fcb9904](typeorm/typeorm@fcb9904))
-   using async datasource to configure typeorm ([#&#8203;10170](typeorm/typeorm#10170)) ([fbd45db](typeorm/typeorm@fbd45db))

##### Features

-   ability to change default replication mode ([#&#8203;10419](typeorm/typeorm#10419)) ([72b1d1b](typeorm/typeorm@72b1d1b))
-   add concurrent indexes for postgres ([#&#8203;10442](typeorm/typeorm#10442)) ([f4e6eaf](typeorm/typeorm@f4e6eaf))
-   add exists and exists by ([#&#8203;10291](typeorm/typeorm#10291)) ([b6b46fb](typeorm/typeorm@b6b46fb))
-   add isolated where statements ([#&#8203;10213](typeorm/typeorm#10213)) ([3cda7ec](typeorm/typeorm@3cda7ec))
-   add MSSQL disableAsciiToUnicodeParamConversion option and tests ([#&#8203;10161](typeorm/typeorm#10161)) ([df7c069](typeorm/typeorm@df7c069)), closes [#&#8203;10131](typeorm/typeorm#10131)
-   add support for mssql server DefaultAzureCredential usage ([#&#8203;10246](typeorm/typeorm#10246)) ([c8ee5b1](typeorm/typeorm@c8ee5b1))
-   add support for table comment in MySQL ([#&#8203;10017](typeorm/typeorm#10017)) ([338df16](typeorm/typeorm@338df16))
-   allow to use custom type witch extends object type for find where argument ([#&#8203;10475](typeorm/typeorm#10475)) ([48f5f85](typeorm/typeorm@48f5f85))
-   BeforeQuery and AfterQuery events ([#&#8203;10234](typeorm/typeorm#10234)) ([5c28154](typeorm/typeorm@5c28154)), closes [#&#8203;3302](typeorm/typeorm#3302)
-   custom STI discriminator value for EntitySchema ([#&#8203;10508](typeorm/typeorm#10508)) ([b240d87](typeorm/typeorm@b240d87)), closes [#&#8203;10494](typeorm/typeorm#10494)
-   enabled CTE for oracle driver ([#&#8203;10319](typeorm/typeorm#10319)) ([65858f3](typeorm/typeorm@65858f3))
-   entityId in InsertEvent ([#&#8203;10540](typeorm/typeorm#10540)) ([ae006af](typeorm/typeorm@ae006af))
-   expose countDocuments in mongodb ([#&#8203;10314](typeorm/typeorm#10314)) ([ebd61d1](typeorm/typeorm@ebd61d1))
-   exposed entity and criteria properties on EntityNotFoundError ([#&#8203;10202](typeorm/typeorm#10202)) ([bafcd17](typeorm/typeorm@bafcd17))
-   implement column comments for SAP HANA ([#&#8203;10502](typeorm/typeorm#10502)) ([45e31cc](typeorm/typeorm@45e31cc))
-   implement OR operator ([#&#8203;10086](typeorm/typeorm#10086)) ([a00b1df](typeorm/typeorm@a00b1df)), closes [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054)
-   implement streaming for SAP HANA ([#&#8203;10512](typeorm/typeorm#10512)) ([7e9cead](typeorm/typeorm@7e9cead))
-   implements QueryFailedError generic for driverError typing ([#&#8203;10253](typeorm/typeorm#10253)) ([78b2f48](typeorm/typeorm@78b2f48))
-   modify repository.extend method for chaining repositories ([#&#8203;10256](typeorm/typeorm#10256)) ([ca29c0f](typeorm/typeorm@ca29c0f))
-   nullable embedded entities ([#&#8203;10289](typeorm/typeorm#10289)) ([e67d704](typeorm/typeorm@e67d704))
-   support for MongoDB 6.x ([#&#8203;10545](typeorm/typeorm#10545)) ([3647b26](typeorm/typeorm@3647b26))
-   support mssql@10 ([#&#8203;10356](typeorm/typeorm#10356)) ([f6bb671](typeorm/typeorm@f6bb671)), closes [#&#8203;10340](typeorm/typeorm#10340)
-   use node-oracledb 6 ([#&#8203;10285](typeorm/typeorm#10285)) ([3af891a](typeorm/typeorm@3af891a)), closes [#&#8203;10277](typeorm/typeorm#10277)
-   user-defined index name for STI discriminator column ([#&#8203;10509](typeorm/typeorm#10509)) ([89c5257](typeorm/typeorm@89c5257)), closes [#&#8203;10496](typeorm/typeorm#10496)

##### Performance Improvements

-   improve SapQueryRunner performance ([#&#8203;10198](typeorm/typeorm#10198)) ([f6b87e3](typeorm/typeorm@f6b87e3))

##### BREAKING CHANGES

-   With node-oracledb the thin client is used as default. Added a option to use the thick client. Also added the option to specify the instant client lib
-   MongoDB: from the previous behavior of returning a result with metadata describing when a document is not found.
    See: https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES\_6.0.0.md
-   [new nullable embeds feature](typeorm/typeorm#10289) introduced a breaking change which might enforce you to update types on your entities to `  | null `,
    if all columns in your embed entity are nullable. Since database queries now return embedded property as `null` if all its column values are null.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/395
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
Vylpes pushed a commit to Vylpes/Droplet that referenced this issue Apr 10, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [typeorm](https://typeorm.io) ([source](https://github.com/typeorm/typeorm)) | dependencies | patch | [`0.3.17` -> `0.3.20`](https://renovatebot.com/diffs/npm/typeorm/0.3.17/0.3.20) |

---

### Release Notes

<details>
<summary>typeorm/typeorm (typeorm)</summary>

### [`v0.3.20`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0320-2024-01-26)

[Compare Source](typeorm/typeorm@0.3.19...0.3.20)

##### Bug Fixes

-   added missing parentheses in where conditions ([#&#8203;10650](typeorm/typeorm#10650)) ([4624930](typeorm/typeorm@4624930)), closes [#&#8203;10534](typeorm/typeorm#10534)
-   don't escape indexPredicate ([#&#8203;10618](typeorm/typeorm#10618)) ([dd49a25](typeorm/typeorm@dd49a25))
-   fallback runMigrations transaction to DataSourceOptions ([#&#8203;10601](typeorm/typeorm#10601)) ([0cab0dd](typeorm/typeorm@0cab0dd))
-   hangup when load relations with relationLoadStrategy: query ([#&#8203;10630](typeorm/typeorm#10630)) ([54d8d9e](typeorm/typeorm@54d8d9e)), closes [#&#8203;10481](typeorm/typeorm#10481)
-   include asExpression columns in returning clause ([#&#8203;10632](typeorm/typeorm#10632)) ([f232ba7](typeorm/typeorm@f232ba7)), closes [#&#8203;8450](typeorm/typeorm#8450) [#&#8203;8450](typeorm/typeorm#8450)
-   multiple insert in SAP Hana ([#&#8203;10597](typeorm/typeorm#10597)) ([1b34c9a](typeorm/typeorm@1b34c9a))
-   resolve issue CREATE/DROP Index concurrently ([#&#8203;10634](typeorm/typeorm#10634)) ([8aa8690](typeorm/typeorm@8aa8690)), closes [#&#8203;10626](typeorm/typeorm#10626)
-   type inferencing of EntityManager#create ([#&#8203;10569](typeorm/typeorm#10569)) ([99d8249](typeorm/typeorm@99d8249))

##### Features

-   add json type support for Oracle ([#&#8203;10611](typeorm/typeorm#10611)) ([7e85460](typeorm/typeorm@7e85460))
-   add postgres multirange column types ([#&#8203;10627](typeorm/typeorm#10627)) ([d0b7670](typeorm/typeorm@d0b7670)), closes [#&#8203;10556](typeorm/typeorm#10556)
-   add table comment for postgres ([#&#8203;10613](typeorm/typeorm#10613)) ([4493db4](typeorm/typeorm@4493db4))

##### Reverts

-   Revert "fix: prevent using absolute table path in migrations unless required ([#&#8203;10123](typeorm/typeorm#10123))" ([#&#8203;10624](typeorm/typeorm#10624)) ([8f371f2](typeorm/typeorm@8f371f2)), closes [#&#8203;10123](typeorm/typeorm#10123) [#&#8203;10624](typeorm/typeorm#10624)
-   revert "feat: nullable embedded entities ([#&#8203;10289](typeorm/typeorm#10289))" ([#&#8203;10614](typeorm/typeorm#10614)) ([15de46f](typeorm/typeorm@15de46f)), closes [#&#8203;10289](typeorm/typeorm#10289) [#&#8203;10614](typeorm/typeorm#10614)

### [`v0.3.19`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0319-2024-01-03)

[Compare Source](typeorm/typeorm@0.3.18...0.3.19)

##### Bug Fixes

-   fixed `Cannot read properties of undefined (reading 'sync')` caused after glob package upgrade

### [`v0.3.18`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0318-2024-01-03)

[Compare Source](typeorm/typeorm@0.3.17...0.3.18)

##### Bug Fixes

-   add BaseEntity to model-shim ([#&#8203;10503](typeorm/typeorm#10503)) ([3cf938e](typeorm/typeorm@3cf938e))
-   add error handling for missing join columns ([#&#8203;10525](typeorm/typeorm#10525)) ([122c897](typeorm/typeorm@122c897)), closes [#&#8203;7034](typeorm/typeorm#7034)
-   add missing export for View class ([#&#8203;10261](typeorm/typeorm#10261)) ([7adbc9b](typeorm/typeorm@7adbc9b))
-   added fail callback while opening the database in Cordova ([#&#8203;10566](typeorm/typeorm#10566)) ([8b4df5b](typeorm/typeorm@8b4df5b))
-   aggregate function throw error when column alias name is set ([#&#8203;10035](typeorm/typeorm#10035)) ([022d2b5](typeorm/typeorm@022d2b5)), closes [#&#8203;9927](typeorm/typeorm#9927)
-   backport postgres connection error handling to crdb ([#&#8203;10177](typeorm/typeorm#10177)) ([149226d](typeorm/typeorm@149226d))
-   bump better-sqlite3 version range ([#&#8203;10452](typeorm/typeorm#10452)) ([75ec8f2](typeorm/typeorm@75ec8f2))
-   caching always enabled not caching queries ([#&#8203;10524](typeorm/typeorm#10524)) ([8af533f](typeorm/typeorm@8af533f))
-   circular dependency breaking node.js 20.6 ([#&#8203;10344](typeorm/typeorm#10344)) ([ba7ad3c](typeorm/typeorm@ba7ad3c)), closes [#&#8203;10338](typeorm/typeorm#10338)
-   correctly keep query.data from ormOption for commit / rollback subscribers ([#&#8203;10151](typeorm/typeorm#10151)) ([73ee70b](typeorm/typeorm@73ee70b))
-   default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns ([#&#8203;10563](typeorm/typeorm#10563)) ([#&#8203;10564](typeorm/typeorm#10564)) ([af77a5d](typeorm/typeorm@af77a5d))
-   deletedAt column leaking as side effect of object update while creating a row ([#&#8203;10435](typeorm/typeorm#10435)) ([7de4890](typeorm/typeorm@7de4890))
-   empty objects being hydrated when eager loading relations that have a `@VirtualColumn` ([#&#8203;10432](typeorm/typeorm#10432)) ([b53e410](typeorm/typeorm@b53e410)), closes [#&#8203;10431](typeorm/typeorm#10431)
-   extend GiST index with range types for Postgres driver ([#&#8203;10572](typeorm/typeorm#10572)) ([a4900ae](typeorm/typeorm@a4900ae)), closes [#&#8203;10567](typeorm/typeorm#10567)
-   ignore changes for columns with `update: false` in persistence ([#&#8203;10250](typeorm/typeorm#10250)) ([f8fa1fd](typeorm/typeorm@f8fa1fd)), closes [#&#8203;10249](typeorm/typeorm#10249)
-   improve helper for cli for commands missing positionals ([#&#8203;10133](typeorm/typeorm#10133)) ([9f8899f](typeorm/typeorm@9f8899f))
-   loading datasource unable to process a regular default export ([#&#8203;10184](typeorm/typeorm#10184)) ([201342d](typeorm/typeorm@201342d)), closes [#&#8203;8810](typeorm/typeorm#8810)
-   logMigration has incorrect logging condition ([#&#8203;10323](typeorm/typeorm#10323)) ([d41930f](typeorm/typeorm@d41930f)), closes [#&#8203;10322](typeorm/typeorm#10322) [#&#8203;10322](typeorm/typeorm#10322)
-   ManyToMany ER_DUP_ENTRY error ([#&#8203;10343](typeorm/typeorm#10343)) ([e296063](typeorm/typeorm@e296063)), closes [#&#8203;5704](typeorm/typeorm#5704)
-   migrations on indexed TIMESTAMP WITH TIME ZONE Oracle columns ([#&#8203;10506](typeorm/typeorm#10506)) ([cf37f13](typeorm/typeorm@cf37f13)), closes [#&#8203;10493](typeorm/typeorm#10493)
-   mongodb - undefined is not constructor ([#&#8203;10559](typeorm/typeorm#10559)) ([ad5bf11](typeorm/typeorm@ad5bf11))
-   mongodb resolves leaked cursor ([#&#8203;10316](typeorm/typeorm#10316)) ([2dc9624](typeorm/typeorm@2dc9624)), closes [#&#8203;10315](typeorm/typeorm#10315)
-   mssql datasource testonborrow not affecting anything ([#&#8203;10589](typeorm/typeorm#10589)) ([122b683](typeorm/typeorm@122b683))
-   nested transactions issues ([#&#8203;10210](typeorm/typeorm#10210)) ([25e6ecd](typeorm/typeorm@25e6ecd))
-   prevent using absolute table path in migrations unless required ([#&#8203;10123](typeorm/typeorm#10123)) ([dd59524](typeorm/typeorm@dd59524))
-   remove `date-fns` in favor of `DayJs` ([#&#8203;10306](typeorm/typeorm#10306)) ([cf7147f](typeorm/typeorm@cf7147f))
-   remove dynamic require calls ([#&#8203;10196](typeorm/typeorm#10196)) ([a939654](typeorm/typeorm@a939654))
-   resolve circular dependency when using Vite ([#&#8203;10273](typeorm/typeorm#10273)) ([080528b](typeorm/typeorm@080528b))
-   resolve issue building eager relation alias for nested relations ([#&#8203;10004](typeorm/typeorm#10004)) ([c6f608d](typeorm/typeorm@c6f608d)), closes [#&#8203;9944](typeorm/typeorm#9944)
-   resolve issue of generating migration for numeric arrays repeatedly ([#&#8203;10471](typeorm/typeorm#10471)) ([39fdcf6](typeorm/typeorm@39fdcf6)), closes [#&#8203;10043](typeorm/typeorm#10043)
-   resolve issue queryBuilder makes different parameter identifiers for same parameter ([#&#8203;10327](typeorm/typeorm#10327)) ([6c918ea](typeorm/typeorm@6c918ea)), closes [#&#8203;7308](typeorm/typeorm#7308)
-   resolve issues on upsert ([#&#8203;10588](typeorm/typeorm#10588)) ([dc1bfed](typeorm/typeorm@dc1bfed)), closes [#&#8203;10587](typeorm/typeorm#10587)
-   scrub all comment end markers from comments ([#&#8203;10163](typeorm/typeorm#10163)) ([d937f61](typeorm/typeorm@d937f61))
-   serialize bigint when building a query id [#&#8203;10336](typeorm/typeorm#10336) ([#&#8203;10337](typeorm/typeorm#10337)) ([bfc1cc5](typeorm/typeorm@bfc1cc5))
-   should automatically cache if alwaysEnable ([#&#8203;10137](typeorm/typeorm#10137)) ([173910e](typeorm/typeorm@173910e)), closes [#&#8203;9910](typeorm/typeorm#9910)
-   SQLite simple-enum column parsing ([#&#8203;10550](typeorm/typeorm#10550)) ([696e688](typeorm/typeorm@696e688))
-   update UpdateDateColumn on upsert ([#&#8203;10458](typeorm/typeorm#10458)) ([fdb9866](typeorm/typeorm@fdb9866)), closes [#&#8203;9015](typeorm/typeorm#9015)
-   upgrade ts-node version to latest(10.9.1) version ([#&#8203;10143](typeorm/typeorm#10143)) ([fcb9904](typeorm/typeorm@fcb9904))
-   using async datasource to configure typeorm ([#&#8203;10170](typeorm/typeorm#10170)) ([fbd45db](typeorm/typeorm@fbd45db))

##### Features

-   ability to change default replication mode ([#&#8203;10419](typeorm/typeorm#10419)) ([72b1d1b](typeorm/typeorm@72b1d1b))
-   add concurrent indexes for postgres ([#&#8203;10442](typeorm/typeorm#10442)) ([f4e6eaf](typeorm/typeorm@f4e6eaf))
-   add exists and exists by ([#&#8203;10291](typeorm/typeorm#10291)) ([b6b46fb](typeorm/typeorm@b6b46fb))
-   add isolated where statements ([#&#8203;10213](typeorm/typeorm#10213)) ([3cda7ec](typeorm/typeorm@3cda7ec))
-   add MSSQL disableAsciiToUnicodeParamConversion option and tests ([#&#8203;10161](typeorm/typeorm#10161)) ([df7c069](typeorm/typeorm@df7c069)), closes [#&#8203;10131](typeorm/typeorm#10131)
-   add support for mssql server DefaultAzureCredential usage ([#&#8203;10246](typeorm/typeorm#10246)) ([c8ee5b1](typeorm/typeorm@c8ee5b1))
-   add support for table comment in MySQL ([#&#8203;10017](typeorm/typeorm#10017)) ([338df16](typeorm/typeorm@338df16))
-   allow to use custom type witch extends object type for find where argument ([#&#8203;10475](typeorm/typeorm#10475)) ([48f5f85](typeorm/typeorm@48f5f85))
-   BeforeQuery and AfterQuery events ([#&#8203;10234](typeorm/typeorm#10234)) ([5c28154](typeorm/typeorm@5c28154)), closes [#&#8203;3302](typeorm/typeorm#3302)
-   custom STI discriminator value for EntitySchema ([#&#8203;10508](typeorm/typeorm#10508)) ([b240d87](typeorm/typeorm@b240d87)), closes [#&#8203;10494](typeorm/typeorm#10494)
-   enabled CTE for oracle driver ([#&#8203;10319](typeorm/typeorm#10319)) ([65858f3](typeorm/typeorm@65858f3))
-   entityId in InsertEvent ([#&#8203;10540](typeorm/typeorm#10540)) ([ae006af](typeorm/typeorm@ae006af))
-   expose countDocuments in mongodb ([#&#8203;10314](typeorm/typeorm#10314)) ([ebd61d1](typeorm/typeorm@ebd61d1))
-   exposed entity and criteria properties on EntityNotFoundError ([#&#8203;10202](typeorm/typeorm#10202)) ([bafcd17](typeorm/typeorm@bafcd17))
-   implement column comments for SAP HANA ([#&#8203;10502](typeorm/typeorm#10502)) ([45e31cc](typeorm/typeorm@45e31cc))
-   implement OR operator ([#&#8203;10086](typeorm/typeorm#10086)) ([a00b1df](typeorm/typeorm@a00b1df)), closes [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054) [#&#8203;10054](typeorm/typeorm#10054)
-   implement streaming for SAP HANA ([#&#8203;10512](typeorm/typeorm#10512)) ([7e9cead](typeorm/typeorm@7e9cead))
-   implements QueryFailedError generic for driverError typing ([#&#8203;10253](typeorm/typeorm#10253)) ([78b2f48](typeorm/typeorm@78b2f48))
-   modify repository.extend method for chaining repositories ([#&#8203;10256](typeorm/typeorm#10256)) ([ca29c0f](typeorm/typeorm@ca29c0f))
-   nullable embedded entities ([#&#8203;10289](typeorm/typeorm#10289)) ([e67d704](typeorm/typeorm@e67d704))
-   support for MongoDB 6.x ([#&#8203;10545](typeorm/typeorm#10545)) ([3647b26](typeorm/typeorm@3647b26))
-   support mssql@10 ([#&#8203;10356](typeorm/typeorm#10356)) ([f6bb671](typeorm/typeorm@f6bb671)), closes [#&#8203;10340](typeorm/typeorm#10340)
-   use node-oracledb 6 ([#&#8203;10285](typeorm/typeorm#10285)) ([3af891a](typeorm/typeorm@3af891a)), closes [#&#8203;10277](typeorm/typeorm#10277)
-   user-defined index name for STI discriminator column ([#&#8203;10509](typeorm/typeorm#10509)) ([89c5257](typeorm/typeorm@89c5257)), closes [#&#8203;10496](typeorm/typeorm#10496)

##### Performance Improvements

-   improve SapQueryRunner performance ([#&#8203;10198](typeorm/typeorm#10198)) ([f6b87e3](typeorm/typeorm@f6b87e3))

##### BREAKING CHANGES

-   With node-oracledb the thin client is used as default. Added a option to use the thick client. Also added the option to specify the instant client lib
-   MongoDB: from the previous behavior of returning a result with metadata describing when a document is not found.
    See: https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES\_6.0.0.md
-   [new nullable embeds feature](typeorm/typeorm#10289) introduced a breaking change which might enforce you to update types on your entities to `  | null `,
    if all columns in your embed entity are nullable. Since database queries now return embedded property as `null` if all its column values are null.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/Droplet/pulls/258
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment