Files
timebank-cc-public/database/migrations/2022_08_02_083600_create_profiles_table.php
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

39 lines
972 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProfilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('profiles', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->string('first_name')->nullable();
$table->string('last_name')->nullable();
$table->date('date_of_birth')->nullable();
$table->text('content')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('profiles');
}
}