AddPolymorphicColumnsToUploads::up PHP Method

up() public method

Run the migrations.
public up ( ) : void
return void
    public function up()
    {
        Schema::table('uploads', function (Blueprint $table) {
            $table->integer('uploadable_id')->nullable();
            $table->string('uploadable_type')->nullable();
            $table->index(['uploadable_id', 'uploadable_type'], 'uploadable_index');
        });
    }
AddPolymorphicColumnsToUploads