Closed Shivang44 closed 4 years ago
You can either use a callback or wrap it with async/await as mentioned in the document
exports.up = function(db, callback) {
db.createTable('users', {
id: { type: 'int', primaryKey: true },
email: 'string',
password: 'string'
}, callback);
};
or
exports.up = async function(db) {
await db.createTable('users', {
id: { type: 'int', primaryKey: true },
email: 'string',
password: 'string'
});
};
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm submitting a...
Current behavior
I'm using the
pg
driver and have a simple migration:When I execute
db-migrate up -v
it results in:But then it just hangs there. I can tell its connecting to the DB because when I CTRL+C my postgres docker container says
unexpected EOF on client connection with an open transaction
Expected behavior
It should run the migrations or provide some sort of error on why it couldn't.
Minimal reproduction of the problem with instruction
Run the above migration. I'm using the postgres docker container with docker-compose:
database.json:
Environment