%PDF- %PDF-
Direktori : /var/www/html/geotechnics/api/database/migrations/ |
Current File : /var/www/html/geotechnics/api/database/migrations/2019_12_21_140215_create_project_notes_table.php |
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateProjectNotesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('project_notes', function (Blueprint $table) { $table->bigIncrements('id'); $table->unsignedBigInteger('user_id') ->nullable() ->index(); $table->foreign('user_id') ->references('id') ->on('users'); $table->unsignedBigInteger('project_id') ->index(); $table->foreign('project_id') ->references('id') ->on('projects'); $table->text('message'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('project_notes'); } }