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

Add schema-indexes.sql to Dockerfile? #523

Open
henrylong612 opened this issue Apr 24, 2024 · 1 comment
Open

Add schema-indexes.sql to Dockerfile? #523

henrylong612 opened this issue Apr 24, 2024 · 1 comment
Labels
question Further information is requested

Comments

@henrylong612
Copy link
Contributor

Hello @mikeizbicki!

In the project, it says to do the following:

IMPORTANT: As you create your indexes, you should add them to the file services/pg_normalized_batch/schema-indexes.sql. (Like the schema.sql file, this file would get automatically run by postgres if you were to rebuild the containers+images.)

Do I need to add the second line below to the Dockerfile?

COPY schema.sql /docker-entrypoint-initdb.d/01.sql
COPY schema-indexes.sql /docker-entrypoint-initdb.d/01.sql
@mikeizbicki
Copy link
Owner

You don't need to modify the Dockerfile for the assignment. In an industrial setting, however, you're right that the Dockerfile should be modified to add the indexes automatically when the database is brought up from scratch.

@mikeizbicki mikeizbicki added the question Further information is requested label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants