[Phpmyadmin-devel] structure diff - possible patch
Eric Persson
eric at persson.tm
Sun Oct 27 05:59:02 CET 2002
Hi everyone,
Some of you might remember I asked for a structure diff earlier, I want
to compare 2 tables and get an alter query which would make the target
table to look exactly like the original table.
I have now made a small hack which almost does this, at least it show
the idea of what I want it to be.
I added the file diff_tables.php which currently takes ?db as an get
argument. It shows the table in that database and you can pick 2 tables
to compare and you get a hopefully working alter query. :)
I modified left.php to show a link after the num_tables, like (diff)
which goes to diff_tables.php with ?db as the database.
If you want to try it out, patch your 2.3.2 version of phpmyadmin with
the files, or visit http://www.egp.cx/phpMyAdmin-2.3.2/ where I put up a
patched version. Please dont destroy the tables to much. :)
Some ideas of what to improve:
* maintain the order of the fields
* maintain keys/indexes and auto_increment fields
* make it possible to diff tables between databases
* make it possible to diff create table queries
* create a nice graphical view over whats added/changed/dropped
Do you have any furhter suggestions?
Please comment and try it out and think about it. The code is still very
hacky, and I might have re-invented the wheel in some places, but I'm
not yet familiar with all libraryfiles etc.
Best regards,
Eric
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff_tables.php
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20021027/c5e0a46f/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: left.php
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20021027/c5e0a46f/attachment-0001.ksh>
More information about the Developers
mailing list