Skip to content

Custom database connection within a seeder #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dotJoel opened this issue Mar 14, 2025 · 0 comments
Open

Custom database connection within a seeder #200

dotJoel opened this issue Mar 14, 2025 · 0 comments

Comments

@dotJoel
Copy link

dotJoel commented Mar 14, 2025

https://lucid.adonisjs.com/docs/seeders#customizing-database-connection states that this.connection can be used to set the connection for the model to use during seeding.

It seems that this is not the case.
I would expect src/seeders/base_seeder.ts to have the property, if it was supported.

It is possible to use this.client.connectionName, but I don't know if this is a documentation issue or an implementation issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant