$seed->save();
$browser->close();
- } catch (\Throwable) {
+ } catch (\Throwable $e) {
$seed->status = 'error';
+ $seed->error_detail = [
+ 'type' => get_class($e),
+ 'message' => $e->getMessage(),
+ ];
$seed->save();
}
}
--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('aos_seeds', function(Blueprint $table) {
+ $table->text('error_detail')->nullable()->default(null);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('aos_seeds', function(Blueprint $table) {
+ $table->dropColumn('error_detail');
+ });
+ }
+};