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

Fix bugs: database config bugs #921

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

TonyBotongChu
Copy link

This PR fixes two bugs about database.

config.py read env values before loading .env file

pilot/database/config.py loads environment variable at project startup. This may set variables in config.py before executing the load_dotenv function in main.py. In this case, the database settings in .env file will not take effect.

sqlite database not created

pilot/database/database.py will not create sqlite database in create_database function. If DATABASE_TYPE equals "sqlite", create_database will not create the database file.

code reformat

Reformat postgres.py and db_init.py

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.

None yet

1 participant