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
tracking_version_auto_create = true CREATE TABLE doesn't track changes on a new table #16032
Comments
|
So I've read some of the code and traced some use case. As far as I see, the test phpmyadmin/libraries/classes/Tracker.php Line 836 in 517222f
Is done before phpmyadmin/libraries/classes/Tracker.php Line 847 in 517222f
So no chance that a new table will ever be tracked. May be the No chance either than a phpmyadmin/libraries/classes/Tracker.php Lines 152 to 155 in 517222f
|
|
Thank you for the debug details ! |
|
hi @williamdes I'm not a php developer and the PR will take me some time and probably some wrong php code. I'm not aware enough about this functionally tracking, I tough is was mostly working, but now, I suppose it's at some early stage yet, isn't it? The current Table format phpmyadmin/sql/create_tables.sql Lines 210 to 224 in 441f8da
Store version of table change is done as text: $new_data_processed .= '# log ' . $date . ' ' . $data['username']This part: phpmyadmin/libraries/classes/Tracker.php Lines 451 to 456 in 441f8da
The record # log 2020-03-19 15:56:03 sylvain
DROP TABLE IF EXISTS `matable`;
# log 2020-03-19 15:56:03 sylvain
CREATE TABLE `matable` (
`id` int(11) NOT NULL,
`criterer` varchar(50) NOT NULL,
`valeur` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='C''est une seuper table dit donc';
# log 2020-03-19 18:50:26 sylvain
ALTER TABLE `matable` DROP `valeur`;
# log 2020-03-19 20:55:57 root
ALTER TABLE `matable` ADD `prout` SET('Pipo','molo') NOT NULL AFTER `criterer`;It is then spited programmatically, which seems unnecessary to me, because we obviously have access to a database, and all that code handling tracking should be replaced by a DB relational model. phpmyadmin/libraries/classes/Tracker.php Lines 575 to 605 in 441f8da
Do you have more information about tracking feature of phpmyadmin? |
|
Hi @Sylvain303 🇫🇷 |
|
OK, @williamdes, let me know if I can help. |
|
Starting to work on this issue. |
…icon next to table name
…icon next to table name
…icon next to table name
Fix CREATE TABLE not being tracked when auto tracking is enabled Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
|
Fixed by #16389. |
Describe the bug
I would like to enable Change tracking feature for all operations.
I added the following config in
config.inc.phpTo Reproduce
pma_trackingnor it has tracking enabled.Expected behavior
The new table has tracking enabled by default and the
CREATE TABLEis recorded.Server configuration
20191218.50+debian91.gbp23c2daIf I put that at the end of config.inc.php I get:
print_r($cfg); die();I have
Client configuration
Additional context
phpmyadmin is configured from ansible playbook.
The text was updated successfully, but these errors were encountered: