0
`effective_end_utc` timestamp NOT NULL COMMENT 'The UTC timestamp for when the target ceases to be in effect.',

This will end up giving me

ERROR 1067 (42000) at line 27: Invalid default value for 'effective_end_utc'

Base on other reponse, I have even set the mode to following at the begining of schema

SET GLOBAL SQL_MODE='ALLOW_INVALID_DATES'

Any idea whats going wrong?

4
  • remove this from the query: COMMENT 'The UTC timestamp for when the target ceases to be in effect.' just use effective_end_utc timestamp NOT NULL Commented Nov 8, 2016 at 16:09
  • we use comments in every line. It does not change anything. Commented Nov 8, 2016 at 16:11
  • can you provide complete query Commented Nov 8, 2016 at 16:12
  • 1
    Look at my answer here. And by the way, ALLOW_INVALID_DATES only applies to date(-time), not to timestamp. Commented Nov 8, 2016 at 17:35

1 Answer 1

3

The schema should be changed with a default value like

 `reported_timestamp_utc` timestamp NULL DEFAULT NULL COMMENT
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.