Files
pollux/database/migrations/2018_09_03_090023_create_people_table.php
T

52 lines
1.3 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePeopleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('people', function (Blueprint $table) {
$table->increments('id');
// Name
$table->enum('title', array('Herr', 'Frau', 'Firma'));
$table->string('name_or_company');
$table->string('surname')->nullable();
// Date of birth
$table->date('date_of_birth')->nullable()->default(null);
// Adress
$table->string('city')->nullable();
$table->string('street')->nullable();
$table->string('postal_code')->nullable();
// Further contact information
$table->string('email')->nullable();
$table->string('mobile')->nullable();
$table->string('phone')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('person_targets');
Schema::dropIfExists('people');
}
}