-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
@tomage leaving a placeholder here for MySQL support since it is actively under development.
So far it looks like MySQL support is going to be close to feature compliance with Postgres, with the following primary notes:
- Conditions aren't part of the trigger definition. Conditional logic on the old/new rows have to be placed inside the trigger function itself, making it a bit more difficult to make the
pgtrigger.Qandpgtrigger.Fobjects work as well. It should still be possible to make them completely compatible, but the first release of MySQL support may simply not have built-in condition support - In order to support
pgtrigger.ignore, we may need to makepg-connectioncompatible with MySQL so that we can hook into SQL generation and set temporary variables. Supportingpgtrigger.ignorewill almost certainly not be available in the first release of MySQL support - I have not researched much into statement-level triggers for MySQL. It is unclear what type of support will be available for this.
- MySQL does not support commenting directly on trigger objects, which is how pg-trigger maintains the hashes of installed triggers. We may need to insert a comment into the MySQL trigger definition to maintain its hash to know when the entire definition changes. Or we may need to rework how to detect trigger changes altogether. This is perhaps the most in-the-weeds change we have for MySQL support
It is likely that the support for MySQL and Postgres will be minimal enough that we can keep it in the same library. I am actively planning on renaming this to django-dbtrigger when we have close to full MySQL support.
Please thumbs up this feature request if you want it. It helps me prioritize my time when contributing to open source projects.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request