framework icon indicating copy to clipboard operation
framework copied to clipboard

If migration folder doesn't exist in phar binary

Open dmouse opened this issue 4 years ago • 2 comments

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

dmouse avatar Jan 21 '22 00:01 dmouse

@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?

owenvoke avatar Jan 26 '22 16:01 owenvoke

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

dmouse avatar Jan 26 '22 17:01 dmouse