jeremykenedy/laravel-spa

SQLite migration issues

LeftPinkie opened this issue · 1 comments

If running the migration for a SQLite database, will get this error...

  2022_09_05_192055_update_users_table ..................................................................................... 3ms FAIL

   RuntimeException 

  Curl error (code 3): <url> malformed

  at vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php:56
     52▕                     if ($closeAfterDone) {
     53▕                         curl_close($ch);
     54▕                     }
     55▕ 
  ➜  56▕                     throw new \RuntimeException(sprintf('Curl error (code %d): %s', $curlErrno, $curlError));
     57▕                 }
     58▕ 
     59▕                 continue;
     60▕             }

      +8 vendor frames 
  9   app/Exceptions/Handler.php:96
      Illuminate\Support\Facades\Facade::__callStatic()

  10  app/Exceptions/Handler.php:43
      App\Exceptions\Handler::sendEmail()

The issue is in the 2022_11_02_051027_update_settings_table migration. SQLite does not support the after() function & I believe you would have to alter the table as well.

The workaround is to remove the 2022_11_02_051027_update_settings_table migration and update the 2014_10_00_000000_create_settings_table migration:

        Schema::create('settings', function (Blueprint $table) {
            $table->id();
            $table->string('key')->unique();
            $table->string('name')->unique();
            $table->string('type')->default('string');
            $table->longtext('val')->nullable();
            $table->timestamps();
        });

Message that will be displayed on users' first issue