-
Notifications
You must be signed in to change notification settings - Fork 442
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 scheme migrations #515
Comments
Reasonable idea. Happy to do something similar to |
For the |
Imho initial scripts that run always on docker run or docker compose up/ start would be great. Maybe by using a command line parameter like the "--init-file" or setting a global env var. Needed functions docker_temp_server_start,docker_temp_server_stop and docker_process_init_files existing yet. It seems, it's just the call at an appropriate place inside the entrypoint script. Or it should allow running external scripts after mariadbd is up to do some "magic". |
@djjeff80 can you describe your use case a bit more. (assuming this question was yours). Loaded question is what is "UP"? healthcheck.sh and few user applications regard a TCP connection as up (but number of option to that script show a variety of options/assumptions and options). To make |
@grooverdan Could have also been useful for #508 to generate the healthcheck user. |
Quite right, I should of planned that one better. Creating users and the The lack of functionality in other containers is mainly about needing a two server starts every startup. I'd got some prototype design work in the server not to require this (effectively delaying the TCP connection) which can be used for upgrades and this feature. Once that is implemented this can be implemented. |
Hi guys.
Actually I am trying to cope with situation in which I need to apply migrations to existing database scheme in production environment. For example I need to drop PK on table which already contains data. I thought that I simply copy my idempotent migration script into docker entrypoint directory after my database creation scripts and after updating previous image, migrations gets applied somehow magically 😆 Nothing happened of course. Then I checked mariadb docker image entrypoint script and realized scripts are run only in case database is not yet created. Thus scripts in docker entrypoint directory are skipped on image update.
Is there any recommended approach how to do what I want?
Thank you very much☺️
The text was updated successfully, but these errors were encountered: