n98-magerun
n98-magerun copied to clipboard
db:dump - Skip views/procedures
Could we have an option to skip exports of Views/Procedures? I am trying to export a magento db which also has custom views and this is causing issues on import. I added the view names to the strip list but it seems like strip only works on real tables.
I need further investigation to solve the issue. It seems that mysqldump which is used cannot distinguish between views and tables. So we need to detect it with PHP.
See: http://bugs.mysql.com/bug.php?id=16453
This would be nice to have. I have the same issue as @asalce.
mysqldump: Couldn't execute 'show table status like 'v\_ea\_product\_summary'': SELECT command denied to user ''@'%' for column 'entity_id' in table 'catalog_product_flat_1' (1143)
v_ea_product_summary
is a view.
@danemacmillan @asalce In the meantime we added a logic which remove the definer from sql dump.
This is solved by piping the sql dump into this command: ' | LANG=C LC_CTYPE=C LC_ALL=C sed -E 's/DEFINER[ ]*=[ ]*
[^]+
@[^
]+/DEFINER=CURRENT_USER/g'
.
IMHO the issue should then be solved if your user is granted to create views which should be.