From 3fc303e81551c539216fa6b11c6ef55ba9d10eed Mon Sep 17 00:00:00 2001 From: Lukas Halbritter Date: Mon, 3 Sep 2018 11:15:44 +0200 Subject: [PATCH] Added people migration. --- app/Person.php | 10 ++++ .../2018_09_03_090023_create_people_table.php | 50 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 app/Person.php create mode 100644 database/migrations/2018_09_03_090023_create_people_table.php diff --git a/app/Person.php b/app/Person.php new file mode 100644 index 0000000..ebc7dea --- /dev/null +++ b/app/Person.php @@ -0,0 +1,10 @@ +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'); + } +}