MCPcopy
hub / github.com/django/django / remove_sql

Method remove_sql

django/db/models/constraints.py:501–516  ·  view source on GitHub ↗
(self, model, schema_editor)

Source from the content-addressed store, hash-verified

499 )
500
501 def remove_sql(self, model, schema_editor):
502 condition = self._get_condition_sql(model, schema_editor)
503 include = [
504 model._meta.get_field(field_name).column for field_name in self.include
505 ]
506 expressions = self._get_index_expressions(model, schema_editor)
507 return schema_editor._delete_unique_sql(
508 model,
509 self.name,
510 condition=condition,
511 deferrable=self.deferrable,
512 include=include,
513 opclasses=self.opclasses,
514 expressions=expressions,
515 nulls_distinct=self.nulls_distinct,
516 )
517
518 def __repr__(self):
519 return "<%s:%s%s%s%s%s%s%s%s%s%s>" % (

Callers

nothing calls this directly

Calls 4

_get_condition_sqlMethod · 0.95
_delete_unique_sqlMethod · 0.80
get_fieldMethod · 0.45

Tested by

no test coverage detected