fix renaming indexes used by foreign key constraints