Menu

#632 After alter table on update: current timestamp disappeared

Git
closed-fixed
nobody
None
5
2018-09-19
2018-08-17
No

Hi,

When I create table and have field defined as datetime, with "current timestamp" option on update, table is created correctly.

But when I click alter table and save it, this option disappeared. It is not selected automatically durring alter table operation and after save is gone. It is anoying to be carefull about this, can you fix it please?

Tested with freshly downloaded version 4.6.3 (mysql only, english) on MySQL version: 5.5.5-10.3.8-MariaDB through PHP extension MySQLi

Thank you. Jakub

Discussion

  • Jakub Vrána

    Jakub Vrána - 2018-09-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,6 @@
     Hi,
    
    -When I am create table and have field deffined as datetime, with "current timestamp" option on update, table is created correctly.
    +When I create table and have field defined as datetime, with "current timestamp" option on update, table is created correctly.
    
     But when I click alter table and save it, this option disappeared. It is not selected automatically durring alter table operation and after save is gone. It is anoying to be carefull about this, can you fix it please?
    
    • status: open --> closed-works-for-me
     
  • Jakub Vrána

    Jakub Vrána - 2018-09-18

    I could not reproduce this.

     
  • Jakub Sevcik

    Jakub Sevcik - 2018-09-18

    I have created video:
    https://youtu.be/lwY1niRANso
    first I create table with datetime column with on update set current timestamp. than I edit name field (change max length from 100 to 200 chars) and save changes. as you can see in sql command ther is no on update set current timestamp anymore. I must edit it open and set it manually. I think problem is when I click edit table there is selected on update with no value - in select box should be selected current timestamp

     
  • Jakub Vrána

    Jakub Vrána - 2018-09-19
    • status: closed-works-for-me --> pending-works-for-me
     
  • Jakub Vrána

    Jakub Vrána - 2018-09-19

    What does SHOW FULL COLUMNS FROM test return?

     
  • Jakub Sevcik

    Jakub Sevcik - 2018-09-19

    here is show full collumns: https://grabber.app/8yrs0q

     
  • Jakub Vrána

    Jakub Vrána - 2018-09-19
    • status: pending-works-for-me --> closed-fixed
     
  • Jakub Vrána

    Jakub Vrána - 2018-09-19

    Hm, it returns current_timestamp() instead of CURRENT_TIMESTAMP. Should be fixed now.

     
  • Jakub Sevcik

    Jakub Sevcik - 2018-09-19

    great it is working. I cloned master version from github and run compile but it is not complied sucessfuly:
    line 1294 connect($M,$V,$E){preg_match('~^(https?://)?(.*)~',$M,$A);$this->_url=($A[1]?$A[1]:"http://")."$V:$E@$A[2]";$H=$this->query('SELECT 1');if($H)}return(bool)$H;function there is mistake - } should be few chars right - not if($H)}return(bool)$H;function but if($H)return(bool)$H;}function

    also adminer.php?file=default.css&version=4.7.0-dev do not contain css but some binary data bod~~~~~~���������������������������v�����

    Am I doing something wrong for compiling? I just ran ./compile.php

     
    • Jakub Vrána

      Jakub Vrána - 2018-09-19

      You don't need the compiled version, just access adminer/index.php. There was a bug in the compilation, I've fixed it. Thanks for reporting it.

       
  • Jakub Sevcik

    Jakub Sevcik - 2018-09-19

    I preffer single file version, it is easyer to use it in production

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.