Page MenuHomePhorge

2022_02_04_100000_create_user_passwords_table.php
No OneTemporary

Size
991 B
Referenced Files
None
Subscribers
None

2022_02_04_100000_create_user_passwords_table.php

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
// phpcs:ignore
class CreateUserPasswordsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
'user_passwords',
function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('user_id');
$table->string('password');
$table->timestamp('created_at')->useCurrent();
$table->index(['user_id', 'created_at']);
$table->foreign('user_id')->references('id')->on('users')
->onDelete('cascade')->onUpdate('cascade');
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_passwords');
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Oct 19, 10:03 PM (17 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1533421
Default Alt Text
2022_02_04_100000_create_user_passwords_table.php (991 B)

Event Timeline