994 Commits

Author SHA1 Message Date
Shunsuke Mano
4c42fa2520
Fix(seed:run): irregular seed file execution order (#4156) 2020-12-11 13:18:03 +02:00
Mark Boyd
76c131e2a9
Add support for WHERE clauses to "upsert" queries (#4148) 2020-12-09 17:51:29 +02:00
Rijk van Zanten
b7e1ffd7d5
Add support for dropForeign in SQLite (#4092)
Co-authored-by: Igor Savin <iselwin@gmail.com>
2020-12-08 14:49:41 +02:00
Nico Burns
8d43019873
Implement "UPSERT" (Postgres/MySQL/Sqlite) (#3763) 2020-10-31 17:22:52 +02:00
Igor Savin
26f3e5d62d
Replace uuid with copied nanoid logic (#4089) 2020-10-30 14:21:17 +02:00
Emil Wihlander
b099852032
fix help text being printed twice (#4072) (#4082)
Co-authored-by: Igor Savin <iselwin@gmail.com>
2020-10-29 23:41:59 +02:00
Igor Savin
3246c1f9fa
Add missing event propagation (#4087) 2020-10-29 12:02:03 +02:00
Ivan Zhuravlev
5845dc632f
feat(QueryBuilder): add method clear(statement) (#4051) 2020-10-29 01:18:32 +02:00
torres-federico
69167b6fa9
Oracle: replace user_tab_columns with all_tab_columns (#4061) 2020-10-28 22:42:24 +02:00
Igor Savin
e52c5d6c6b
Make toQuery behavior consistent with pre-0.21.7 (#4083)
fixes https://github.com/mikro-orm/mikro-orm/issues/961
2020-10-27 10:09:22 +02:00
Igor Savin
20629af916
Fix comment escaping for MySQL and PostgreSQL (#4084) 2020-10-27 10:05:21 +02:00
Kkmatt11
4edd56f156
MSSQL '?' solution (#4053)
Escape properly if literal '?' is needed.
2020-10-26 20:39:12 +02:00
poliha
d3df4eb360
add migration stub for .cjs extension (#4065) 2020-10-24 17:56:09 +03:00
Jamie Peabody
8faaf9ce27
fixes apostrophe issue on mssql dialect (#4077)
Co-authored-by: Jamie Peabody <jpeabody@axway.com>
2020-10-24 17:55:02 +03:00
Jamie Peabody
162cf2ebcf
Fixes build issue related to Node.js 14 (#4078)
Co-authored-by: Jamie Peabody <jpeabody@axway.com>
2020-10-24 16:54:45 +03:00
Bogdan Chadkin
80355e4850
Replace inherits package with builtin utility (#4059) 2020-10-05 23:59:12 +03:00
Guilherme Covre Dalleprane
975b5a919e
Ensure that semicolon is not appended to statements that already end with a semicolon (#4052) 2020-10-05 21:35:22 +03:00
Bogdan Chadkin
6f817a3b6e
Avoid lodash typecheks (#4056)
* Avoid lodash typecheks

Lodash is quite big project. Even with direct imports it loads [tons](https://github.com/knex/knex/pull/3804) of
code and still bloats node_modules. Especially since lodash mostly used
as a polyfill for modern features.

In this diff I attempted to reduce lodash usage by replacing type checks
with `typeof` operator which might be sufficient.

Also replaced lodash/isObject with custom simplified utility which does not
consider functions as objects and allows to simplify code in one place.
2020-10-05 21:29:39 +03:00
Mr D
be8a5715a3
Expected error message changed, Node v14.13.0 changed parsing error wording (#4055)
Co-authored-by: D10221 <daniel@BLINK-DEV-ONE.localdomain>
2020-10-01 10:04:58 +03:00
hansnull
8029396d2d
Mssql decimal fix (#3910) 2020-09-30 10:05:16 +03:00
Igor Savin
4a1638bfbe
Fix double merging of config for migrator (#4040) 2020-09-25 08:03:17 +02:00
Simon Lorenz
b65245e1fe
warn if whereNot is used with 'in' or 'between' (#4038)
Co-authored-by: Simon Lorenz <simon.lorenz@stadt-duisburg.de>
2020-09-19 23:45:11 +03:00
Christiano Marques
a481dde82c
feat: new config parameter / CLI flag to prefixing seed filename with a timestamp (#3873) 2020-09-19 16:11:05 +03:00
Florent SCHILDKNECHT
2bf17e0509
fix(seed): throw error when specific seed file cannot be found (#4011)
fixes #4005
2020-09-04 09:48:18 +03:00
Mr D
95e0593440
Test/document esm interop mixed formats (knexfile/migrations/seeds) (#3986) 2020-08-17 16:38:37 +02:00
Mr D
369bbd6293
Improve Esm interop (#3985)
refs #3978
2020-08-16 19:22:26 +03:00
Mr D
907cc763f6
#3978 Improve mjs module support (#3980) 2020-08-15 17:54:43 +03:00
Mathieu DARTIGUES
f3c73ccd58
Add new option for seed : recursive (#3974) 2020-08-10 15:10:37 +02:00
Harish Karumuthil
8ba73e568a
Escape single quoted values passed to defaultTo function (#3899) 2020-08-08 20:48:45 +03:00
issa marie tseng
378ae79641
Ensure DB stream is destroyed when the PassThrough is destroyed (#2324). (#3900) 2020-08-08 20:27:47 +03:00
cubikrichard
6203b59076
support postProcessResponse for streams (#3870) (#3931) 2020-08-08 17:57:58 +03:00
Mr D
cfce685775
ESM module interop fails if calling module/package is of type 'module' #3937 (#3938) 2020-08-08 17:39:57 +03:00
Mathieu DARTIGUES
ab7644425d
Support multiple directories for seeds (#3967) 2020-08-08 15:21:43 +03:00
Casey Foster
3677e547a9
Fix migration source name in rollback all (#3956) 2020-08-07 18:53:59 +03:00
Keno Medenbach
2bd2ecd91c
MSSQL: Added the removal of a columns default constraint, before dropping the column (#3855) 2020-05-15 11:28:34 +02:00
Igor Savin
c0afe14cde
Warn user if custom migration source is being reset (#3839) 2020-05-06 00:13:09 +02:00
Igor Savin
38f54ce8f0
Refactor migration logic to use async/await. Add test case for using classes with custom migration sources (#3838) 2020-05-05 19:10:50 +02:00
Igor Savin
40621fac9e
Update dependencies (#3830) 2020-04-26 19:35:06 +02:00
Zach McElrath
b626702b47
Add migrate:unlock command, truncate on forceFreeMigrationsLock (#3822) 2020-04-23 21:51:32 +02:00
Lorefnon
7b4d208bae
Fix inferrence of seed/migration extension from knexfile extension (#3814)
Current implementation doesn't work when knexfile has multiple env-specific configuration sections.

Resolves #3807
2020-04-20 01:19:15 +02:00
Igor Savin
e37aeaa31c
Prepare for 0.21.0 release (#3811) 2020-04-19 00:40:23 +02:00
Brian Lauber
8d5715a03a
Fix: Support for .finally(..) on knex's Promise-alikes (#3800) 2020-04-15 21:05:40 +02:00
Edvaldo Szymonek
336b41e148
Add clearGroup method (#3771) 2020-04-13 01:09:51 +02:00
Igor Savin
7568ab51c4
Split tests in groups (#3785) 2020-04-07 21:27:40 +02:00
Florent Vilmart
41d02ba5c1
CLI: adds support for asynchronous knexfile loading (#3748) 2020-03-24 17:07:05 +01:00
Kabir Baidhya
a6551559f0
Minor improvements on the usage of fs utilities - unify all the fs functions into the same util/fs to simplify things (#3749) 2020-03-24 15:50:47 +01:00
Kabir Baidhya
ec2351b7a8
Minor test internal enhancements (#3747) 2020-03-23 22:09:01 +01:00
Kabir Baidhya
078b749892
Add unit tests for escape utility functions (#3742) 2020-03-22 18:44:51 +01:00
Kabir Baidhya
a7031c3cef
Upgrade package mkdirp and improve it's usage (#3741) 2020-03-21 11:01:10 +01:00
Florent Vilmart
998c92ca97
Typescript: Makes the ChainableInterface conform to Promise<T> (#3724) 2020-03-19 23:19:57 +01:00