94 Commits

Author SHA1 Message Date
davidf84
770b2f20ac
Fixed issue with bigincrements not working with composite primary key in MySQL - #5341 (#5343)
Co-authored-by: David Farrugia <david.farrugia@sagossgroup.com>
2023-11-29 02:10:12 +02:00
Igor Savin
9a6c5ba62f
Additional lint checks before publishing (#5459) 2023-01-22 16:13:24 +02:00
Lucas Bickel
0918bf9bde
fix(postgresql): add primaryKey option for uuid (#5212) 2022-06-08 11:41:43 +03:00
Dominic Vonk
a4df3e3540
Implement extendable builders (#5041)
Co-authored-by: Olivier Cavadenti <olivier.cavadenti@gmail.com>
2022-05-17 13:07:26 +03:00
Shaun Sharples
4f0f0ab3e0
move deferrable to after on update/on delete (#4976)
Thank you!
2022-01-28 12:34:26 +02:00
Olivier Cavadenti
2e1016e662
Add alterType and update index.d.ts for alter function (#4967)
Co-authored-by: intech <ru31337@gmail.com>
2022-01-27 13:34:23 +01:00
Igor N. Dultsev
3ee6d0f022
Alter nullable constraint when alterNullable is set to true (#4730) 2022-01-24 20:22:04 +01:00
Marek Brenčič
3f0ec9f84e
Fix for createViewOrReplace and its support for sqlite3 (#4856)
Co-authored-by: Marek "foxie" Brenčič <marek@brencic.sk>
Co-authored-by: Olivier Cavadenti <olivier.cavadenti@gmail.com>
2022-01-14 11:15:03 +02:00
Olivier Cavadenti
4494113187
Checks Constraints Support (#4874)
Co-authored-by: Ivan Zhuravlev <intech@users.noreply.github.com>
2022-01-06 14:44:16 +01:00
Olivier Cavadenti
b6775d9b00
Create multiple PKs with increments (#4903) 2022-01-03 20:55:24 +01:00
Nicola Krumschmidt
157e27d0e3
Fix SQLite foreign key constraints when altering a table (#4189) 2021-12-13 19:59:01 +01:00
Olivier Cavadenti
2763e47129
Add camel case to timestamps method (#4803) 2021-12-09 15:24:32 +01:00
Olivier Cavadenti
d813edfc7b
Add binary uuid option (#4836) 2021-12-07 16:38:03 +01:00
Marius
44dbbca524
Make view columns optional in create view like (#4829) 2021-11-16 19:31:43 +01:00
Igor Savin
50cfa5f22f
Add geometry column building (#4776) 2021-10-28 00:10:33 +03:00
Olivier Cavadenti
60db2d25a2
View support (#1626) (#4748) 2021-10-20 23:23:29 +03:00
Olivier Cavadenti
7c52de9f23
Create table like support (#1373) (#4728) 2021-10-15 16:57:46 +03:00
Igor Savin
07c30bfcb8
Implement truncate method for CockroachDB, refactor and fix some tests (#4714) 2021-10-10 01:33:20 +03:00
Igor Savin
8d75615524
Implement nullability modification via schema builder (#4657) 2021-08-28 20:41:54 +03:00
zeotuan
45916f97ee
Add deferrable support for constraint (#4584) 2021-07-25 10:23:17 +03:00
Nicola Krumschmidt
29b8a3623f
Adjust generateDdlCommands return type (#4326) 2021-03-01 19:11:16 +02:00
Nicola Krumschmidt
9e28a72aca
Add support for altering columns to SQLite (#4322) 2021-02-26 22:36:46 +02:00
Igor Savin
9c390036db
Move "parameter" out of formatter (#4275) 2021-02-04 15:54:26 +02:00
George Petrov
57184acd63
Primary keys improvements (#4266) 2021-02-03 14:47:32 +02:00
Morgan Zolob
92907e80e2
Add check to only create native enum once (#3658)
Co-authored-by: Morgan Zolob <morgan.zolob@ingrooves.com>
2021-01-16 16:16:00 +02:00
Igor Savin
0b2a2ca4d1
Extract static method _num out of class. Use super-methods (#4212) 2021-01-06 23:21:10 +02:00
Igor Savin
bf287be13a
Add integration test for specifictype (#4211) 2021-01-06 21:50:13 +02:00
Igor Savin
41606d799c
Move remaining builders to class (#4210) 2021-01-06 20:14:44 +02:00
Igor Savin
92d8f49724
Return complete list of DDL commands for creating foreign keys in SQLite (#4194) 2021-01-03 04:10:26 +02:00
Igor Savin
6275ea3b08
Migrate columncompiler to classes (#4193) 2021-01-01 20:35:54 +02:00
Igor Savin
0e09fcd3c1
Refactor to classes (part 2) (#4191) 2021-01-01 18:46:16 +02:00
Igor Savin
b43dadbe01
Refactor to classes (#4190) 2021-01-01 17:46:10 +02:00
Igor Savin
2aec21ed5e
Try to introduce some organization into how files are grouped (#4178) 2020-12-28 16:55:08 +02:00
Bogdan Chadkin
80355e4850
Replace inherits package with builtin utility (#4059) 2020-10-05 23:59:12 +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
Harish Karumuthil
8ba73e568a
Escape single quoted values passed to defaultTo function (#3899) 2020-08-08 20:48:45 +03:00
Igor Savin
e37aeaa31c
Prepare for 0.21.0 release (#3811) 2020-04-19 00:40:23 +02:00
tkalliom
02d94d96b0
Reduce size of lodash in bundle (#3804) 2020-04-18 19:41:23 +02:00
Igor Savin
80a2516734
Throw better error when trying to modify schema while using unsupported dialect (#3609) 2020-01-05 00:04:41 +01:00
Igor Savin
4feefdf3d2 Enforce Unix (lf) line terminators (#3598) 2019-12-29 20:28:40 +01:00
Lorefnon
79ccb7d8bd Lift up dialect specific methods in the CreateTableBuilder (#3532) 2019-11-21 15:22:29 +01:00
Ricardo Graça
9aa7085b05 Rename src directory to lib (#3338) 2019-07-10 23:48:43 +02:00
Mikael Lepistö
7140a48226 Remove generated lib from repository and run build in prepublish 2016-01-21 09:59:30 +02:00
Sky Morey
f99d3952a1 changed mssql to compact create format. changed unique index to unique constraint 2015-12-14 16:20:45 -06:00
Sky Morey
390d3e1d37 added formatting to schema builder 2015-12-14 11:00:51 -06:00
Sky Morey
371815d7e6 made SCHEMA upper case for mssql 2015-12-14 09:56:53 -06:00
Dustin Martin
d9ac2c1f8f Add status method
Returns 0 if all migrations are run and DB is up to date. Return negative number if DB is missing migrations. Return positive number if DB is ahead (rare case, e.g. if migrations were run then code is reverted)
2015-11-23 10:50:19 -06:00
Mikael Lepistö
fef0a09197 Did npm run build 2015-08-25 10:23:34 +03:00
Daniel Teixeira
8e780a8115 rename .using to .withSchema 2015-08-14 19:17:06 -03:00
Daniel Teixeira
3f8f50425f add schema support for schema builder 2015-08-09 23:04:53 -03:00