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

Database script updates to support containerization #8674

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Conversation

chosak
Copy link
Member

@chosak chosak commented Dec 6, 2024

This commit modifies several scripts to make it easier to setup the database as part of a containerized cf.gov deploy.

It removes a portion of the refresh-data.sh script that attempts to manually rename the existing 'cfpb' schema in our database dumps, to a schema named for a different Postgres user. We no longer use the PGUSER environment variable as of 59b109b, so this code doesn't work right now.

In the future, if we need to import a 'cfpb' schema into a database where the username is something different (for example in an RDS instance where we might have less control over the username) we might have to revisit this code.

This change also consolidates the various 'DB setup' steps we do after loading a dump -- running migrations, creating the cache table, and running our 'initial' data script, reducing some duplication.

This commit modifies several scripts to make it easier to setup the database as part of a containerized cf.gov deploy.

It removes a portion of the refresh-data.sh script that attempts to manually rename the existing 'cfpb' schema in our database dumps, to a schema named for a different Postgres user. We no longer use the PGUSER environment variable as of 59b109b, so this code doesn't work right now.

In the future, if we need to import a 'cfpb' schema into a database where the username is something different (for example in an RDS instance where we might have less control over the username) we might have to revisit this code.

This change also consolidates the various 'DB setup' steps we do after loading a dump -- running migrations, creating the cache table, and running our 'initial' data script, reducing some duplication.
@chosak chosak added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit 7c8c6d7 Dec 6, 2024
11 checks passed
@chosak chosak deleted the fix/refresh-data branch December 6, 2024 15:11
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.

2 participants