* `chai` is no longer global
* sinon is no longer globally defined
* expect(..) is no longer defined globally
* Removed obsolete eslint hints about globals
* Removed unused variable ( `expect(..)` )
The underlying issue was that query *always* committed, even during a transaction. The previous fix was to just disable commitAsync in a transaction but then that also disabled explicit commit calls. Instead, this fix disables query's commits during transactions so that explicit commits still work.
* 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
* 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
* 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
* 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
* 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
* Implemented extra boolean param for rollback()
Extra parameter allows all migrations to be rolled back.
* Removed spurious log
* Removed stray debugger instruction
* Moved to arrow functions
* Fix migration test assertions
* Report failing migration instead of latest migration
Migrator._activeMigration needs to be set twice: once when loading the
migration, and again when running it.
* Pass migration config object as an argument to the migrations themselves, to allow custom parameters to be set for migrations. (#2014)
* Run prettier
* Remove unneeded change
* Remove more unneeded changes
* Fix Node 10 support
* Update documentation based on a new design
* Restore test execution (oops)
* Fix withUserParams method
* Fix knex instance cloning
* Remove unused import
* Fix reference to knex from migrator
* Do not lose user params on transactions
* Remove unneeded require
* Address review comments
* Fix setting event emitter and listeners on Knex copies. Use knex copies to run tests in CI
* Remove knex cloning
* Fix event listener leak
* Introduced abstraction for getting migrations
This would allow a webpack migration source which is compatible with bundling.
* Fixed migration validation with custom migration source
* Fixed issues after rebasing on muti directory PR
* Renamed parameter and fixed error message
* Addressed some PR comments
* Finished comment
* Moved filename extension filtering into fs-migrator
* Added test showing in memory custom migration source
* Cleaned up how to get config
* Fixed failing test
* Hopefully fix tests
* Fix Node.js 10 support in tests
* Normalized and validated driverNames of test db clients and fixed oracle test setup
* Fixed failed queries from old query building tests which hadn't been ran in ages
* Allow selecting node version which is used to run oracledb docker tests
* Improved sql tester error messages
* Fixed rest of the oracledb tests
* Removed invalid flag from docker-compose
* Print mssql logs if initialization fails
* Fixed syntax error + final tests
* Added restart of failure for mssql DB initialization to try again if server was not ready
* Printout always mssql logs after container is started
* Fixed wait time printing after trying to connect
* Use npm run oracledb:test for testing oracle in travis
* Fixed float type of mssql to be float
* Many tests where postgres test was not actually ran at all
* Migrations to be mssql compatible
Mssql driver doesn't handle if multiple queries are sent to same transaction concurrently.
* Prevented mssql failing when invalid schema builder was executed by accident
Instead of trying to generate sql from broken schema calls, just make exception to leak before query compiling is started
* Fixed mssql trx rollback to always throw an error
Also modified some connection test query to be mssql compatible
* Fixed various bugs from MSSQL driver to make tests run
* Fixed mssql unique index to be compatible with other dialect implementations
* Enable running mssql tests on CI
* Test for #2588
* Updated tests to not be dependend on tables left from previous test rans
* Trying to make mssql server work on travis
* Add a Redshift dialect that inherits from Postgres.
* Turn .index() and .dropIndex() into no-ops with warnings in the Redshift dialect.
* Update the Redshift dialect to be compatible with master.
* Update package.json
* Disable liftoff cli
* Remove the CLI
* Add lib to the repo
* Allow the escaping of named bindings.
* Update dist
* Update the Redshift dialect’s instantiation of the query and column compilers.
* Update the distribution
* Fix a merge conflict
* Take lib back out
* Trying to bring back in line with tgreisser/knex
* Add npm 5 package-lock
* Bring cli.js back in line
* Bring cli.js back in line
* Progress commit on redshift integration tests
* Revert "Progress commit on redshift integration tests"
This reverts commit 207e31635c638853dec54ce0580d34559ba5a54c.
* Progress commit
* Working not null on primary columns in createTable
* Working redshift unit tests
* Working unit and integration tests, still need to fix migration tests
* Brought datatypes more in line with what redshift actually supports
* Added query compiler unit tests
* Add a hacky returning clause for redshift ugh
* Working migration integration tests
* Working insert integration tests
* Allow multiple insert returning values
* Working select integration tests
* Working join integration tests
* Working aggregate integration tests
* All integration suite tests working
* Put docker index for reconnect tests back
* Redshift does not support insert...returning, there does not seem to be a way around that, therefore accept it and test accordingly
* Leave redshift integration tests in place, but do not run them by default
* Fix mysql order by test
* Fix more tests
* Change test db name to knex_test for consistency
* Address PR comments
* Use transaction for entire migration batch + locking if all migrations are transactional.
* Fix tests.
Use knex instead of query builder.
Do no use single transaction if `disableTransactions` is true.
* Added tests for parallel migrations.
Subtract already done migrations after getting the lock, when there is a wrapping transaction.
* Fix indentation.
* Fix linting errors (which are locally warnings, for some reason).
* Remove `const` keyword.
Remove obsolete `it` clauses.
* No maria. PG first.
* Test only pg and oracle.
* Remove error swallowing.
* Test parallel migration only in postgres (select for update works differently in other databases).
* Add transaction to missed places.
* Remove ignored table name argument.
* Enabled parallel migrations test for `mssql` dialect (still not part of CI test).
Fixed indentation.