Start a new topic

Problems with table descriptions when exporting tables.

[This topic is migrated from our old forums. The original author name has been removed]

Hello, I'm using MySQL DB and trying to export tables, using DbVis. Having problems with table descriptions in resulting SQL. For example DbVis's variant of table: CREATE TABLE actor ( actor_id smallint(5) NOT NULL AUTO_INCREMENT, first_name varchar(45) NOT NULL, last_name varchar(45) NOT NULL, last_update timestamp DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (actor_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE INDEX idx_actor_last_name ON actor (last_name); And MySQL version (correct): CREATE TABLE `actor` ( `actor_id` smallint(5) unsigned NOT NULL auto_increment, `first_name` varchar(45) NOT NULL, `last_name` varchar(45) NOT NULL, `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`actor_id`), KEY `idx_actor_last_name` (`last_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; The main problem for me is that DbVis is always skipping "unsigned" when exporting tables. Also it's skipped "on update". Why does it skip "unsigned" all the time if it shows it correctly in columns information? Testing evaluation version 7.0.6.

[This reply is migrated from our old forums.]

Re: Problems with table descriptions when exporting tables.
Hi Ed, Thanks for the pointer. Always good to get confirmation about suspicions like this. Anyway, I found a way to extract the ON UPDATE clause from the SHOW CREATE TABLE output where it is present. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Problems with table descriptions when exporting tables.
Have you seen this ? http://forums.mysql.com/read.php?101,177340,190898#msg-190898 Seems to be implicit behaviour of the TIMESTAMP type
[This reply is migrated from our old forums.]

Re: Problems with table descriptions when exporting tables.
Hi, Thanks for reporting these problems. I have found a solution for the missing UNSIGNED keyword so it will be fixed in the next maintenance release. I'm still looking for a good solution for the problem with the missing ON UPDATE clause. It is harder to fix because this information is not available in any metadata tables or in the result from the SHOW FULL COLUMNS statement. Best Regards, Hans