public function up()
    {
        Schema::table('charges', function (Blueprint $table) {
            // Description support
            $table->string('description')->nullable();

            // Linking to charge_id
            $table->bigInteger('reference_charge')->nullable();
        });

        Schema::table('charges', function (Blueprint $table) {
            // Linking to charge_id, seperate schema block due to contraint issue
            $table->foreign('reference_charge')->references('charge_id')->on('charges')->onDelete('cascade');
        });
    }
public function up()
    {
        Schema::table('charges', function (Blueprint $table) {
            
            $table->string('description')->nullable();

            
            $table->bigInteger('reference_charge')->nullable();
        });

        Schema::table('charges', function (Blueprint $table) {
            
            $table->foreign('reference_charge')->references('charge_id')->on('charges')->onDelete('cascade');
        });
    }
public function up ( ) { Schema :: table ( 'charges' , function ( Blueprint $ table ) { // Description support $ table -> string ( 'description' ) -> nullable ( ) ; // Linking to charge_id $ table -> bigInteger ( 'reference_charge' ) -> nullable ( ) ; } ) ; Schema :: table ( 'charges' , function ( Blueprint $ table ) { // Linking to charge_id, seperate schema block due to contraint issue $ table -> foreign ( 'reference_charge' ) -> references ( 'charge_id' ) -> on ( 'charges' ) -> onDelete ( 'cascade' ) ; } ) ; }
Run the migrations.

@return void
Run the migrations .