faradey / madock

Local development environment based on Docker
MIT License
26 stars 7 forks source link

Add post dump command to fix DEFINER #5

Closed artmouse closed 1 year ago

artmouse commented 1 year ago

Execute after db:export

's/DEFINER[ ]*=[ ]*`[^`]+`@`[^`]+`/DEFINER=CURRENT_USER/g'
faradey commented 1 year ago

there is such an expression s/DEFINER[ ]=[ ][^]*/*/ before import. Perhaps it will be enough to apply this expression after the export?

faradey commented 1 year ago

Removing a username from a database dump on export has been added and tested. https://github.com/faradey/madock/commit/9784dc770e568e97bb60f55db561e448adfeec3a