moderntribe / square1-global-docker

SquareOne Global Docker is a command line application that provides a local development environment for projects based on the SquareOne Framework.
GNU General Public License v2.0
7 stars 1 forks source link

Migration fails on misplaced config file #31

Closed jbrinley closed 3 years ago

jbrinley commented 4 years ago

Describe the bug When updating to version 3, a migration script runs into an error when updating mysql.cnf.

It's looking for the file in global/mysql/mysql.cnf, but my existing file is in global/docker/mysql/mysql.cnf

After manually moving the file to global/mysql/mysql.cnf, I was able to proceed.

System Configuration:

Additional context

$ sodev global:start
★ Starting migration!
★ Backing up data in /Users/jbrinley/.config/squareone
★ Copying updated /Users/jbrinley/.config/squareone/global/docker-compose.yml
★ Copying updated /Users/jbrinley/.config/squareone/global/mysql/mysql.cnf

   ErrorException

  copy(/Users/jbrinley/.config/squareone/global/mysql/mysql.cnf): failed to open stream: No such file or directory

  at vendor/illuminate/filesystem/Filesystem.php:252
    248|      * @return bool
    249|      */
    250|     public function copy($path, $target)
    251|     {
  > 252|         return copy($path, $target);
    253|     }
    254|
    255|     /**
    256|      * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file.

      +1 vendor frames
  2   storage/migrations/2020_07_17_061433_refresh_config.php:59
      Illuminate\Filesystem\Filesystem::copy("/Users/jbrinley/s1/storage/global/mysql/mysql.cnf", "/Users/jbrinley/.config/squareone/global/mysql/mysql.cnf")

  3   app/Services/Migrations/Migrator.php:85
      RefreshConfig::up(Object(Symfony\Component\Console\Output\ConsoleOutput))
defunctl commented 4 years ago

Should be fixed in https://github.com/moderntribe/square1-global-docker/pull/30/commits/825d2ac2a3603d955512b07021abae80a0f1f453 please let me know.

defunctl commented 4 years ago

To force a migration, delete the ~/.config/squareone/store directory.

jbrinley commented 3 years ago

Fixed