bigIncrements('id'); $table->string('external_id'); $table->unsignedBigInteger('team_id')->index()->nullable(); $table->morphs('fileable'); $table->string('file'); $table->string('name')->nullable();; $table->string('title')->nullable();; $table->string('format')->nullable(); $table->string('filesize')->nullable(); $table->string('disk')->default('local'); $table->unsignedBigInteger('user_created_id')->nullable(); $table->foreign('user_created_id')->references('id')->on('users'); $table->unsignedBigInteger('user_updated_id')->nullable(); $table->foreign('user_updated_id')->references('id')->on('users'); $table->unsignedBigInteger('user_deleted_id')->nullable(); $table->foreign('user_deleted_id')->references('id')->on('users'); $table->unsignedBigInteger('user_restored_id')->nullable(); $table->foreign('user_restored_id')->references('id')->on('users'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists(config('laravel-crm.db_table_prefix').'files'); } }