SQLSTATE[HY000]: General error: 1025 Error on rename of
Without knowing your DDL, I did find this on the docs regarding error code 1025, in one of the user comments:


  To avoid getting this error while trying to drop a foreign key, use the constraint name rather than the column name of the foreign key.


So, instead of dropping the ghost.row_id column, try dropping the foreign key using the FK name.