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

Connection config loading #796

Merged

Conversation

Marlysson
Copy link
Contributor

@Marlysson Marlysson commented Sep 25, 2022

@josephmancuso @girardinsamuel
Closes #793
Closes #794

1. Config Module

Maybe a second solution is cascading the config_path variable

Changing the way of config_path is loaded in load() module.

For the first load from the environment, it if is None, use the custom or default value and finally define the value back to DB_CONFIG_PATH environment ( which is first loaded in function call ).

Don't cascading the config_path value cause some classes already use the connection class previously loaded on top of modules.

Schema: https://github.com/MasoniteFramework/orm/blob/2.0/src/masoniteorm/schema/Schema.py#L89
ConnectionFactory: https://github.com/MasoniteFramework/orm/blob/2.0/src/masoniteorm/connections/ConnectionFactory.py#L38

2. Arguments in Seed Run
Removing the second parameter in self.option() function, it already uses the default from the definition.

@Marlysson Marlysson changed the title Connection config load Connection config loading Sep 25, 2022
@josephmancuso josephmancuso merged commit 9f75f80 into MasoniteFramework:2.0 Oct 7, 2022
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

Successfully merging this pull request may close these issues.

Bug: command migrate Bug in migrate:refresh command
2 participants