Added people migration.
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Person extends Model
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<?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();
|
||||||
|
|
||||||
|
// 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('people');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user