'To check constraints, we set constraints to immediate. Then, when, we\'re done we must ensure they
are returned to deferred.'

def check_constraints(self, table_names=None):

    self.cursor().execute(u'SET    CONSTRAINTS    ALL    IMMEDIATE')
    self.cursor().execute(u'SET    CONSTRAINTS    ALL    DEFERRED')
