After all permissions are set, if one need to replace a table with a new one, for example "developed"/adjusted elsewhere, is it possible to switch / change tables so that the new "version" inherits the permissions set on the former?

I guess that one alternative is to make the changes to the existing table using code, but is there a ready made function that can compare two tables, take the changes in design from one and apply to the other (make them equal)?

I am looking to avoid having to apply such updates manually.