439 Commits

Author SHA1 Message Date
Tim Griesser
5393cad7a0 only one tableName per query call 2014-02-18 09:49:18 -05:00
Tim Griesser
89a3dec0c9 0.6.0-wip 2014-02-14 12:46:13 -05:00
Tim Griesser
4c589cc960 working on refactoring the internals 2014-02-14 12:46:13 -05:00
John BEPPU
0619663d1a added knex migration template for LiveScript 2014-02-13 09:54:37 -08:00
Tim Griesser
4aa5bd5b0c Merge pull request #171 from tkellen/pluck
add pluck to builder interface
2014-01-28 15:28:31 -08:00
Tyler Kellen
0e83902c8c add pluck to builder interface
enables grabbing a single element from each row in results,
returning a promise which yields an array of those values.
2014-01-28 16:01:30 -05:00
Nikhil Benesch
0bf4044b74 Add 'avg' aggregate function
The 'AVG' aggregate function is specified in the SQL standard and
supported by MySQL, PostgreSQL, and SQLite. Include tests, too.
2014-01-19 15:38:59 -05:00
Stepan Mazurov
78d05f2fa0 changed init to use this.config in case one isn't passed in 2014-01-16 11:59:03 -07:00
vvo
05efb708d1 process.exit() with proper statusCode
One thing to take into account when making command lines
is to exit with the proper code so that grunt-tasks works as expected
when failing.
2014-01-14 15:47:42 +01:00
vvo
17fcaf4019 errors are logged with console.error so that stderr propagates 2014-01-14 15:46:48 +01:00
Tim Griesser
b42d42e2bc fix for #146, allowing knex.raw in defaultTo 2014-01-07 22:12:33 -05:00
Tim Griesser
5cc47ed1ee don't assume undefined is 'where null' 2013-12-25 13:31:51 -05:00
Tim Griesser
3785575de2 shuffling around the client paths/config 2013-12-25 13:21:31 -05:00
Tim Griesser
125cfb7cf5 better websql build 2013-12-24 08:06:14 -05:00
Tim Griesser
90d8566f98 basic websql support 2013-12-23 23:06:07 -05:00
Tim Griesser
5b5a6f62fd use bluebird nodeify, add catch/finally promise methods 2013-12-18 17:24:28 -05:00
Les Orchard
f2dd5f8305 Only use files with the correct extension for migrations 2013-12-12 08:59:35 -05:00
Tim Griesser
7e4913bd32 Fixing changes in cli script update 2013-12-11 12:13:29 -05:00
Tim Griesser
d8c332185e #125, using local knex install for cli if possible 2013-12-11 12:05:19 -05:00
Tim Griesser
06c38bcc2d Allow for returning in update queries, #132 2013-12-10 14:55:05 -05:00
Ben Drucker
e152884e5b Explicitly sort files for migrations, fixing #130 2013-12-09 12:39:23 -05:00
Tim Griesser
b65bf4f231 removing umd, Promise.method on query 2013-12-02 23:58:41 -05:00
Aiden Bell
4212205084 Proposed fix for https://github.com/tgriesser/knex/issues/118 2013-12-01 21:14:23 +00:00
Tim Griesser
3c8d08a64b Removing unnecessary UMD
When this eventually enabled on the client side,
we can build this into the build script.
2013-11-27 16:51:01 -05:00
Ben Drucker
b5808c537c Fix direct inclusion of Knex instance in migration config 2013-11-27 13:20:03 -05:00
Ben Drucker
c3bd8bf8b1 Pass promise constructor to migrations, not a fulfilled promise 2013-11-26 16:47:13 -05:00
Ben Drucker
0d30bd7d2b Match CoffeeScript stub to JS 2013-11-26 12:19:27 -05:00
tajima-junpei
199d09edcf Resolve configuration file path on migration
It changes so that the path of the migration config file is resolved before it is required.
This avoids `Cannot find module` error when the configuration file path is specified as relative path.
2013-11-26 08:32:53 +09:00
Tim Griesser
d3c927af16 Better error info on schema
Add info to docs about debugging promises
Add early errors to schema interface if table is not defined
2013-11-25 11:14:13 -05:00
Tim Griesser
667a20b66e switching out underscore for lodash 2013-11-25 02:00:12 -05:00
Tim Griesser
d334de5326 fixes #109, adding groups to cloned fields 2013-11-25 01:48:39 -05:00
Tim Griesser
39ec293892 Initial version of the migration cli ready 2013-11-25 01:43:55 -05:00
Tim Griesser
25b99f2622 Merge branch 'master' of github.com:tgriesser/knex
* 'master' of github.com:tgriesser/knex:
  Test for aggregate function with output name.
  Support for multiple aggregate functions.
  Failing test for #108
  Drop default output name for aggregate functions.
2013-11-25 00:55:49 -05:00
Tim Griesser
f78fc3e199 continuing work on migrations cli 2013-11-25 00:55:26 -05:00
Tim Griesser
6b5a74383e Merge branch 'migrations' of github.com:benesch/knex into benesch-migrations
* 'migrations' of github.com:benesch/knex:
  Create skeleton CLI for migrations
  Executabilize bin/knex
2013-11-24 19:25:49 -05:00
Luigy Leon
bbd50a6514 Support for multiple aggregate functions. 2013-11-23 13:09:57 -05:00
Tim Griesser
64f9deb651 fixes #100, increment/decrement values 2013-11-20 09:17:08 -05:00
Kia Rahimian
d26c1b7b95 fixed bug with .having() 2013-11-19 22:47:38 -05:00
Tim Griesser
7a6937fdb3 cleanup for readability of migrations, mostly done 2013-11-02 17:39:52 -04:00
Tim Griesser
b733e01f59 fixing some issues with promises 2013-11-02 13:43:12 -04:00
Tim Griesser
065322e007 working on the migrations spec, debugging bluebird 2013-11-02 13:14:38 -04:00
Tim Griesser
d01dd8a9a1 merging with master 2013-11-02 10:19:09 -04:00
Tim Griesser
8b2ef4eef1 merging bluebird into migrations 2013-11-02 09:26:31 -04:00
Tim Griesser
17d09f2655 Merge branch 'bluebird'
* bluebird:
  cleanup on the .then interface
  swapping in bluebird, some promise cleanup
2013-11-02 09:24:17 -04:00
Tim Griesser
354c9ea834 cleanup on the .then interface 2013-11-02 09:24:08 -04:00
Tim Griesser
48096b1468 fix #98, aggregates on toString / clone 2013-10-31 10:34:20 -04:00
Nikhil Benesch
2f1d4e49c4 Create skeleton CLI for migrations 2013-10-28 10:06:40 -04:00
Tim Griesser
b20c6c3f8e swapping in bluebird, some promise cleanup 2013-10-27 22:34:58 -04:00
Tim Griesser
86a1a24a1a some work on the migration code & api 2013-10-24 21:54:35 -04:00
Tim Griesser
5c496b9fa5 remove possible sql injection in 'orderBy', thanks @sebgie 2013-10-15 09:15:42 -04:00