rename in sql function
only use up and down methods in migration
substitute all occurences in translate
fix index migration

After renaming the table, the index is already
attached to the new table name. Hence, we have
pass the new table name to the renaming method.