User Tools

Site Tools


en:dev:all:devtools

Toolbox

Werkzeugkiste


SQL-Dump-Converter (online-Tool)

Supports development for Website Baker 2.8.3(SP3 and up) / 2.10.x / 2.11-x
Tutorial for the SQL-Dump-Converter

start SQL-Dump-Converter

This tool, in conjunction with the (since WB 2.8.3 SP3) built-in SQL Importer is intended to facilitate and accelerate developing installation routines significantly.
The recent install.php - files with page-long, hand-drawn table definitions in PHP syntax finally are a thing of the past.
As a rule, each developer always builds his own table structure belonging to his new addon in the database. From now on, it is sufficient to export that structure (not data) with all tables belonging to it, e.g. via phpMyAdmin, shortly send teh dump through the converter and there you have a valid SQL structure import file. Just a few short lines of code to be inserted in each case in the install.php, uninstall.php, and upgrade.php, and the use of the new structure files during installation, uninstallation and upgrade is ensured.
An import file (install-struct.sql) shall contain all information on table definitions needed to install an addon.
So that a structure file can satisfy all possible modes of the importer, it must contain for each table, the successive combination of the following 2 SQL statements.

DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_modulname_table`
CREATE TABLE IF NOT EXISTS `{TABLE_PREFIX}mod_modulname_table`

Diese Kombination beider Statements erlaubt es dem Importer, wahlweise eine komplette Neuanlage nach evt. vorherigem Löschen alter Tabellen oder Nachinstallation einzelner, fehlender Tabellen bei Reparatur / Upgrade oder einfach eine komplette Deinstallation vorzunehmen.

This combination of the two statements will allow the importer, either to perform a complete new installation after a possible destroy of all old tables or retrofitting individual, lack of tables at repair / upgrade, or simply make a complete uninstall.

en/dev/all/devtools.txt · Last modified: 06.09.2017 12:08 by Manuela v.d.Decken