SQLite Forum

DROP COLUMN feature with indexes
Login
That only applies if the column being dropped comprises the ONLY column in the index.  That is to say that for the following schema:

```
create table x(a, b, c);
create [unique] index x_b on x(b);
```

then if you do an `ALTER TABLE x DROP COLUMN b;` I would assert that mayhaps the index `x_b` can be dropped automagically, or mayhaps not (arguments can be made for either position).  

However for the following schema:

```
create table x(a, b, c);
create [unique] index x_bc on x(b,c);
```

that `ALTER TABLE x DROP COLUMN b;` should fail.  There is absolutely nothing which can be done to make the schema transition to a consistent state.  You (the user) should have to drop the index x_bc manually before the DROP COLUMN can be processed successfully.