The Alter and drop won't work because you do not have schema edit permissions on the database on Outsystems PaaS or personal environments.
Most likely the problem is that you have a identity link between an entity being created or modified and the entity that you deleted data from and the one being modified has values pointing to what was in the deleted one. This means that when attempting to apply the foreign key constraints it can't. You might be able to get around it by changing all the "Delete rules" of any reference links to Ignore. Then publish and find the offending data records and delete them.
