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

Failure running migration (php artisan queue:table) #41

Closed
techieshark opened this issue Jun 16, 2020 · 1 comment
Closed

Failure running migration (php artisan queue:table) #41

techieshark opened this issue Jun 16, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@techieshark
Copy link

techieshark commented Jun 16, 2020

I'm trying to switch from QUEUE_CONNECTION=async to QUEUE_CONNECTION=database, following instructions under "Message Sending & Queues" header on configuration & setup page.

I encounter an error at this step:

To use the database driver, you must first set the QUEUE_CONNECTION to database in your .env file. You also need to run the following commands, which will create a new jobs table in your database, which that will be used to manage the queue.

php artisan queue:table

See below the error:

cd ~/path/to/sendportal
php artisan queue:table

   ErrorException

  file_put_contents(/Users/me/path/to/sendportal/database/migrations/2020_06_16_211244_create_jobs_table.php): failed to open stream: No such file or directory

  at vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:135
    131|      * @return int|bool
    132|      */
    133|     public function put($path, $contents, $lock = false)
    134|     {
  > 135|         return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
    136|     }
    137|
    138|     /**
    139|      * Write the contents of a file, replacing it atomically if it already exists.

      +18 vendor frames
  19  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

The problem appears to be that the database/migrations directory doesn't exist. Running mkdir database/migrations and re-running command seems to fix this for me:

$ mkdir database/migrations
$ php artisan queue:table
Migration created successfully!
@JonoB JonoB added the bug Something isn't working label Jun 17, 2020
@JonoB
Copy link
Contributor

JonoB commented Jun 23, 2020

This has been fixed in the latest release

@JonoB JonoB closed this as completed Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants