...
- prepared statements - PDO-way of running SQL queries, that have user input in them
- transactions - if one statement within a transaction fails, then all transaction is rolled-back
In particular we can use transactions to execute SQLs during deployment script run. This way SQL error in one SQL will also rollback others in same revision/transaction.