for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersOauthTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
Schema::create('users_oauth', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id');
$table->string('remote_provider', 32);
$table->string('remote_id', 255);
$table->string('nickname')->nullable();
$table->string('name')->nullable();
$table->string('email')->nullable();
$table->string('avatar', 255)->nullable();
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');
});
}
* Reverse the migrations.
public function down()
Schema::table('users_oauth', function (Blueprint $table) {
$table->dropForeign('users_oauth_user_id_foreign');
Schema::drop('users_oauth');