billchen198318 / bamboobsc

next version move to https://github.com/billchen198318/hillfog, bambooBSC is an opensource Balanced Scorecard (BSC) Business Intelligence (BI) Web platform. BSC's Vision, Perspectives, Objectives of strategy, Key Performance Indicators (KPIs), Strategy Map, and SWOT, PDCA & PDCA report, Time Series Analysis.
Apache License 2.0
227 stars 109 forks source link

MySQL column type “TIMESTAMP” #15

Closed spazio closed 8 years ago

spazio commented 8 years ago

The mysqldump included in the zip is: -- MySQL dump 10.13 Distrib 5.6.15, for FreeBSD10.0 (amd64) It makes an error when importing in mysql-server-5.5 5.5.47-0ubuntu0.14.04.1

Here is the error:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),

`USE' at line 8

From line 8 TIME_STAMP_ timestamp( 3 ) NOT NULL DEFAULTCURRENT_TIMESTAMP( 3 ) ON UPDATE CURRENT_TIMESTAMP( 3 ) ,

Looks like something change in mysql 5.6 regarding timestamp that is different from 5.5 "If you're using MySQL <= 5.6.5, in order to ignore this initialization you need to set the DEFAULT value to 0 or NULL with NULL allowed." From https://stackoverflow.com/questions/22860351/mysql-column-type-timestamp-implicitly-includes-not-null-default-current-time

Do you have a mysql dump from 5.5 or what is the change that has to be made on the mysql dump to import it in 5.5?

Thanks Spazio

billchen198318 commented 8 years ago

Try the file : bbcore_bamboobsc-0-6-2_mysql55_dump.zip

spazio commented 8 years ago

Worked, Thanks! Solved