-
Notifications
You must be signed in to change notification settings - Fork 168
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
Possibility to limit push & pull to $prefix tables ? #442
Comments
Hello @taliesinpenbardd , I'm really glad you enjoy using Wordmove doing your everyday work :) You are speaking about dump only tables with prefix or to replace strings only on table with prefix? We're compelling about opening to the user |
Hey @pioneerskies, Yes, I was speaking of the dump part. If the hacked/unreadable tables would not be comprised in the dump, everything would be fine (for me at least) with the search-replace part. For now, when I pull the website, the dump works fine, but the search-replace part fails because of unreadable characters. So I'm left with the files and no DB (or I have to sanitize by hand the downloaded dump file, before importing it locally). And of course, I can't db-push on the staging server, because I'd erase everything else that is not in my local DB. I'm guessing that dumping only the tables I'm working on would streamline things and the search-replace part wouldn't fail - since I know what's in the tables. And to hell with the rest of the DB. But I'm an absolute beginner in Ruby and I don't know if it's easy or not to implement. You tell me. :) |
ATM we-re issuing a search-replace with In this senario the entire DB would be dumped and moved, but only WP tables would be adapted. Remotely dump only prefixed tables would mean to pass another option in movefile.yml, since it's not that easy to read the prefix from I'm thinking loudly in order to clarify ideas on the table and to spot out needs and complications; thanks for discussing w/ me about this topic :) |
My pleasure, if I can modestly help to improve Wordmove. I've seen after a quick search that it's possible to do a partial Configuring a Movefile is a one-time thing (except if you move your site from a server to another regularly, which would be surprising). Adding one option to it isn't much of a work (for the end user, of course) - and could even allow to have a different prefix between local and distant databases (strange idea, but hey, why not ?). I'm thinking aloud too, I have no idea on how much work it would be for you to implement this behavior. Of course, as this is not an issue, you can close/requalify this ticket. :) |
Hello, now that we have slowly moved along the way and we have declared I'm thinking about solving 2 different problems here:
The config inside database:
name: 'mydb'
password: 'mypwd'
[...]
tables:
- 'wp_posts'
- 'wp_users' or database:
name: 'mydb'
password: 'mypwd'
[...]
tables:
- 'wp_*' or a mix database:
name: 'mydb'
password: 'mypwd'
[...]
tables:
- 'custom_prefix_*'
- 'wp_posts' The implementation would rely on
intercepting the use of the wildcard and passing thus to The resulting
Tables would be specified for each environment (local and/or remote) based on the desired behaviour. Opening to scenarios where I can pull only Note that import command would not be altered, since it will import whatever was previously exported. What do you think about? |
Hey, I've carefully read the talks that were linked to this post. I'm not alone! I was just considering selecting the tables I'm working on and ignoring the others - but your call on selecting only one table (when there are only legit prefix_tables*) opens new horizons to me: the ability to push/pull only posts (alongside with their categories, tags, etc.) when it would only be possible with the painful export/import process. Could you detect the use of a wildcard from inside the Ruby code (I'm certain you can, but please bear with me) ? Then if there is a wildcard, you could use Anyhow, I'm glad to see I may have to suffer less in a not too distant future... |
I'm moving the whole conversation inside the wider #468 , thus closing this one. Pls follow me there :) Just a note to @taliesinpenbardd : AFAIK Anyway we're on the path. |
Hey,
First, I'm a heavy user of Wordmove and I cannot thank you enough for that gem.
I'm used to work in confined environments, but sometimes I have to work with other people with debatable habits, and right now I'm dealing with a staging server with a LOT of tables on it, not relevant to the website I'm working on. Some of them have been either hacked or contain ununderstandable content, and Wordmove blocks on the db push/pull.
Could it be possible to define in the Movefile a db prefix (even if it's redundant with the wp-config.php file) or reuse the $wpdb->prefix parameter and push/pull ONLY the tables that begin with that prefix ?
That would simplify a lot my existence, right now.
By advance, thank you.
The text was updated successfully, but these errors were encountered: