Postgres Add Constraint If Exists Python