getDoctrineSchemaManager(); $indexesFound = $sm->listTableIndexes('release_comments'); if (array_key_exists('ix_release_comments_hash_releases_id', $indexesFound)) { $table->dropUnique('ix_release_comments_hash_releases_id'); } $table->dropColumn('text_hash'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('release_comments', function (Blueprint $table) { $table->string('text_hash', 32)->default(''); $table->unique(['text_hash', 'releases_id'], 'ix_release_comments_hash_releases_id'); }); } }