Skip to content
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

Bug in seeder #367

Closed
jpmateo022 opened this issue Feb 4, 2021 · 5 comments · Fixed by #369
Closed

Bug in seeder #367

jpmateo022 opened this issue Feb 4, 2021 · 5 comments · Fixed by #369
Labels
bug An existing feature is not working as intended

Comments

@jpmateo022
Copy link

Hi I encounter a bug in seeder

I simply followed the guide but when I execute it. It goes to this.

masonite-orm seed:run AppConfig

image

image

@jpmateo022 jpmateo022 added the bug An existing feature is not working as intended label Feb 4, 2021
@girardinsamuel
Copy link
Contributor

Did you create this seed file with masonite-orm seed AppConfig ?

@girardinsamuel
Copy link
Contributor

I have reproduced your problem and found two issues:

  • for now seeding a particular file does not support camelcase convention => for now you should run seed app_config
  • also the import inside the generated seed file is wrong (it should be from masoniteorm import Seeder and not from masonite.orm import Seeder.

If you correct those two things it will work.

@jpmateo022
Copy link
Author

Nice! Thanks :)

@girardinsamuel
Copy link
Contributor

I made a PR to fix the second issue. for the first one, the command indicates that a table name should be given and this is working.

I wonder if we should add the possibility to provide a model name instead ? 🤔

@josephmancuso
Copy link
Member

for now seeding a particular file does not support camelcase convention => for now you should run seed app_config

To do this we need to use the inflection library like we do with models. There a method to convert something like AppConfig to app_config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing feature is not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants