Monday, September 26, 2022
Mariadb MySQL

Incorrect table definition – Mariadb

upgrade

“Incorrect table definition – Mariadb”

Structure Mysql / Mariadb

CREATE TABLE es_table (
  id BIGINT(20) UNSIGNED NOT NULL,
  PRIMARY KEY (id),
  UNIQUE KEY unique_id (id),
  client_name VARCHAR(32) NOT NULL,
  client_city VARCHAR(50) NOT NULL,
  status VARCHAR(50) NOT NULL,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  deleted_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);

Error

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause My new MYSQL

Solusi

  • Ini dikarenakan mysql / mariadb versi 5.5
  • Silahkan upgrade mariadb ke latest version

Penutup

Sahabat Blog Learning & Doing demikianlah penjelasan mengenai Incorrect table definition – Mariadb . Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.

(Visited 50 times, 1 visits today)
Klik untuk berbagi dengan orang lain
Baca Juga :  Cara Menampilkan Semua List User Mysql dari Database

Similar Posts