WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • Hilfe & Support (deutsch) »
  • SQL-Dump-Konverter erzeugt fehlerhafte Install-struct.sql
  • Print
Pages: [1]   Go Down

Author Topic: SQL-Dump-Konverter erzeugt fehlerhafte Install-struct.sql  (Read 5110 times)

Offline kuerbis42

  • Posts: 20
SQL-Dump-Konverter erzeugt fehlerhafte Install-struct.sql
« on: September 27, 2018, 04:46:29 PM »
Hallo Leute,

ich bin schier am verzweifeln, ich denke es liegt an einem REG-Ex Ausdruck innerhalb des SQL-Dump-Konverters.
Hier die Original-Struktur (Auszug) vom MyPhpAdmin-Export:

Code: [Select]
-- Tabellenstruktur für Tabelle `wb_mod_employees`
--

DROP TABLE IF EXISTS `wb_mod_employees`;
CREATE TABLE IF NOT EXISTS `wb_mod_employees` (
  `emp_id` int(11) NOT NULL AUTO_INCREMENT,
  `section_id` int(11) NOT NULL DEFAULT '0',
  `page_id` int(11) NOT NULL DEFAULT '0',
  `dep_id` int(11) NOT NULL DEFAULT '0',
...
  `posted_by` int(11) NOT NULL DEFAULT '0',
  `modified_when` int(11) NOT NULL DEFAULT '0',
  `modified_by` int(11) NOT NULL DEFAULT '0',
  `moderated` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`emp_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `wb_mod_employees_departments`
--

DROP TABLE IF EXISTS `wb_mod_employees_departments`;
CREATE TABLE IF NOT EXISTS `wb_mod_employees_departments` (
  `dep_id` int(11) NOT NULL AUTO_INCREMENT,
  `section_id` int(11) NOT NULL DEFAULT '0',
  `page_id` int(11) NOT NULL DEFAULT '0',
  `active` int(11) NOT NULL DEFAULT '0',
  `position` int(11) NOT NULL DEFAULT '0',
  `department` varchar(150) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`dep_id`),
  UNIQUE KEY `ident_news` (`section_id`,`department`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Tabellenstruktur für Tabelle `wb_mod_employees_settings`
--

DROP TABLE IF EXISTS `wb_mod_employees_settings`;
CREATE TABLE IF NOT EXISTS `wb_mod_employees_settings` (
....


und das hier macht SQL-DUMP-Konverter daraus (Achtung schwer zusehen):

Code: [Select]
DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_employees`;
CREATE TABLE IF NOT EXISTS `{TABLE_PREFIX}mod_employees` (
  `emp_id` int(11) NOT NULL AUTO_INCREMENT,
  `section_id` int(11) NOT NULL DEFAULT '0',
  `page_id` int(11) NOT NULL DEFAULT '0',
  `dep_id` int(11) NOT NULL DEFAULT '0',
....
  `posted_by` int(11) NOT NULL DEFAULT '0',
  `modified_when` int(11) NOT NULL DEFAULT '0',
  `modified_by` int(11) NOT NULL DEFAULT '0',
  `moderated` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`emp_id`)
){TABLE_ENGINE=MyISAM};
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `{TABLE_PREFIX}mod_employees`_departments`
--
DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_employees`_departments`;
CREATE TABLE IF NOT EXISTS `{TABLE_PREFIX}mod_employees`_departments` (
  `dep_id` int(11) NOT NULL AUTO_INCREMENT,
  `section_id` int(11) NOT NULL DEFAULT '0',
  `page_id` int(11) NOT NULL DEFAULT '0',
  `active` int(11) NOT NULL DEFAULT '0',
  `position` int(11) NOT NULL DEFAULT '0',
  `department` varchar(150){FIELD_COLLATION} NOT NULL DEFAULT '',
  PRIMARY KEY (`dep_id`),
  UNIQUE KEY `ident_news` (`section_id`,`department`)
){TABLE_ENGINE=MyISAM};
-- --------------------------------------------------------
-- Tabellenstruktur für Tabelle `{TABLE_PREFIX}mod_employees`_settings`
--
DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_employees`_settings`;
....

es ist ein ' (Appostroph) an folgenden Stellen zuviel:
-- Tabellenstruktur für Tabelle `{TABLE_PREFIX}mod_employees`_departments` bzw. bei

