python - Edit database outside Django ORM -
if 1 using django, happens changes made directly database (in case postgres) through either pgadmin or psql?
how such changes handled migrations? take precedence on orm thinks state of affairs is, or django override them , impose it's own sense of change history?
finally, how of these issues effected, or avoided, git, if @ all?
thanks.
you can exclude model django migrations, , responsible adjust schema django code (or django code existing schema):
class somemodel(models.model): class meta: managed = false db_table = "some_table_name" name = models.fields.... note can't have both ways, migrations preferred when possible. can define custom sql migration, save need external changes. however, need handle schema elsewhere instead of migrations, , use managed=false
Comments
Post a Comment