lomba/schema_plus — Issue #49: change_column fails if index is already there
Author: lunks
Created: 2012-01-09 17:08:11+00:00
State: open

If I use `change_column` with a column that is already there, it fails:

```ruby
PGError: ERROR: current transaction is aborted, commands ignored until end of transaction block
: SELECT distinct i.relname, d.indisunique, d.indkey, m.amname, t.oid,
pg_get_expr(d.indpred, t.oid), pg_get_expr(d.indexprs, t.oid)
FROM pg_class t, pg_class i, pg_index d, pg_am m
WHERE i.relkind = 'i'
AND i.relam = m.oid
AND d.indexrelid = i.oid
AND d.indisprimary = 'f'
AND t.oid = d.indrelid
AND t.relname = 'users'
AND i.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname IN ('"$user"','public') )
ORDER BY i.relname
```