unsa-pis-be/database/migrations/2022_08_17_185432_create_providers_table.php

38 lines
786 B
PHP
Raw Normal View History

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('providers', function (Blueprint $table) {
$table->id();
$table->string('provider');
$table->string('id_provider');
$table->string('avatar')->nullable();
$table->timestamps();
$table->foreignId('id_user')
->constrained('users')
->onDelete('cascade');;
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('providers');
}
};