After alter table on update: current timestamp disappeared
Database management in a single PHP file
Brought to you by:
jakubvrana
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
Diff:
I could not reproduce this.
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 noon 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 selectedon update
with no value - in select box should be selectedcurrent timestamp
What does
SHOW FULL COLUMNS FROM test
return?here is show full collumns: https://grabber.app/8yrs0q
Hm, it returns
current_timestamp()
instead ofCURRENT_TIMESTAMP
. Should be fixed now.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 - notif($H)}return(bool)$H;function
butif($H)return(bool)$H;}function
also
adminer.php?file=default.css&version=4.7.0-dev
do not contain css but some binary databod~~~~~~���������������������������v�����
Am I doing something wrong for compiling? I just ran
./compile.php
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.I preffer single file version, it is easyer to use it in production