-
Notifications
You must be signed in to change notification settings - Fork 7
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
Reintroduce Changes From Drift Management #49
Conversation
...t-app/{{ cookiecutter.project_slug }}/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Show resolved
Hide resolved
"postgres", | ||
f"dropdb --if-exists --user=$POSTGRES_USER {db_name} &&", | ||
f"createdb --user=$POSTGRES_USER {db_name} &&", | ||
f"psql --user=$POSTGRES_USER --dbname={db_name}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to perform any GRANT
sql queries? Also thoughts on instead of dropping DB we call destroy then start just the db service then the psql command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was working this way without GRANT
commands as createdb
is called with the --user
arg.
I added other option to import db with invoke destroy --import-db-file=<path>
. This way it's clear, destroy
removes everything, import-db
keeps everything excluding the database selected. User could have other databases in the volume, destroying the whole volume could be confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if nautobot/nautobot#3927 is relevant here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with PostgreSQL 15 and confirming, permissions are granted, and collation is UTF8. @glennmatthews
Closes NaN
What's Changed