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

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -