2020-06-29 06:50:50 +00:00
|
|
|
<?php
|
2020-07-28 06:34:10 +00:00
|
|
|
//Migrations acts as a version control for the database allowing you to modify the app's database schema
|
2020-06-29 06:50:50 +00:00
|
|
|
|
2020-07-28 06:34:10 +00:00
|
|
|
//allows use of necessary libraries
|
2020-06-29 06:50:50 +00:00
|
|
|
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-07-27 11:34:45 +00:00
|
|
|
$table->string('contactname', 255);
|
|
|
|
$table->string('title', 255);
|
2020-06-29 09:14:07 +00:00
|
|
|
$table->string('email', 255);
|
2020-08-10 10:07:41 +00:00
|
|
|
$table->integer('phone')->nullable(true);
|
2020-09-07 10:44:24 +00:00
|
|
|
$table->string('phonetimes')->nullable(true);
|
2020-06-29 06:50:50 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('contact');
|
|
|
|
}
|
|
|
|
}
|