adonisjs / lucid

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

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

Closed ghost closed 2 months ago

ghost commented 4 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 4 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 4 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 4 months ago

He deleted his account.

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

RomainLanz commented 4 months ago

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

aarhusgregersen commented 3 months ago

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

thetutlage commented 2 months ago

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