Fix logic when generating recovery codes and update migration
This commit is contained in:
parent
a998b463e3
commit
c522935403
2 changed files with 47 additions and 33 deletions
|
@ -15,7 +15,11 @@ class CreateUserRecoveryTokensTable extends Migration
|
|||
{
|
||||
Schema::create('recovery_tokens', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->unsignedInteger('user_id');
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
|
||||
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue