Skip to content

Commit

Permalink
FIX add nullable to user_id column
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardodallavia committed Dec 13, 2021
1 parent 21fc623 commit 7b8f7b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/migrations/create_nps_tables.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ return new class extends Migration

Schema::create('nps_answers', function (Blueprint $table) {
$table->foreignId('nps_id')->constrained('nps')->cascadeOnUpdate()->cascadeOnDelete();
$table->foreignId('user_id')->constrained()->cascadeOnUpdate()->nullOnDelete();
$table->foreignId('user_id')->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
$table->integer('value')->nullable();
$table->text('answer')->nullable();
$table->timestamps();
Expand Down

0 comments on commit 7b8f7b2

Please sign in to comment.