16 Commits

Author SHA1 Message Date
Igor Savin
0115f933ca
Align signature for PG datetime and timestamp methods with docs (#2919)
* Align signature for PG datetime and timestamp methods with documentation. Add precision support

* Remove redundant method

* Add upgrade note for the change

* Changes after code review

* Improve API
2018-11-26 10:22:27 +01:00
Tim Griesser
4fd16da45a
Fix #2715 (#2721)
* Fix #2715, explicitly set precision in datetime & timestamp
* Allow for precision in knex.fn.now, mysql time
* Add test for datetime with precision
2018-07-19 10:46:23 -04:00
Tim Griesser
232fe9f151
Add Prettier (#2697)
* Add prettier
* Run files through prettier
2018-07-09 08:10:34 -04:00
Igor Savin
4d4e4ca1e7 Add json support to the query builder for mysql (#2635)
* Add json support to the query builder for mysql

refs #1036

Based on #1902

* Clarify supported version
2018-05-30 17:26:03 +03:00
Simon Lidén
65509c38ef Allow overwriting log functions (#2625)
* Example build of custom log functions
* Handle logger object better for transactions
* Adjust test to ignore sqlite warning message
2018-05-29 11:42:03 -04:00
Ricardo Graça
14ac2cbaa7 Create timestamp columns with millisecond precision on MySQL 5.6 and newer (#2542)
* Add test for precise timestamps schema building

* Create precise timestamp columns on MySQL 5.6+

* Increase precision of timestamps to microsecond

- Six is the maximum that it supports and there's no reason not to use
the maximum available precision.

* Add warning when version is not specified in MySQL

* Update warning message when missing mysql version
2018-04-18 23:14:29 +03:00
tmeinders
c1997e9502 Fixing issue with add columns on tables failing if using both after and collate (#2432)
* Fixing issue with add columns on tables failing if using both after and collate

* Adding tests for collate modifier alongside first and after modifiers
2018-01-24 02:06:25 +02:00
GONZO
68af752bbe fixed table alter attributes order. (first, after) (#2062)
* fixed table alter attribute order. (first, after)

* add test cases, alter table position with comment.

* add real database test cases.

* after, first tests only mysql or mariadb.
2017-05-15 13:16:15 +03:00
Rhys van der Waerden
2acd6e5daa Make spaces in import braces consistent
`import {module}` -> `import { module }`
2016-05-18 20:22:50 +10:00
Rhys van der Waerden
2e7650a8e4 Remove JSHint comments 2016-05-18 20:07:33 +10:00
Rhys van der Waerden
3846b7182c Make codebase conform to ESLint rules
Just a couple of changes.
2016-05-17 01:01:34 +10:00
wubzz
1d27fb8550 Update lodash from 3.7.0 -> 4.6.0 2016-03-15 18:11:13 +01:00
Jurko Gospodnetić
16a076c1a0 trim trailing spaces
Only left alone ones in `test/tape/transactions.js` which would just
cause unnecessary conflicts and get cleaned up by separate pull
request #1257 anyway.
2016-03-08 08:44:01 +01:00
Alexander Sagen
2317279e8c Add collate for columns (MySQL)
This had been requested in #599 a year ago, but a PR was never created.

I have included a test that passed when i ran it.
2016-01-19 23:06:25 +01: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