Monday, November 11, 2024
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 110 times, 1 visits today)
Baca Juga :  Cara Install LAMP Stack di Arch Linux

Similar Posts