-- Tabellenstruktur für Tabelle `{TABLE_PREFIX}mod_employees`_settings`
--
DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_employees`_settings`;

Ich vermute das es am (von mir verwendeten) zweiten _ (underscore) liegt.



Danke und Gruß, Kuerbis42
Logged

Offline kuerbis42

  • Posts: 20
Re: SQL-Dump-Konverter erzeugt fehlerhafte Install-struct.sql
« Reply #1 on: September 27, 2018, 05:05:05 PM »
Ergänzung:

Selbst wenn man diesen Fehler manuell behebt, dann springt einem die Modul-Installation nachträglich ins Gesicht.
Es kommen dann dubiose Meldungen bzgl. doppelter Spalten.

Funktionieren tut es, wenn man die Underscores rausnimmt.

BTW:
die unter https://wiki.WebsiteBaker.org/doku.php/dev/all/devtools/manual-sqlconvert beschriebenen Installation-Routinen (install.php/upgrade.php und uninstall.php (Codebeispiele) erzeugen die Ausnahme: SqlImport nicht gefunden


Systeminfo:

    Webserver Software: Linux www 4.10.17-3-pve #1 SMP PVE 4.10.17-21 (Thu, 31 Aug 2017 14:57:17 +0200) x86_64
    PHP-Erweiterung: mysqli Dokumentation curl Dokumentation mbstring Dokumentation
    PHP-Version: 7.0.19-1
    WebsiteBaker-Version: 2.12.0 -r81
Logged

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4548
  • Gender: Male
Re: SQL-Dump-Konverter erzeugt fehlerhafte Install-struct.sql
« Reply #2 on: September 27, 2018, 06:28:15 PM »
Hallo,

ich werds überprüfen. Hoffe hat Zeit bis morgen.

Dietmar
Logged
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: SQL-Dump-Konverter erzeugt fehlerhafte Install-struct.sql
« Reply #3 on: September 27, 2018, 06:32:12 PM »
keine Ahnung, ob das Dingen überhaupt macht, was es soll. War der nicht mal für die 2.8.4 gedacht?

Ist aber in Handarbeit auch fix gemacht

Hier mal ein Beispielcode, wie es heute aussehen sollte (und da ist dein Ergebnis weit weg von

Code: [Select]
DROP TABLE IF EXISTS `{TABLE_PREFIX}mod_beispiel_groups`;
CREATE TABLE IF NOT EXISTS `{TABLE_PREFIX}mod_beispiel_groups` (
    `group_id` INT(11) NOT NULL AUTO_INCREMENT,
    `section_id` INT(11) NOT NULL DEFAULT '0',
    `group_name` VARCHAR(230){FIELD_COLLATION} NOT NULL DEFAULT '',
    `group_desc` TEXT{FIELD_COLLATION} NOT NULL,
        PRIMARY KEY (`group_id`)
){TABLE_ENGINE};
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: SQL-Dump-Konverter erzeugt fehlerhafte Install-struct.sql
« Reply #4 on: September 28, 2018, 02:32:48 AM »
Das Problem mit dem 'überflüssigen' Backtick hatten wir schon einmal.
Werde ich wohl die Überarbeitung des Tools etwas vorziehen müssen...  das steht eh schon auf der ToDo-Liste, da durch die Umstellung auf utf8mb4 die Verarbeitung der Charsets und Collations geändert werden muss.

Manuela
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • Hilfe & Support (deutsch) »
  • SQL-Dump-Konverter erzeugt fehlerhafte Install-struct.sql
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2