adonisjs / lucid

AdonisJS SQL ORM. Supports PostgreSQL, MySQL, MSSQL, Redshift, SQLite and many more
https://lucid.adonisjs.com/
MIT License
1.08k stars 195 forks source link

db:seed and migration:fresh use default connection, and not that supplied by the --connection flag #996

Closed ghost closed 7 months ago

ghost commented 9 months ago

Package version

18.4.2

Describe the bug

Running ace db:seed and ace migration:fresh seems to ignore the --connection flag. ace db:wipe and ace migration:run respect the connection flag as expected.

Reproduction repo

No response

ghost commented 9 months ago

Worked out the issue somewhat - the connection info isn’t being passed to any of the functions in the seeders’ run() methods.

thetutlage commented 9 months ago

Can you please create a PR for the same. It should be created for the v18 branch. https://github.com/adonisjs/lucid/tree/v18

RomainLanz commented 9 months ago

He deleted his account.

I have added the flag Good First Issue if anyone want to make a contribution!

RomainLanz commented 9 months ago

In fact, I believe this PR may fix the issue: https://github.com/adonisjs/lucid/pull/983

aarhusgregersen commented 8 months ago

Did it indeed fix the issue? Or is this still something that should be looked at? :-)

thetutlage commented 7 months ago

Yes, it did. Also, feel free to give it a try and report back if the issue persists