Files
tickme/database/migrations/2020_05_05_001846_create_clients_table.php
2020-05-11 14:43:49 +08:00

40 lines
903 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateClientsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('clients', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('type_id');
$table->string('marking');
$table->string('name');
$table->string('email');
$table->string('wechat_id')->nullable();
$table->timestamps();
$table->softDeletes();
$table->foreign('type_id')->references('id')->on('modular_types');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('clients');
}
}