===== Usage and application of the SQL dump converter ===== ==== 1. Create a structure file using phpMyAdmin ==== - Start phpMyAdmin and open the required database. - Click on the Menu bar, click **Export**. A screen similar to the following one appears. - Select **all** the required tables of your addons. - Choose all other settings appropriately according to the template. - Start the download by clicking on the **OK** button at the bottom. - Save the received *.sql file on your computer. {{ :dev:all:exportstructwith-phpmyadmin.gif?nolink |}} ==== 2. Converting the *.sql file ==== Normally at this point you really have to do some hard work. Starting from the dump you have to write a lot of lines of beautiful PHP SQL statements by hand, which are then sent individually to the server.\\ That's too cumbersome for us, so we do that 'a bit' easier: - First the converter is started by clicking on this link: [[http://isteasy.de/otools/ConvertDump/?b=a20zw3|SQL-Dump-Konverter]]. - Once the converter is started, **Browse** to the newly created dump file and select it. - Possibly even customize the prefix of the tables to those used in the source database. - If no other special requests are made: click **Start Conversion**. - after a few moments, the converted file is already available for download. - The store newly created file on your computer, and that's it. //(To reassure about privacy Concerned: Neither the source nor the target file are stored on the server.)// {{ :dev:all:sqldumpconverter.en.gif?nolink |}} ==== 3. Integrating the structure file (from 2.8.4 only) ==== Nothing easier than that.\\ The only thing one needs to do is to copy the install-struct.sql into the root directory of the addon (where also install.php can be found). The code below shows the integration of the files //install.php//, //uninstall.php//, and //upgrade.php// into an addon. doImport(__FILE__)) { // --- finish process import file --------------------------------- // --- begin all other individual stuff --------------------------- /* * do all other stuff */ // --- end of all other individual stuff -------------------------- } else { $aError[] = $oImporter->getError(); } //endif unset($oImporter); } else { $aError[] = 'missing or not readable file \"'.basename(__DIR__).'/install-struct.sql\"'; } //endif /* **** END INSTALL / UNINSTALL / UPGRADE *********************************** */ doImport(__FILE__)) { $aError[] = $oImporter->getError(); } unset($oImporter); } else { $aError[] = 'missing or not readable file \"'.basename(__DIR__).'/install-struct.sql\"'; } //endif // --- finish process import file --------------------------------- /* **** END INSTALL / UNINSTALL / UPGRADE *********************************** */ I'd like to write more, but THAT was already all. There is nothing more to do. PS: the above code sample can also be downloaded by simply clicking on the label....\\ --- //[[manuela@isteam.de|Manuela v.d.Decken]]  08.09.2014// ----