42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateContactsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('contacts', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('firstname')->nullable();
|
|
$table->string('lastname')->nullable();
|
|
$table->string('phone');
|
|
$table->string('street')->nullable();
|
|
$table->string('zip')->nullable();
|
|
$table->string('city')->nullable();
|
|
$table->string('country')->nullable();
|
|
$table->string('company')->nullable();
|
|
$table->string('email')->nullable();
|
|
$table->text('notes')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('contacts');
|
|
}
|
|
}
|