Skip to content

Database backup doesn't include triggers #9036 #11369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 9, 2018

Conversation

denisristic
Copy link
Contributor

ADDED getTableTriggersSql() and now it returns valid SQL with drop & create queries for triggers

Fixed Issues (if relevant)

  1. Database backup doesn't include triggers #9036

ADDED getTableTriggersSql() and now it returns valid SQL with drop & create queries for triggers
@orlangur
Copy link
Contributor

Shouldn't they be recreated with bin/magento setup:upgrade? Please check #10958 (comment)

@denisristic
Copy link
Contributor Author

@orlangur I think that this issue is not about indexer triggers but SQL database triggers. If you create inside SQL database custom trigger than, before my fix, those wouldn't be dumped to a backup file (you could't recreate them from backup)

@orlangur
Copy link
Contributor

I don't think making any changes to database, like adding triggers, manually is a Magento way.

Why not simply implement it in RecurringData, similar to the example with ->unsubscribe()->subscribe()?

@denisristic
Copy link
Contributor Author

@orlangur I know that this isn't Magento way to do something, but I didn't report this issue nor I've put it on to-do list on SQUASHTOBERFEST :)
You are able to do a backup (dump) of database and it makes sense to dump triggers (for any reason) as well

@hostep
Copy link
Contributor

hostep commented Oct 12, 2017

@orlangur: please read the issue report #9036, it will make everything clear ;)

@orlangur
Copy link
Contributor

orlangur commented Oct 12, 2017

@hostep I read it before my very first comment here :) Just that I don't think such case is valid.

Does Magento backup database tables created manually?

It is fine to dump triggers when you do it with some tooling. From within Magento I don't think it's a good idea to dump anything not application-specific.

Let me raise this question in maintainers group, maybe I'm missing something.

@vrann vrann self-assigned this Oct 24, 2017
@vrann vrann added this to the October 2017 milestone Oct 24, 2017
@vrann vrann added Release Line: 2.2 2.2.x bug report Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release labels Oct 24, 2017
@okorshenko okorshenko modified the milestones: October 2017, November 2017 Nov 1, 2017
@okorshenko okorshenko assigned okorshenko and unassigned okorshenko and vrann Nov 28, 2017
@okorshenko okorshenko removed the 2.2.x label Dec 14, 2017
@okorshenko okorshenko removed this from the December 2017 milestone Jan 8, 2018
@okorshenko okorshenko added this to the January 2018 milestone Jan 8, 2018
@magento-engcom-team magento-engcom-team added the Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release label Jan 8, 2018
@magento-team magento-team merged commit f1bcf38 into magento:2.2-develop Jan 9, 2018
@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report bugfix Fixed in 2.2.x The issue has been fixed in 2.2 release line Progress: accept Release Line: 2.2 Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants