You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In contrast, the flag works with run, status and rollback commands
This is a minor issue as my current workaround for all these commands is to manually set the connection environment variable when calling the commands, eg: DB_CONNECTION=pg node ace migration:refresh
Prerequisites
Package version
18.4.0
Node.js and npm version
Node: v18.16.0
npm: 9.5.1
Sample Code (to reproduce the issue)
Obtain the connection key in database.ts. The default pg one is enough to replicate the issue.
...
connections: {pg: { ... },}...
Run either the refresh or reset migration command with the --connection flag with the provided connection key pg and note the error
node ace migration:refresh --connection=pg
[ error ] """pg""" is not a valid connection name. Double check "config/database" file
BONUS
A quick glance at the migration command files shows something in common with the working commands which the non-working ones lack:
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 unable to run the following migration commands successfully:
refresh
,reset
andfresh
when providing a connection with the--connection
flagrefresh
andreset
provide the same error:While,
fresh
provides a different error:In contrast, the flag works with
run
,status
androllback
commandsThis is a minor issue as my current workaround for all these commands is to manually set the connection environment variable when calling the commands, eg:
DB_CONNECTION=pg node ace migration:refresh
Prerequisites
Package version
18.4.0
Node.js and npm version
Node: v18.16.0
npm: 9.5.1
Sample Code (to reproduce the issue)
database.ts
. The defaultpg
one is enough to replicate the issue.refresh
orreset
migration command with the--connection flag
with the provided connection keypg
and note the errorBONUS
A quick glance at the migration command files shows something in common with the working commands which the non-working ones lack:
Can I attempt a fix?
The text was updated successfully, but these errors were encountered: