jack,
@jack@social.jacklinke.com avatar

I have a custom django model field in an installable standalone app.

This app has a migration file that creates a new composite type in a postgres db (if it doesn't already exist). Users installing the app shouldn't have to manually run this migration.

Anyone know how I tell django's migrations autodetector that if another app's model uses my custom model field and we generate migrations model, it needs to add a dependency to the migration associated with the custom field? 🤔

#django

CodenameTim,
@CodenameTim@fosstodon.org avatar

@jack I suspect you'd need to do something in MigrationAutodetector.detect_changes method similar to the generate* methods. The dependencies get associated with the operation itself as far as I can see.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • django
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • megavids
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • Leos
  • cisconetworking
  • provamag3
  • JUstTest
  • lostlight
  • All magazines