MCPcopy
hub / github.com/tortoise/tortoise-orm / has_db_default

Method has_db_default

tortoise/fields/base.py:345–346  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

343 raise ValidationError(f"{self.model_field_name}: {exc}")
344
345 def has_db_default(self) -> bool:
346 return not isinstance(self.db_default, _DB_DEFAULT_NOT_SET)
347
348 @property
349 def required(self) -> bool:

Callers 15

__init__Method · 0.95
requiredMethod · 0.95
get_db_default_valueMethod · 0.95
describeMethod · 0.95
deconstructMethod · 0.95
finalise_fieldsMethod · 0.80
__init__Method · 0.80
constructMethod · 0.80
_get_field_defaultMethod · 0.80
_alter_fieldMethod · 0.80
add_fieldMethod · 0.80

Calls

no outgoing calls