Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#9 wrong sql while changing table column: int->datetime

2.0.0
closed-out-of-date
Jakub Vrána
Common (150)
5
2009-11-06
2009-09-10
asdf asdf
No

Hi, when i change table column (name=tries) from int(3) default '0' into datetime column(lastloginfail) Adminer generates wrong sql: ... CHANGE `tries` `lastloginfail` datetime NULL DEFAULT '0' COMMENT '' AFTER `lastlogin`,

SQLs to reproduce this scenario:

CREATE TABLE `test` (
`tries` int(3) NOT NULL COMMENT ''
) AUTO_INCREMENT=0 COMMENT='';

ALTER TABLE `test`
ALTER `tries` SET DEFAULT '0';

ALTER TABLE `test`
CHANGE `tries` `lastlogin` datetime NOT NULL DEFAULT '0' COMMENT '' FIRST,
RENAME TO `test`,
ENGINE='MyISAM' COLLATE 'latin1_swedish_ci' AUTO_INCREMENT=0 COMMENT='';

Discussion

  • Jakub Vrána
    Jakub Vrána
    2009-09-11

    • status: open --> closed
     
  • Jakub Vrána
    Jakub Vrána
    2009-09-11

    Thank you for the report.

    Adminer offers default values directly in the table structure edit since version 2.1.0 (to be released soon) so this problem disappeared.

     
  • Jakub Vrána
    Jakub Vrána
    2009-11-06

    • status: closed --> closed-out-of-date