how do I... NOT NULL attribute for TIMESTAMP

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
phpwalter
Posts: 3
Joined: Wed 10 Sep 2014 16:38

how do I... NOT NULL attribute for TIMESTAMP

Post by phpwalter » Wed 14 Jan 2015 22:13

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

alexa

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

Post by alexa » Thu 15 Jan 2015 11:18

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.

phpwalter
Posts: 3
Joined: Wed 10 Sep 2014 16:38

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

Post by phpwalter » Fri 16 Jan 2015 05:17

Thanks!

Looking forward to it!

phpwalter
Posts: 3
Joined: Wed 10 Sep 2014 16:38

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

Post by phpwalter » Mon 19 Jan 2015 21:06

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

alexa

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

Post by alexa » Tue 20 Jan 2015 05:09

It's still to be fixed.

Post Reply