There is no bug here. Hibernate just gives you the DDL needed to reach the state of your database schema that Hibernate expects. How you do the migration is up to you, and you will have to think about migration. The error you are getting is pretty clear Cannot change column 'id': used in a foreign key constraint 'FK8dpmsvheg2i2kn33cjbi5652n' of table 's19_govnet.appointment_registered_users'
. Just drop the foreign key and re-create it after altering all the column types.