0

I have copied a test mydb.sql to the directory

/docker-entrypoint-initdb.d

and it works fine.

Now I'd like to create my demo db and insert data. I have

mydb_1_struct.sql -- there is db structure
mydb_2_data.sql -- there is db data

I need to execute these scripts in strong order: structure and then data. What is the order of the scripts execution ?

1 Answer 1

2

According to the docker-entrypoint script it process the scripts in alphabetical order :

docker_process_init_files /docker-entrypoint-initdb.d/*

So you can just use the method you mention ( mydb_1 , mydb_2 ) etc.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.