MasoniteFramework / orm

Masonite ORM is a beautiful Python ORM. It's also a nearly drop in replacement of the Orator ORM
https://orm.masoniteproject.com
MIT License
161 stars 47 forks source link

Bug in migrate:refresh command #793

Closed kassiodouglas closed 1 year ago

kassiodouglas commented 1 year ago

Hi! I found a bug when trying to run a command here, (follows below), it accuses the "self.option" method in this case has more arguments than it supports, I understood the idea there of putting the default value, but it's not working. Changing the MigrateRefreshCommand.py file, it works.

command: masonite-orm migrate:refresh --connection=default --directory=app/database/migrations --seed-directory=app/database/seeders --seed

Error:

option() takes from 1 to 2 positional arguments but 3 were given
       32│
       33│ if self.option("seed") == "null":
       34│ self.call(
       35│ "seed:run",
     → 36│ f"None --directory {self.option('seed-directory')} --connection {self.option('connection', 'default')}",
       37│)
       38│
       39│ elif self.option("seed"):
       40│ self.call(

If I'm doing something wrong, please let me know. thank you!