cmc-csci143 icon indicating copy to clipboard operation
cmc-csci143 copied to clipboard

Add schema-indexes.sql to Dockerfile?

Open henrylong612 opened this issue 1 year ago • 1 comments

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

henrylong612 avatar Apr 24 '24 18:04 henrylong612

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 avatar Apr 24 '24 19:04 mikeizbicki