grunt-deployments icon indicating copy to clipboard operation
grunt-deployments copied to clipboard

Make url option more agnostic

Open getdave opened this issue 12 years ago • 3 comments

Currently we expect the user to want to run a search and replace on a single ref in the database. This is url because WordPress (which the Plugin is designed for) stores siteurl in the database and it needs updating when you migrate the DB to a new environment.

However some scenarios might call for several DB refs to be replaced. Suggest renaming the option to be searchreplace and allow the user to define a series of search and replace statements.

Suggestion:

searchreplace: {
    ['search_term1','replace_term1'],
    ['search_term2','replace_term2']    
    ['search_term3','replace_term3']    
}

getdave avatar Jun 11 '13 10:06 getdave

WP DB Migrate Pro also modifies the path to the web root. This is a good example use case for wanting to have multiple search and replace targets.

getdave avatar Jan 02 '14 11:01 getdave

This plugin has far more potential than simply WordPress migration! I use it on other frameworks such as Laravel and would love to see this feature implemented. I ran into this issue when setting the definer in a stored procedure which is environment dependent.

jabes avatar Jan 18 '14 00:01 jabes

@jabes Good to know you're finding this useful elsewhere. Do you have any experience working with Grunt? Would you like to contribute? I'd love to see a pull request. If not I'll try to get around to this...

getdave avatar Jan 18 '14 16:01 getdave