string('slug')->primary(); $table->timestamps(); }); Schema::create('cron_tasks', function (Blueprint $table) { $table->id(); $table->string('name')->unique(); $table->string('execution_type'); $table->time('schedule_time')->nullable(); $table->timestamp('last_run')->nullable(); $table->timestamps(); $table->foreign('execution_type')->references('slug')->on('cron_task_types')->cascadeOnDelete()->cascadeOnUpdate(); }); } public function down(): void { Schema::dropIfExists('cron_tasks'); Schema::dropIfExists('cron_task_types'); } };