5213 Commits

Author SHA1 Message Date
sinopsysHK
197cc05e90
fix: prevent foreign key support during migration batch under sqlite (#9775)
* fix: prevent foreign keys support during migration batch under sqlite

Schema changes in migrations batch cannot be done on table which has referring
 foreign keys with ON DELETE CASCADE without deleting its content.

Closes: #9770

* Update MigrationExecutor.ts

* Update command.ts

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2023-04-06 13:12:10 +05:00
Nguyen Ba Hung
4ac8c00117
feat: add support for json datatype for sqlite (#9744) 2023-04-06 12:31:46 +05:00
Joe Mizzi
a8689795da
fix: use object create if entity skip constructor is set (#9831) 2023-04-06 12:26:00 +05:00
Gabriel Kim
bc306fb5a2
feat: add support for STI on EntitySchema (#9834)
* feat: add support for STI on EntitySchema

Closes: #9833

* fix: run prettier

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2023-04-06 12:23:45 +05:00
Alexander Kraev
97280fc825
docs: update migrations docs (#9828) 2023-04-06 11:59:35 +05:00
dmytroboiko
bebba05388
fix: proper default value on generating migration when default value is a function calling [Postgres] (#9830)
Co-authored-by: Dmytro Boiko <dmitriy.b@tracktica.com>
2023-04-06 11:49:25 +05:00
Daniel Huth
f7f6817864
fix: improve EntityNotFound error message in QueryBuilder.findOneOrFail (#9872)
* fix: EntityNotFound error message in QueryBuilder.findOneOrFail

* change test

* change test

* change test
2023-04-06 11:34:00 +05:00
GP4cK
4997da054b
fix: loading tables with fk in sqlite query runner (#9875)
Closes: #9266
2023-04-06 11:31:32 +05:00
Leon Miller-Out
0619aca174
test: when calling AVG on an integer column, MS SQL Server returns an int. (#9784)
In this case, 50 instead of 50.5. Apparently the ANSI standard for SQL
is silent on this issue, so either behavior should be considered
acceptable.
2023-04-06 11:15:16 +05:00
Philipp Dyck
f530811b0d
feat: Broadcast identifier for removed related entities (#9913)
* Initial commit

* Pending changes exported from your codespace

* Revert changes

* Fix format
2023-04-06 11:13:16 +05:00
Dmitry Zotov
af4f15c5aa fixing failing test 2023-04-06 10:57:00 +05:00
Dylan Seago
0814970a9c
feat: allow type FindOptionsOrderValue for order by object property (#9895) (#9896)
When using an Entity column transformer for an object type, the underlying database column may be
sortable, despite the static TypeScript type being an object. The `FindOptionsOrder` typing
should allow sorting on that object property and not require further nesting.

Fixes issue #9895.
2023-04-06 10:51:17 +05:00
ertl
07221a3646
fix: resolves issue with mssql column recreation (#9773)
* fix: resolves issue with mssql column recreation when length max is in lower case

Closes: #9399

* removed redundant question mark

---------

Co-authored-by: ke <ke@sbs.co.at>
2023-04-05 21:13:57 +05:00
ertl
cb154d4ca3
fix: resolve issues for mssql migration when simple-enum was changed
* fix: resolve issues for mssql migration when simple-enum was changed

- Changes are now detected
- Incorrect update Statement was split into a DROP CONSTRAINT and ADD CONSTRAINT Statement

Closes: #7785 #9457

* fix: resolve issues for mssql migration when simple-enum was changed

- Changes are now detected
- Incorrect update Statement was split into a DROP CONSTRAINT and ADD CONSTRAINT Statement

Closes: #7785 #9457

* code refactoring;
changed `enumName` usage to generated name;
improvements in test;

---------

Co-authored-by: ke <ke@sbs.co.at>
Co-authored-by: Alex Messer <dmzt08@gmail.com>
2023-04-05 21:12:29 +05:00
dependabot[bot]
4fa14e396a
build(deps): bump jsonwebtoken and mssql (#9700)
Bumps [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) to 9.0.0 and updates ancestor dependency [mssql](https://github.com/tediousjs/node-mssql). These dependencies need to be updated together.


Updates `jsonwebtoken` from 8.5.1 to 9.0.0
- [Release notes](https://github.com/auth0/node-jsonwebtoken/releases)
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/auth0/node-jsonwebtoken/compare/v8.5.1...v9.0.0)

Updates `mssql` from 7.3.0 to 9.0.1
- [Release notes](https://github.com/tediousjs/node-mssql/releases)
- [Changelog](https://github.com/tediousjs/node-mssql/blob/master/CHANGELOG.txt)
- [Commits](https://github.com/tediousjs/node-mssql/compare/v7.3.0...v9.0.1)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-type: indirect
- dependency-name: mssql
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-05 16:45:53 +05:00
jdgjsag67251
1fcd9f3884
refactor: remove date-fns package (#9634)
* refactor: remove date-fns

Since TypeORM only uses one function from the date-fns library
it is unnecessary to install this large package.

* refactor: add DateUtils.parseDateAsISO

* refactor: reintroduced comment
2023-04-05 16:29:25 +05:00
JT Smith
98f22052be
docs: added a documentation section on debugging query builder (#9846)
* Added a section on debugging query builder

It covers using getQuery() and getQueryAndParameters() which are both useful when trying to figure out why your query isn't doing what you might expect it should do.

* forgot await

* fix typo
2023-04-05 15:55:10 +05:00
Peter Hostačný
e0e7d2c125
docs: update many-to-many-relations.md (#9861)
Fixing typescript code.
2023-04-05 15:51:10 +05:00
Ihor Levchenko
3f1142b5de
docs: update relations-faq (#9879)
Proposed a better safe-type workaround for circular dependencies.
2023-04-05 15:46:58 +05:00
JT Smith
f7b210bedb
docs: documented getCount() method (#9847)
* documented getCount()

getCount() is currently only mentioned in the documentation once, and you're never shown how to use it. This patch adds a little documentation for getCount()

* clarification
2023-04-05 15:42:30 +05:00
0x269
58fc08840a
fix: use forward slashes when normalizing path (#9768)
Fixes #9766
2023-02-09 21:31:44 +05:00
Umed Khudoiberdiev
099fcd9b10
fix: react-native doesn't properly work in ESM projects because of circular dependency (#9765) 2023-02-07 21:27:15 +05:00
Umed Khudoiberdiev
f07bdd0dac version bump 0.3.12 2023-02-07 19:53:47 +05:00
कारतोफ्फेलस्क्रिप्ट™
7d1f1d6958
feat: support for SQL aggregate functions SUM, AVG, MIN, and MAX to the Repository API (#9737)
* feat: Add support for SQL aggregate functions SUM, AVG, MIN, and MAX to the Repository API

* rename field name to make tests work in oracle

* fix the comments

* update the docs

* escape column name

* address PR comment

* format the code
2023-02-07 19:01:04 +05:00
Umed Khudoiberdiev
4555211bcb
feat: update mssql dependency and other dependencies as well (#9763)
* updating dependencies

* fixing circleci config

* reverting mongodb version back

* increasing cli commands test timeout
2023-02-07 18:20:09 +05:00
Christian Forgács
12fdd73e25
refactor: use abstract logger to reduce duplicate code (#9751)
* feat(platform-tools): add more logging functions

* refactor(logger): add `AbstractLogger` to reduce duplicate code

---------

Co-authored-by: Christian Forgács <christian@wunderbit.de>
2023-02-07 17:34:37 +05:00
Dmitry Zotov
9bd3a641cc removed unnecessary .js extension in imports 2023-02-07 17:18:19 +05:00
ZBAGI
54ca9dd801
fix: incorrect sorting of entities with multi-inheritances (#9406)
* Fixed sorting of entities with multi-inheritances

* prettier

* added test case

---------

Co-authored-by: Alex Messer <dmzt08@gmail.com>
2023-02-07 15:42:32 +05:00
Umed Khudoiberdiev
adce6985d8
Revert "fix: add support for mongodb v4 (#9450)" (#9762)
This reverts commit 8150525354a7a66e68152ef7bd894ad93266d2af.
2023-02-07 13:08:41 +05:00
Matheus Melo Antiquera
8150525354
fix: add support for mongodb v4 (#9450)
* fix: add support for mongodb driver v4

This new fix allow support to mongodb driver v4

Closes: #7907

* fix: add support for mongodb driver v4
This new fix allow support to mongodb driver v4

Closes: #7907

---------

Co-authored-by: Matheus Melo Antiquera <matheusantiquera@finchsolucoes.com.br>
2023-02-07 12:57:35 +05:00
Khaled Sameer
b3b0c118a4
fix: Incorrect enum default value when table name contains dash character (#9685)
* fix: get enum default value

* chore: format
2023-02-07 12:55:56 +05:00
Dmitry Zotov
7c00bb8e0e fixed wrong callback definition in tests 2023-02-07 12:51:06 +05:00
Aritz
8731858fbc
feat: support enableWal for the better-sqlite3 driver (#9619) 2023-02-07 12:44:36 +05:00
StefanZivkovic
c418aae39a
docs: update cli related docs (#9659)
- remove cli.entitiesDir description
- remove cli.subscribersDir description
- remove cli from Data Source Options example
- extend migration:run examples with -- -d path-to-datasource-config
- extend migration:revert examples with -- -d path-to-datasource-config
- extend migration:show examples with -- -d path-to-datasource-config
- extend migration:create examples with path-to-migrations-dir/migrationName

Co-authored-by: Stefan <stefi@sprintingsoftware.com>
2023-02-07 12:34:37 +05:00
ISary-ge
d2f37f6e72
feat: add find operator json contains (#9665)
* feature: add find operator json contains

* add test

---------

Co-authored-by: Игорь Сары <isary@MacBook-Pro-Igor.local>
Co-authored-by: dzvyagin <dzvyagin@team.amocrm.com>
2023-02-07 12:33:18 +05:00
Filip Wróbel
0eb74411d6
feat: naming strategy for legacy Oracle (#9703)
* feat: naming strategy for legacy Oracle

This feature is LegacyOracleNamingStrategy which can be used to handle Oracle error ORA-00972.

* feat: naming strategy for legacy Oracle

This feature is LegacyOracleNamingStrategy which can be used to handle Oracle error ORA-00972.
2023-02-07 11:58:09 +05:00
PronDmytro
7df2ccf69d
fix: sql expression when where parameter is empty array (#9691)
Closes: #9690

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2023-02-06 22:15:32 +05:00
Toshinori Tsugita
7726f5ad1e
fix: improved FindOptionsWhere behavior with union types (#9607)
* test: add test that where condition can accepts LessThan with Union

* fix: allow FindOptionsWhere to accept LessThan with Union

* added comment and simplified the type

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2023-02-06 21:28:36 +05:00
Vista1nik
c77c43e242
fix: resolve issue with "simple-enum" synchronization in SQLite (#9716)
* fix: resolve issue with "simple-enum" in sqlite

Closes: #9715

* trying to re-trigger CircleCI tests

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2023-02-06 18:36:34 +05:00
Kilian Finger
b8704f87d2
fix: redundant Unique constraint on primary join column in Postgres (#9677)
* test: one migration for PrimaryColumn and JoinColumn in pg

* fix: stop postgres from creating unique on PrimaryColumn with JoinColumn
2023-02-06 18:28:07 +05:00
Umed Khudoiberdiev
1a9b9fbcd6 fix: make sure "require" is defined in the environment 2023-02-06 15:59:00 +05:00
Dev Aggarwal
6c9010e466
feat: allow mysql2 v3 as peerDependency (#9747)
Closes #9714
2023-02-06 15:53:50 +05:00
Vítor L. Brasil
ca315f0ad2
docs: Fix grammar error in the first paragraph. (#9759)
docs: Fix grammar (verbal agreement) error in the first paragraph.
2023-02-06 02:28:57 +05:00
Josh Heng
6fb212187f
fix: Fix grammar error in no migrations found log (#9754) 2023-02-05 13:31:28 +05:00
dependabot[bot]
63ab05fca1
build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#9758)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-05 13:16:05 +05:00
Zeeshan Haider Khan
c669f50bdd
docs: update many-to-many-relations.md (#9736) 2023-01-28 21:00:14 +05:00
Pavel Kolpakov
4df969ea62
fix: overriding caching settings when alwaysEnabled is true (#9731)
* 9023-2 Fix cache overriding option

* 9023-2 Fix format
2023-01-28 19:52:00 +05:00
Filip Wróbel
ef64bfc6c5
test: update multiple nested embedded entities (#9696)
* test: update multiple nested embedded entities

Closes: #1200

* test: update multiple nested embedded entities - fix for ORA-00972 - shorter names

Closes: #1200

* test: correct test name for issue 1200

Closes: #1200
2023-01-28 16:11:10 +05:00
Lukas Spiss
b937ae4afd
test: Add test to prove that issue #2331 is resolved (#9688) 2023-01-28 16:07:55 +05:00
Filip Wróbel
de84014509
chore: add *.iml to .gitignore (#9707) 2023-01-28 16:03:13 +05:00