fanatic/database/migrations/20_create_members_table.php

37 lines
950 B
PHP
Raw Normal View History

2022-04-29 11:52:58 -07:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class() extends Migration {
/**
* Run the migrations.
*/
public function up()
{
Schema::create('members', function (Blueprint $table) {
$table->id();
$table->timestamps(6);
$table->string('name');
$table->string('email');
$table->boolean('show_email');
$table->foreignId('country_id')
->constrained('countries')
->onUpdate('cascade')
->onDelete('restrict');
$table->string('password');
$table->string('url')->nullable();
$table->longText('comments')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('members');
}
};