47 Commits

Author SHA1 Message Date
Igor Savin
c2c9446c29
Fix JSON support for CockroachDB (#4701) 2021-10-03 21:33:24 +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
zeotuan
55eadcf7ad
Fixing posgres datetime and timestamp column created with wrong format (#4578) 2021-07-21 01:23:20 +03: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
maximelkin
b9fb5992b5
Migrate to classes (#4253) 2021-01-31 12:40:13 +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
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
20629af916
Fix comment escaping for MySQL and PostgreSQL (#4084) 2020-10-27 10:05:21 +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
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
Taras Ozarko
d6426d75e1 Add ability to manually define schema for enu with useNative (#3307) (#3413) 2019-08-25 23:07:30 +02:00
Ihor Sakaylyuk
1ef1a4ef07 Fix native enum with specified schema (#3307) (#3400) 2019-08-24 17:37:29 +02: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
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
3f8f50425f add schema support for schema builder 2015-08-09 23:04:53 -03:00
Tim Griesser
521a6f9e97 Remove use strict, assumed in ES6 2015-05-09 14:01:19 -04:00
Tim Griesser
7e884cb325 Babel src -> lib, remove gulp 2015-05-09 13:58:18 -04:00
Tim Griesser
f9aab9dc76 Major internal refactor
Beefed up transaction implementation, still needs tests
and cleanup of nested transaction queues.

Left todo:
- Fix commented out tests
- Fix oracle driver's transactions
2015-04-22 10:34:14 -04:00
Tim Griesser
eee4e9c005 Fixing the overall class dependency approach, lots of internal cleanup, WIP 2015-04-19 16:31:52 -04:00
Tyler Kellen
2ddbfb65c4 support creating and dropping extensions in postgresql 2014-11-08 10:14:01 -05:00
Brian Delahunty
9be8e7b601 Add support for specifying the postgres index type. 2014-10-02 20:56:39 -07:00
Tyler Kellen
0f9a5448dc implement support for postgres create/drop schema 2014-09-30 12:52:41 -04:00
Ben Drucker
40effe848a Allow jsonb columns to be created with the schema builder
Closes #499
2014-09-22 12:25:28 -04:00
Vincent Schoettke
ef173db790 Changed jshint option unused to true and fixed warnings 2014-09-02 22:56:51 +02:00
Vincent Schoettke
98f4f9a1dd Removed jshint expr and fixed warnings 2014-09-02 22:03:14 +02:00
Vincent Schoettke
f3874ac651 Fixed several jshint warnings. Added strict mode 2014-09-01 17:19:34 +02:00
Tim Griesser
a768c7881b Fix #398, #410, escape field with enum / postgres 2014-08-14 15:45:15 -04:00
Tim Griesser
0b1af71ac3 Cleanup for #383 2014-08-14 15:32:26 -04:00
Calvin Metcalf
957cad6a43 create if not exists 2014-07-17 11:27:02 -04:00
Tim Griesser
1e936ffd3c Fix #308 onDelete / onUpdate in PostgreSQL, with tests 2014-06-12 14:00:44 -04:00
Tim Griesser
6b85f1d66f Merge with master, ensure #278 is fixed in 0.6 2014-06-04 11:29:21 -04:00
Tim Griesser
7befdf616f default to timestamptz for postgresql, #184 2014-06-04 04:10:27 -04:00
Tim Griesser
d7738e772a Fixing comment & foreign key tests, full suite passing 2014-05-29 17:31:09 -04:00
Tim Griesser
c6dac39cb7 minor code cleanup 2014-04-16 10:41:16 -04:00
Tim Griesser
7bb7bfdc0f ensure text as used as a fallback for json on pg < 9.2 2014-04-16 10:40:21 -04:00
Tim Griesser
6c76cc5cf0 adding jshint, cleaning unused variables 2014-04-16 03:22:47 -04:00
Tim Griesser
0de9513a78 all tests green 2014-04-16 01:23:50 -04:00
Tim Griesser
a62ca4f7ee schema tests passing, some of the builder tests passing 2014-04-15 11:43:47 -04:00