Get the constraints on a table using a new cursor.
(self, table)
| 221 | ] |
| 222 | |
| 223 | def get_constraints(self, table): |
| 224 | """ |
| 225 | Get the constraints on a table using a new cursor. |
| 226 | """ |
| 227 | with connection.cursor() as cursor: |
| 228 | return connection.introspection.get_constraints(cursor, table) |
| 229 | |
| 230 | def get_constraints_for_column(self, model, column_name): |
| 231 | constraints = self.get_constraints(model._meta.db_table) |
no test coverage detected