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

If migration folder doesn't exist in phar binary #456

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dmouse
Copy link

@dmouse dmouse commented Jan 21, 2022

When you create a phar if you don't include a migration file the folder is not included in your distribution binary, this cause an error when you run the migration command

   Symfony\Component\Finder\Exception\DirectoryNotFoundException 

  The "phar:///home/.../database/migrations" directory does not exist.

image

When you create a phar if you don't include a migration file the folder is not included in your distribution binary, this cause an error when you run the `migration` command
@owenvoke
Copy link
Member

owenvoke commented Jan 26, 2022

@nunomaduro, what are your thoughts on this? Seems fine to me. The alternative is just making sure that the migrations directory is in your box.json which is what I think we've previously recommended. However, this would cope with when there are no migrations but you still want to use the DB I guess?

@dmouse
Copy link
Author

dmouse commented Jan 26, 2022

Yes, my case is I'm using the dump command to generate the SQL file with all the schema and I want to use that SQL as base and create migration files out of the phar file.

As you mention to include the migration folder in the phar file I need migrations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants