Skip to content

Commit c2056ca

Browse files
author
Tal Almagor
committed
Move 'reason' column to be TEXT in order to support large error messages coming from knex drivers.
1 parent d7acc3e commit c2056ca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/schema.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ var SchemaManager = (function () {
1818
* Schema Manager.
1919
*
2020
* @param schema: String, schema name.
21-
* @param config: Object, connection config.
21+
* @param client: String, client name [e.g. "mysql"].
22+
* @param connectionConfig: Object/String, either a config object a URL formatted string.
2223
* @constructor
2324
*/
2425
function SchemaManager(schema, client, connectionConfig) {
@@ -64,7 +65,7 @@ var SchemaManager = (function () {
6465
table.dateTime('installation_time');
6566
table.integer('execution_time');
6667
table.integer('status');
67-
table.string('reason');
68+
table.text('reason');
6869
});
6970
};
7071

@@ -181,7 +182,7 @@ var SchemaManager = (function () {
181182
status = 1;
182183
reason = e.message;
183184
if (_private._logger.isLevelEnabled("DEBUG")) {
184-
_private._logger.error(e);
185+
_private._logger.error(e.code);
185186
}
186187
throw new Error(util.format(
187188
"Migration (%s/%s) failed. Run `mysql-migrate info` " +

0 commit comments

Comments
 (0)