2020-06-29 06:50:50 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
class CreateContact extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2020-06-29 09:14:07 +00:00
|
|
|
Schema::create('contacts', function (Blueprint $table) {
|
2020-06-29 06:50:50 +00:00
|
|
|
$table->id();
|
|
|
|
$table->timestamps();
|
2020-06-29 09:14:07 +00:00
|
|
|
$table->string('name_first', 255);
|
|
|
|
$table->string('name_last', 255);
|
|
|
|
$table->string('email', 255);
|
|
|
|
$table->integer('phone');
|
|
|
|
//$table->unique('email');
|
2020-06-29 06:50:50 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('contact');
|
|
|
|
}
|
|
|
|
}
|