How to switch database users to run scripts during code deployment?

How to switch database users to run scripts during code deployment?