2329 Commits

Author SHA1 Message Date
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
Igor Savin
7ecbcd5d19
Update changelog and version number (#3108) 2019-03-13 23:25:11 +01:00
Igor Savin
5fea86eeae
Update dependencies (#3107) 2019-03-13 23:24:46 +01:00
elunic
19926d8eba [#3033] fix: sqlite3 drop/renameColumn() breaks with postProcessResponse (#3040)
* [#3033] fix: sqlite3 drop/renameColumn() breaks with postProcessResponse

* When postProcessResponse is configured, and client.processResponse()
returns a Promise (e.g. for custom cases such as sqlite3 dropColumn()),
then that Promise is not awaited, but handed to postProcessResponse,
which might break is (e.g. with Objection's knexSnakeCaseMappers()).

* when reinserting data in the modified table, the rows are now being
handled with the "mapped" identifiers (instead of the unmapped)

* add tests, fix hasColumn

* add hasColumn tests for add mysql + snakeCaseMappers

* Improve tests and fix more cases related to processing

* Fix SQLite-specific tests

* MySQL is not case-sensitive, pg is
2019-03-13 22:58:59 +01:00
Igor Savin
24fcf27e05
Fix transaction support for migrations (#3084)
* Fix transaction support for migrations

* Clarify warning

* Clarify warning message

* Simplify logic, make enabling/disabling more consistent

* Fix tests

* Fix test

* Reduce duplication
2019-03-13 22:47:43 +01:00
Iacami Gevaerd
de1c9341b3 Include 'string' as accepted Knex constructor type definition (#3105) 2019-03-12 23:03:02 +01:00
Pierre Voisin
0aacab50be Fix for #2998 - Migrator & TypeScript (#3041)
* Fix `#listAllAndCompleted` not considering `loadExtensions` in migrator configuration (#2998)

* Add unit test

* Fix linting
2019-03-09 23:39:55 +01:00
Igor Savin
fcd21d9bf3
Add command for executing tests on SQLite (#3101) 2019-03-09 21:00:39 +01:00
Daniel Hensby
1da56a38d3 Update mssql dev dep to v5 stable (#3096) 2019-03-08 21:40:41 +01:00
Igor Savin
b9a648c6c4
Format code (#3088) 2019-03-05 18:46:58 +01:00
EthanHur
0db785949b add test that clearing offset (#2954)
* add test that clearing offset

* fix typo
2019-03-05 16:25:30 +01:00
Felix Mosheev
f3f075095b Make TS stubs modern (#3080) 2019-03-05 15:37:43 +01:00
Igor Savin
68723e025d
Update changelog (#3086) 2019-03-05 01:16:15 +01:00
Igor Savin
1b39d67550
Tests for drop-and-recreate with async/await (#3083)
* Add test for drop-and-recreate with async/await

* Add some tests with schema

* Use correct migrations

* Add tests with promise chains for comparison

* Fix migration

* Fix Node 6 compatibility
2019-03-05 01:03:51 +01:00
Randy Garces
c2bf7a375c MSSQL removes support column width/length on data type int and tinyint (#2738)
* MSSQL remove support column width/length on data type int

- fixes error `Cannot specify a column width on data type int`
- ignore length even if pass as agrument

* Add integration test for numeric lengths

* Fix syntax

* Add test that actually executes SQL

* Fix failing tests

* Fix tests
2019-03-05 01:02:06 +01:00
Chathu Vishwaijith
cfcb55d1c4 Add size parameter to integer method (#3074)
* Add size parameter to integer method

Size parameter work when we pass it. But it's not in definition.

* Change parameter to length

* Update knex.d.ts

Fix typo
2019-03-04 13:04:11 +01:00
Igor Savin
b269e45842
Update dependencies (#3085)
* Update dependencies

* Fix linting errors
2019-03-04 01:40:35 +01:00
Will
a109a801b0 Update enum arguments to reflect latest signature (#3043)
* Update enum arguments to reflect latest signature

Reimplemented from https://github.com/DefinitelyTyped/DefinitelyTyped/pull/29946

* Update knex.d.ts

Add missing option for PostgreSQL
2019-03-04 00:11:36 +01:00