LoginSignup
0
0

More than 1 year has passed since last update.

#1293 – Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

Posted at

Xfreeのサーバーを使ってPHPファイルとphpMyAdminを連携してデプロイに上記のエラーが発生しました。

原因としてはXfreeのmyadminのバージョンが低いため上記のエラーが発生しました。

Xfreeのバージョン(phpmyadminのバージョン)
5.0.95

localhostのバージョン(phpmyadminのバージョン)
5.1.0

原因
phpMyAdiminのバージョンが古いため、CURRENT_TIMESTAMPが1つしか使えないため

対策
CURRENT_TIMESTAMPを1つにする。
php MyAdminの構造をクリックして
タイプカラムを「datetime」へ全て変更する。
デフォルト値カラムを1つは「TIMESTAMP」残りは「null」に変更する。
他にテーブルがある場合も同様の対応をする。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0