1 개요[ | ]
- artisan queue:table
- php artisan queue:table
- queue jobs 테이블을 위한 마이그레이션을 생성하는 artisan 명령어
Console
Copy
root@zetawiki:/var/www/laravel# php artisan queue:failed-table
Migration created successfully!
Console
Copy
root@zetawiki:/var/www/laravel# php artisan migrate:status
+------+--------------------------------------------+
| Ran? | Migration |
+------+--------------------------------------------+
| Y | 2018_02_04_200457_create_jobs_table |
| N | 2018_02_05_192005_create_failed_jobs_table |
+------+--------------------------------------------+
2 (Optional) 확인[ | ]
Console
Copy
root@zetawiki:/var/www/laravel# ll database/migrations/ | grep failed
-rw-r--r-- 1 root root 789 Feb 5 19:20 2018_02_05_192005_create_failed_jobs_table.php
Console
Copy
root@zetawiki:/var/www/laravel# cat database/migrations/2018_02_05_192005_create_failed_jobs_table.php
PHP
Copy
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('failed_jobs');
}
}
3 artisan migrate[ | ]
Console
Copy
root@zetawiki:/var/www/laravel# php artisan migrate
Migrating: 2018_02_05_192005_create_failed_jobs_table
Migrated: 2018_02_05_192005_create_failed_jobs_table
4 같이 보기[ | ]
- 라라벨 artisan migrate
- 라라벨 artisan migrate:status
- 라라벨 artisan queue:table
- 라라벨 artisan 명령어
- 라라벨 CreateFailedJobsTable 클래스
- 라라벨 failed_jobs 테이블
5 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.