Open apantel opened 4 years ago
Liquibase uses the alter table
syntax to drop unique constraints.
Laravel 7 Illuminate affected
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::table('settings', function (Blueprint $table) {
$table->dropUnique('settings_name_unique');
$table->string('group')->default('default');
});
There was once upon a time, a half measure to allow this syntax for unique constraints which were not marked as "created explicitly" to be dropped in this way. It seems to have been removed at some point. My vote would be that we give up on this bookkeeping, or revive it, but either way, permit this syntax where it is reasonable.
ALTER TABLE DROP CONSTRAINT
cannot be used to dropUNIQUE
constraints. This is allowed throughDROP INDEX CASCADE
.Epic: CRDB-10239
Jira issue: CRDB-5317