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: command migrate #794

Closed
kassiodouglas opened this issue Sep 17, 2022 · 0 comments · Fixed by #796
Closed

Bug: command migrate #794

kassiodouglas opened this issue Sep 17, 2022 · 0 comments · Fixed by #796
Labels
bug An existing feature is not working as intended

Comments

@kassiodouglas
Copy link

Hello. I'm having problems running the command below, it says that the database configuration file was not found, but I'm sending it as an option in the command in '--config'. From my tests, there are many layers where the 'load_config()' method is called, and it seems to me that the configuration is not passed on. Creating a folder in the root of the application like 'config/database.py', fixes the error, but I would like to use the config option in the command to modify. I still couldn't change the 'DB_CONFIG_PATH' variable either.

command: masonite-orm migrate --connection=default --directory=app/database/migrations --config=app/configs/database.py

Error:

ConfigurationNotFound

ORM configuration file has not been found in config.database.

at D:\ServerLocal\Python\GrupoKascavel\_ENVKASCAVEL\lib\site-packages\masoniteorm\config.py:28 in load_config
     24│
     25│
     26│     config_module = pydoc.locate(selected_config_path)
     27│     if config_module is None:
  →  28│         raise ConfigurationNotFound(
     29│             f"ORM configuration file has not been found in {selected_config_path}."
     30│         )
     31│     return config_module
     32│
@kassiodouglas kassiodouglas added the bug An existing feature is not working as intended label Sep 17, 2022
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.

1 participant