2646 Commits

Author SHA1 Message Date
Igor Savin
90f0f0355c Update changelog 2019-05-27 01:27:41 +02:00
Lorefnon
fb91f654b8 Update Knex.Config types to include log (#3221)
Fixes #3148
2019-05-26 12:53:26 -07:00
Lorefnon
9c6ab963f6 Fix some more cases of missing typings (#3223)
* Fix some more cases of missing typings

- Add types for Seed API
- Add Knex#initialize (Closes #3192)

* Relax constraints on raw queries and add tests
2019-05-26 12:52:55 -07:00
Lorefnon
54a7a4a35f Support multi-column whereIn in sqlite through values clause (#3220)
Fixes #3042
2019-05-25 12:53:20 -07:00
Lorefnon
92cb805669 Support type safe refs (#3215) 2019-05-21 22:52:13 -07:00
Igor Savin
1a63488771 Bump version 2019-05-21 19:53:31 -07:00
Zachary Mott
f4593fb9b4 Allow users to specify the migrations "tableName" parameter via the CLI. (#3214) 2019-05-21 17:41:50 -07:00
Lorefnon
5dab3a5e74 Expose some utility types
Ref: https://github.com/tgriesser/knex/pull/3036#issuecomment-493751631

Co-authored-by: Sagar Chamling <sgr.raee@gmail.com>
2019-05-19 13:28:15 -07:00
Lorefnon
e2e044c0f2 Unify object options handling for datetime/timestamp across dialects and update type definitions (#3181)
* Fix windows incompatiblity in npm scripts

* Update timestamp and datetime signature in oracle dialect to be consistent with other dialects
2019-05-19 05:10:59 -07:00
Lee Allen
08478f2db9 Feature/add up for migrations (#3205)
* Add ability to run migrate:up command to only run the next migration

* Add cli test for migrate:up

* Add test for migrator

* Add stub

* Add type

* Fix wording of test
2019-05-19 04:14:52 -07:00
Igor Savin
8521590a12 Bump version 2019-05-19 03:55:25 -07:00
Lorefnon
3b3fdf4c91 Fix issues with typings of joins and some conflicts with Bluebird typings (#3209) 2019-05-19 03:53:48 -07:00
Igor Savin
43ee6937ab Bump version 2019-05-18 00:47:53 +02:00
Lorefnon
edd807f96c Resolve more issues around generic typings (#3208)
- Fix: update, insert, delete didn't support deferring of result resolution unlike select.
  So knex.insert(...).into<User>('users') would fall back to any

- Correctly handling cases when deferred selection keys get cleared later eg. multiple returning invocations, clearSelect.

- Fix: first resolves to array member rather than array.

- Add explanations for some of the complex type applications.
2019-05-18 00:47:06 +02:00
Mikael Lepistö
21e2fce8ae Set non coverage tests to be default and set travis to run coverage with only node 8 (#3207) 2019-05-17 23:45:58 +02:00
Igor Savin
a6c6cd2d4f Bump version 2019-05-16 22:28:14 +02:00
Lorefnon
91192fe4c4 Make typings more compatible with previous version (#3195) 2019-05-16 22:25:37 +02:00
Igor Savin
b02b785982 Bump version 2019-05-13 20:29:23 +02:00
Igor Savin
2ceea8a338 Merge branch 'master' of https://github.com/tgriesser/knex 2019-05-13 20:27:00 +02:00
Igor Savin
f34013be5f
Use cli-testlab for testing CLI (#3191)
* Bump version to 0.16.4

* Use cli-testlab for testing CLI
2019-05-13 13:39:02 +02:00
Mikael Lepistö
8a9a648ae2
Docker based test dbs (#3157)
* Fixed some of the tests failing with various dialect combinations

* Setup all test databases to run in docker

* Fixed test suite and updated travis to use docker

* Fixed some tests in master and disabled oracle tests while setting everything else to work again

* Changed docker to use latest postgresql alpine image

* Re-enabled all oracledb tests

* Install oracle client libs to oracle server and copy them to travis to make node oracledb package to work

* Disabled random failing oracle tests and added test to show that oracle update in transaction does not seem to work ACID

* Update package.json

* Update package.json

* Fixed linting issues

* Fixed waiting for postgres to use the same DB image that database is using.

* Removed installing oracledb driver in travis if not needed .travis.yml

* Cleaned up package.json more

* Created static name for oracledb container to allow copying files out of it on different docker versions

* Removed webpack from deps
2019-05-13 12:21:36 +03:00
Igor Savin
dff669f9a3 Merge branch 'master' of https://github.com/tgriesser/knex 2019-05-12 17:21:57 +02:00
Igor Savin
cf435d9175
Prepare for 0.16.7 release (#3190) 0.16.7 2019-05-12 17:21:40 +02:00
Igor Savin
c4ba3fa06c Merge branch 'master' of https://github.com/tgriesser/knex 2019-05-12 16:32:52 +02:00
Lorefnon
1f4c8839a6 Add default values for generic types (#3189) 2019-05-12 16:32:13 +02:00
Daniel Mills
617d36ea01 add clearHaving function and add test (#3141) 2019-05-12 10:20:26 +02:00
Lee Allen
75df3b6f7b Feature/add rollback all to cli (#3187)
* Add --all flag for rollback in cli

* Set up test for rollback --all cli migration command

* Fix test for cli migrate:rollback --all
2019-05-12 01:35:51 +02:00
Igor Savin
623cb88054 Merge branch 'master' of https://github.com/tgriesser/knex 2019-05-12 00:46:29 +02:00
Igor Savin
337639c2da
Prepare for 0.16.6 release (#3188)
* Bump version to 0.16.4

* Update changelog and bump version for 0.16.6 release
0.16.6
2019-05-12 00:46:13 +02:00
Igor Savin
bfc57446a8 Merge branch 'master' of https://github.com/tgriesser/knex 2019-05-12 00:27:39 +02:00
Igor Savin
542ece6395
Execute tests on Node 12 (#3171)
* Bump version to 0.16.4

* Execute tests on Node 12 as opposed to Node 11

* Update dependencies

* Add gcc 5 to try fixing sqlite building

* Update ubuntu

* Try removing source

* Use correct mysql packages for Xenial

* Try removing some packages
2019-05-12 00:01:38 +02:00
Lorefnon
6a4fecfe78 Make function types generic in type definitions (#3168)
* Make function types generic in type definitions

* Add dtslint and tests for type definitions
2019-05-04 10:34:07 +02:00
Lee Allen
a2ab754eed Bugfix/rollback all wrong order (#3172)
* Fix rollback all bug attempting to perform rollback in chronological order

* Set up second migration to depend on first migration so when rolling back order is tests

* Add test for rollback all only running completed tests in reverse chronological order
2019-05-01 00:21:49 +02:00
Max Beatty
70712f6689 add missing types to MigratorConfig (#3174) 2019-04-30 09:33:05 +02:00
Igor Savin
f909692f19 Merge branch 'master' of https://github.com/tgriesser/knex 2019-04-28 20:42:13 +02:00
Adrien Risser
08ae1ec2a6 Add error detail log to cli.js (#3149) 2019-04-28 20:41:49 +02:00
Michaël Bitard
0e845489ca adding types for havingBetween orHavingBetween havingNotBetween orHavingNotBetween (#3144) 2019-04-16 00:38:26 +02:00
Igor Savin
3b871329d1 Merge branch 'master' of https://github.com/tgriesser/knex 2019-04-12 00:17:51 +02:00
Igor Savin
892fc6b919
Bundle polyfills to prevent breaking existing Node 6 setups (#3140)
* Bump version to 0.16.4

* Hotfix polyfills for Node 6 in 0.16.5

* Remove unneeded upgrade instruction
0.16.5 016.5
2019-04-12 00:17:29 +02:00
Igor Savin
eb136f1b7d Merge branch 'master' of https://github.com/tgriesser/knex 2019-04-11 22:21:32 +02:00
Igor Savin
2072163fb2
Update version in changelog (#3138)
* Bump version to 0.16.4

* Update changelog version
0.16.4
2019-04-11 22:21:16 +02:00
Igor Savin
f28ae7abd8 Merge branch 'master' of https://github.com/tgriesser/knex 2019-04-11 22:19:18 +02:00
Igor Savin
f757e366ac
Bump version to 0.16.4 (#3137) 2019-04-11 22:19:08 +02:00
Igor Savin
18532b2db6 Bump version to 0.16.4 2019-04-11 22:17:43 +02:00
Igor Savin
286d84b54a
Prepare for 0.16.4-next3 release (#3136)
* Prepare for 0.16.4-next3 release

* Change current version to next-3 as there are still known bugs
2019-04-11 22:05:19 +02:00
Felix Mosheev
1948c3d423 Add boolean as a column name in join (#3121) 2019-03-30 18:55:02 +01:00
Igor Savin
fe6083eda4 Support nullable timestamps on MySQL (#3100)
* Add test to recreate the issue

* Improve test, add some documentation

* Improve test

* Add explicit nullable flag to column

* Set nullability explicitly on MySQL to deal with timestamp edge case

* Use same assertion for everything
2019-03-30 15:58:56 +02:00
Andrew Schmadel
b15ee3def1 make unionAll()'s call signature match union() (#3055)
* make unionAll()'s call signature match union()

consolidates the logic used by union() and unionAll(), allowing the two to be used interchangeably

* use spread args instead of arguments array

* Fix unionAll spread arguments
2019-03-29 19:55:32 +02:00
Igor Savin
e7ed005995
Fix queryContext not being passed to raw queries (#3111)
* Fix queryContext not being passed to raw queries

* Add unit case for transaction as well
2019-03-19 00:45:08 +01:00
Felix Mosheev
11fdc0c90a Add missing clearOrder & clearCounters types (#3109) 2019-03-14 14:11:05 +01:00