SQLite Forum

DROP COLUMN feature with indexes
Login
Dropping a column that is part of an unnamed multi-column UNIQUE constraint is probably a good reason for SQLite to reject the command.

Should that UNIQUE(b,c) constraint become a UNIQUE(b) constraint or just be dropped? Likely b won't be UNIQUE on its own (or the constraint would have just been UNIQUE(b) to begin with and dropping the column out of the constraint would fail. Just dropping the constraint is likely a problem, as there was very likely a reason the constraint was there in the first place.

Maybe the lesson is that if you want to be able to maximally alter a schema you need to remember to name all your constraints (as unnamed constraints are much harder to change). Perhaps it also says that for cases like this, it makes sense to say the right answer is to remake the table, as there is no clear universal answer as to what the results should be.