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 DB migration to Docker entrypoint. #3

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

kobaj
Copy link

@kobaj kobaj commented Dec 15, 2024

This is an extension of this PR: #1

My adjustments

  • db/migrations/2018_10_01_000000_create_users_tables.php -> Kept failing for me, not sure why or how. Made it slightly more resilient with some checks to see if the table already exists. If there is a way to use Illuminate instead to do an "IF NOT EXISTS" check, that would be better. I just don't know Illuminate.
  • docker/entrypoint.sh -> added some log messages!
  • startup.sh -> Removed the extra migrate now that it runs in entrypoint. At least, in theory. I don't really know Docker either and have never run startup.sh

Copy link
Collaborator

@chipuni chipuni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely approve the guards to make sure that tables exist before writing to them.

I don't care where the migration is done.

Approved.

@chipuni chipuni merged commit 3105095 into anthroarts:main Dec 16, 2024
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