-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Replace table prefix not working for me #17656
Comments
I have the same problem. Neither SQL command is not working but no errors are displayed. SET @database = "database_name";
SET @old_prefix = "old_prefix_";
SET @new_prefix = "new_prefix_";
SELECT
concat(
"RENAME TABLE ",
TABLE_NAME,
" TO ",
replace(TABLE_NAME, @old_prefix, @new_prefix),
';'
) AS "SQL"
FROM information_schema.TABLES WHERE TABLE_SCHEMA = @database; Server configuration Operating system: Windows 11 (xampp) |
Same problem as described. The browser console outputs:
in phpMyAdmin version: 5.2.0 |
After looking at this for a while: It seems that the fetched form with the id "ajax_fom" is never actually written to the DOM. This is because the "bulkActionModal" (in check_all_tables.twig) is embedded in the form "tablesForm" in table_header.twig:74
Since you can't have a form inside of another form, the browser simply doesn't render it in the DOM. Moving {% if check_all_tables %}
{% include 'database/structure/check_all_tables.twig' with check_all_tables only %}
{% endif %} after the EDIT: It does not make the console error go away, but at least this function is working again. Maybe this should be further investigated. |
Thank you @codegain for the debug !
Using the latest 5.2 version in development (phpMyAdmin 5.2+snapshot) may fix the error depending on what it was |
Wow I just found something that blew my brain ! If you phpmyadmin/js/src/database/structure.js Line 259 in 2a4c582
|
Pull-request: #17741 Signed-off-by: William Desportes <williamdes@wdes.fr>
This is now fixed, I advise users to test the latest 5.2 version in development (phpMyAdmin 5.2+snapshot) and let us know if there is bugs |
Hi, I've just tested the "Replace table prefix" function and it seems to be ok but export database doesn't work anymore. |
Pull-request: phpmyadmin#17741 Signed-off-by: William Desportes <williamdes@wdes.fr> Signed-off-by: Sebastian Walther <swalther@complex-it.de>
Does export still not work now? |
Hi! |
@williamdes I see this is closed but this is what is happening to me.. I've tried adding a prefix and replacing, I've even tried running an SQL query but nothing is resulting from any of these actions despite repeated attempts, refreshes, deleting my database and starting over (of course I have backups) |
It's closed but not yet released, see #17830 |
@williamdes How soon will this fix be released? I'm not a developer and don't see an easy way to install the snapshot.. I'm just using phpMyAdmin online via MAMP, trying to import files to a Wordpress site for a client. I just need the option in the drop down to do what it says it does :( |
@CelesteCote Had same problem on a Joomla 4 website between local and staging installations. Here's the fix that worked on my Mac.
|
Thanks for the instructions. They work. |
Describe the bug
If I try to replace table prefix(es) nothing happens.
To Reproduce
Steps to reproduce the behavior:
Nothing happens.
Expected behavior
All the selected tables prefixes' aaa_ shoud be replaced by bbb_
Server configuration
Client configuration
Additional context
Used to work in all previous phpMyAdmin versions I've tested.
The text was updated successfully, but these errors were encountered: