Page 1 of 1

how do I... NOT NULL attribute for TIMESTAMP

Posted: Wed 14 Jan 2015 22:13
by phpwalter
I define a table...

Code: Select all

CREATE TABLE  user_segment_score_batch (
  user_id INT(10) UNSIGNED NOT NULL,
  segment_id INT(6) UNSIGNED NOT NULL,
  segment_score INT(10) UNSIGNED NOT NULL DEFAULT 0,
  created_by INT(10) UNSIGNED NOT NULL DEFAULT 10 COMMENT 'BATCH process ID',
  created_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (user_id, segment_id)
)
ENGINE = MEMORY
CHARACTER SET utf8
COLLATE utf8_general_ci;
But when I EXPORT or GENERATE SCHEMA SCRIPT I don't get the NOT NULL on the TIMESTAMP...

Code: Select all

CREATE TABLE  user_segment_score_batch (
  user_id INT(10) UNSIGNED NOT NULL,
  segment_id INT(6) UNSIGNED NOT NULL,
  segment_score INT(10) UNSIGNED NOT NULL DEFAULT 0,
  created_by INT(10) UNSIGNED NOT NULL DEFAULT 10 COMMENT 'BATCH process ID',
  created_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (user_id, segment_id)
)
ENGINE = MEMORY
CHARACTER SET utf8
COLLATE utf8_general_ci;
I really need this attribute definition on my EXPORT, GENERATE and SYNC operations. I'm managing DBs in a DEV, QA and PROD environments, I have corporate policies (NOT NULL on TIMESTAMP) to follow, and it's getting tedious to hand fix this each time.

I forget to fix it, I get kicked by corporate.

Any ideas?

Thx

Walter

Re: how do I... NOT NULL attribute for TIMESTAMP

Posted: Thu 15 Jan 2015 11:18
by alexa
We are aware of this issue and will fix it in the next product build. We will notify you once it's available for downloading.

Re: how do I... NOT NULL attribute for TIMESTAMP

Posted: Fri 16 Jan 2015 05:17
by phpwalter
Thanks!

Looking forward to it!

Re: how do I... NOT NULL attribute for TIMESTAMP

Posted: Mon 19 Jan 2015 21:06
by phpwalter
Just pulled down v6.3.337

Still do not have "NOT NULL" in my TIMESTAMP field results from a "Generate Schema Script"

Maybe next release?

Thx

Re: how do I... NOT NULL attribute for TIMESTAMP

Posted: Tue 20 Jan 2015 05:09
by alexa
It's still to be fixed.