How to rename a database table

Use the renameTable() method of the \Magento\Framework\DB\Adapter\AdapterInterface:

A usage example from the core:

By default the \Magento\Framework\DB\Adapter\AdapterInterface interface is implemented by the \Magento\Framework\DB\Adapter\Pdo\Mysql class:

See also: