Fehler bei Update: "SQLSTATE[42000]: Syntax error or access violation: 1068 Multiple primary key defined"

  • Ersteller des Themas Ersteller des Themas sah
  • Erstellungsdatum Erstellungsdatum

sah

Sehr aktives Mitglied
11. Juni 2021
469
48
Herten
Hat jemand einen Tipp?
Code:
Ereignisprotokoll
Ihre aktuelle Version von JTL-Shop
    System: 5.1.2
    Datenbank: 4.06.0
    Ihre aktuelle Template-Version
        System:
        Datenbank: 0.0.0

Starte Update
     Update auf Migration: Create column nMehrfachauswahl in tmerkmal erfolgreich
     Update auf Migration: Remove ssl domain erfolgreich
     Update auf Migration: Add language variables for missing tax zone erfolgreich
     Update auf Migration: Rename the settings-menu entries "Einstellungen" into proper names erfolgreich
     Update auf Migration: re-create the table tstaat, transfer to valid ISO 3166-2 erfolgreich
     Update auf Migration: Add vars and settings for the UstID-check via VIES erfolgreich
     Update auf Migration: Add SEO-URLs erfolgreich
     Update auf Migration: Add customer-fields nSort erfolgreich
     Update auf Migration: add_lang_key_shipping_information erfolgreich
     Update auf Migration: Delete unused fulltext keys erfolgreich
     Update auf Migration: Fix review typo erfolgreich
     Update auf Migration: Move language variables "invalidHash" und "invalidCustomer" to account data erfolgreich
     Update auf Migration: Remove caching method mysql erfolgreich
     Update auf Migration: Add product filter config erfolgreich
     Update auf Migration: Convert encrypted data to utf-8 erfolgreich
Fehler bei Update: "SQLSTATE[42000]: Syntax error or access violation: 1068 Multiple primary key defined" in: /var/www/***/html/***/htdocs/update/migrations/20180115150800_update_tsynclogin.php
SQL:
--
-- Tabellenstruktur für Tabelle `tsynclogin`
--

CREATE TABLE `tsynclogin` (
  `cMail` varchar(50) DEFAULT '0',
  `cName` varchar(20) NOT NULL DEFAULT '',
  `cPass` varchar(20) DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Indizes für die Tabelle `tsynclogin`
--
ALTER TABLE `tsynclogin`
  ADD PRIMARY KEY (`cName`);
 
Zuletzt bearbeitet:

FMoche

Moderator
Mitarbeiter
15. Dezember 2014
1.369
347
Halle (Saale)
Da hat wohl jemand an der Tabelle herumgespielt. cName ist im Shop normalerweise kein Primary Key.
Lösch also vorher manuell diesen Primary Key.
 
  • Gefällt mir
Reaktionen: sah

Ähnliche Themen