Hi there I'm in the early stages of developing a third party app which makes heavy use of postgres extensions. The app provides an abstract model, so I won't have direct control of user's models or migrations. I'm having trouble getting it to generate sensible migrations for users.
At present the migration process for users is going to be "copy and paste my migration file template into your project, and change the model names to match your app". As far as I can tell there is no way to generate migrations with anything custom. The operations I need to generate are: - CreateExtension() - RunSQL() - (to create slightly non-standard constraints) e.g. perhaps my model could supply a couple of methods: - Model.Meta.pre_creation_operations() - returns a list of operations to apply before the auto-detected model operations, e.g. creating extensions etc - Model.Meta.post_creation_operations() - the same but applied after the auto-detected operations, e.g. adding constraints/indexes. I'm envisaging that the operations returned from both methods would be deconstructed and copied into migration files when makemigrations is run. Has there been any discussion about this previously? I haven't found any. Thanks Craig de Stigter -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CANv5zmWUsfEWpqUWh6He0mMgnt3Pen-oKq%3Dw0wghPzwwtgWWyA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
