knex/test/integration/migrate/test_with_invalid/20150109002832_invalid_migration.js
itaysabato a5f4c39529 Migration transaction (#1962)
* 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.
2017-03-27 17:39:08 +03:00

12 lines
227 B
JavaScript

'use strict';
exports.up = function(knex) {
return knex.schema.table('migration_test_1', function (table) {
table.string('transaction');
}).raw('SELECT foo FROM unknown_table');
};
exports.down = function() {
};