Laravel - 删除外键并添加一个迁移

I am trying to drop the foreign key and add the foreign key in one migration but can't get it to work: I have created the table contents with the foreign key cms_id:

public function up()
{
    Schema::create('contents', function (Blueprint $table) {
        $table->increments('id');
        $table->integer('ct_id')->unsigned();
        $table->foreign('ct_id')->references('id')->on('content_types');
        $table->integer('cms_id')->unsigned();
        $table->foreign('cms_id')->references('id')->on('inventories');
        $table->string('title');
        $table->string('slug');
        $table->text('excerpt');
        $table->mediumText('body');
        $table->string('password');
        $table->integer('parent_id');
        $table->timestamps();
    });
}

This is how the inventories table looks like:

Schema::create('inventories', function (Blueprint $table) {
    $table->increments('id');
    $table->integer('remote_id');
    $table->integer('local_id')->unsigned();
    $table->string('local_type');
    $table->timestamps();
});

And after failing to drop it and to create a new foreign key, I have deleted all the tables in the DB, and have tried to run all the migrations again with the new one as well, which holds this:

public function up()
{
    Schema::table('inventories', function (Blueprint $table) {
        $table->integer('remote_id')->unsigned()->change();
    });

    Schema::table('contents', function (Blueprint $table) {
        $table->dropForeign('contents_cms_id_foreign');
        $table->foreign('cms_id')->references('remote_id')->on('inventories');
    });

    Schema::table('files', function (Blueprint $table) {
        $table->dropForeign('files_cms_id_foreign');
        $table->foreign('cms_id')->references('remote_id')->on('inventories');
    });
}

But,I get:

[Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL : alter table contents add constraint contents_cms_id_foreign foreign k ey (cms_id) references inventories (remote_id))

[PDOException]
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint

If, I first run all the migrations where I create all the tables, and then after that run the new migration where I change the foreign keys, I get this error:

[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'content s_cms_id_foreign'; check that column/key exists (SQL: alter table contents drop foreign key contents_cms_id_foreign)

                                                                              [PDOException]                                                        

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'content s_cms_id_foreign'; check that column/key exists

I have even tried to just delete all the tables in the DB, and only edit the files that I already have by just changing, without new migrations:

    $table->integer('ct_id')->unsigned();
    $table->foreign('ct_id')->references('remote_id')->on('content_types');
    $table->integer('cms_id')->unsigned();
    $table->foreign('cms_id')->references('remote_id')->on('inventories');

And, also in the inventories table:

$table->integer('remote_id')->unsigned();  

But, even then it won't work, and I get:

[Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL : alter table contents add constraint contents_cms_id_foreign foreign k ey (cms_id) references inventories (remote_id))

                                                                         [PDOException]                                                        

SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint

So, I have checked all of the usual suspects that I have come across on the internet, I have even added $table->engine = 'InnoDB'; to to the tables inventories, contents and files, I have made sure to first create tables and then add foreign keys, as well as checked if the columns have the same data type, not sure what to do else?