Prestashop – ERROR 1292 in Importazione DB

by News Commenti disabilitati su Prestashop – ERROR 1292 in Importazione DB

E’ possibile che in fase di importazione DB possiamo ricevere molti errori Prestashop di questo tipo:

ERROR 1215 (HY000) at line 153145: Cannot add foreign key constraint
ERROR 1146 (42S02) at line 153166: Table ‘***.shop_custom_field’ doesn’t exist
ERROR 1215 (HY000) at line 153170: Cannot add foreign key constraint
ERROR 1146 (42S02) at line 153181: Table ‘***.shop_custom_field_lang’ doesn’t exist
ERROR 1215 (HY000) at line 153186: Cannot add foreign key constraint
ERROR 1146 (42S02) at line 153201: Table ‘***.shop_custom_field_option’ doesn’t exist
ERROR 1215 (HY000) at line 153212: Cannot add foreign key constraint
ERROR 1146 (42S02) at line 153221: Table ‘***.shop_custom_field_option_la
ERROR 1292 (22007) at line 156727: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘newsletter_date_add’ at row 1
ERROR 1292 (22007) at line 156928: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘newsletter_date_add’ at row 4
ERROR 1292 (22007) at line 157129: Incorrect date value: ‘0000-00-00’ for column ‘birthday’ at row 2
ERROR 1292 (22007) at line 157330: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘newsletter_date_add’ at row 1
ERROR 1292 (22007) at line 157531: Incorrect date value: ‘0000-00-00’ for column ‘birthday’ at row 1
ERROR 1292 (22007) at line 157732: Incorrect date value: ‘0000-00-00’ for column ‘birthday’ at row 1
ERROR 1292 (22007) at line 157933: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘newsletter_date_add’ at row 2
ERROR 1292 (22007) at line 158134: Incorrect date value: ‘0000-00-00’ for column ‘birthday’ at row 2
ERROR 1292 (22007) at line 739872: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘download_deadline’ at row 1
ERROR 1292 (22007) at line 740073: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘download_deadline’ at row 1
ERROR 1292 (22007) at line 740274: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘download_deadline’ at row 1
ERROR 1292 (22007) at line 740475: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘download_deadline’ at row 1

io ho risolto questo problema modificando il sql-mode di Mysql.
Di default il sql-mode è impostato in questo modo:

sql-mode=”ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”

dobbiamo convertirlo così : 

sql-mode=”NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO”

modificando (ad esempio su ubuntu) il file : /etc/mysql/mysql.conf.d/mysqld.cnf

Seguici su:

FacebookLinkedInLinkedInLinkedIn

Potrebbero Interessarti anche:

    Per maggiori informazioni, per suggerimenti e ottenere un preventivo gratuito per le tue esigenze, contatta la nostra Web Agency.
    Il nostro staff di professionisti sarà lieto di fornire tutte le informazioni ed i costi riguardanti il servizio.
    Attenzione : Webx.it non è un servizio di helpdesk “gratuito” a cui chiedere informazioni.

    WebMaster Firenze

    Fonti : Prestashop, Assistenza Prestashop, Sviluppatore Prestashop, Web-Agency Prestashop, Consulente PrestaShop Supporto tecnico, Assistenza Prestashop, Assistenza e-commerce Prestashop, Assistenza Sito PrestaShop, Assistenza Prestashop Firenze, Assistenza Prestashop Prato, Prestashop ERROR 1292

    , , , , , , , , ,