[GH-ISSUE #47] Add support for triggers #172

Open
opened 2026-03-07 20:41:48 +03:00 by kerem · 3 comments
Owner

Originally created by @joogoo on GitHub (May 7, 2017).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/47

Hi, this tool is great !
It's would be nice if it was also possible to have migration exports of triggers !

Originally created by @joogoo on GitHub (May 7, 2017). Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/47 Hi, this tool is great ! It's would be nice if it was also possible to have migration exports of triggers !
Author
Owner

@jasdeepkhalsa commented on GitHub (Nov 24, 2017):

Hey @joogoo thanks for the suggestion.

So each time you, for example, add a trigger you want it to form part of the migration diff right?

I think this could be a feature which can be turned on, by default would be off, and would just run the MySQL command show triggers; and then compare which triggers are in the source vs. the target, and CREATE TRIGGER the ones the target database doesn't have and DELETE TRIGGER any that the target has which are not in the source, and UPDATE TRIGGER any which exist in both databases under the same trigger_name but their values differ somehow

<!-- gh-comment-id:346856258 --> @jasdeepkhalsa commented on GitHub (Nov 24, 2017): Hey @joogoo thanks for the suggestion. So each time you, for example, add a trigger you want it to form part of the migration diff right? I think this could be a feature which can be turned on, by default would be off, and would just run the MySQL command `show triggers;` and then compare which triggers are in the source vs. the target, and `CREATE TRIGGER` the ones the target database doesn't have and `DELETE TRIGGER` any that the target has which are not in the source, and `UPDATE TRIGGER` any which exist in both databases under the same `trigger_name` but their values differ somehow
Author
Owner

@nowarzz commented on GitHub (Dec 7, 2017):

and also procedures

<!-- gh-comment-id:349841616 --> @nowarzz commented on GitHub (Dec 7, 2017): and also procedures
Author
Owner

@amit11111 commented on GitHub (Aug 7, 2019):

Hello,

Can you please let me know how to turn on for trigger migration.Currently I am not able to get trigger and procedure data into my .sql file which is generated by our tool.

Thank In Advance
Amit Kagadiya

<!-- gh-comment-id:518957760 --> @amit11111 commented on GitHub (Aug 7, 2019): Hello, Can you please let me know how to turn on for trigger migration.Currently I am not able to get trigger and procedure data into my .sql file which is generated by our tool. Thank In Advance Amit Kagadiya
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DBDiff#172
No description provided.