0
CREATE TABLE `addons` (
  `id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf32_unicode_ci DEFAULT NULL,
  `unique_identifier` varchar(255) COLLATE utf32_unicode_ci DEFAULT NULL,
  `version` varchar(255) COLLATE utf32_unicode_ci DEFAULT NULL,
  `activated` int(11) NOT NULL DEFAULT '1',
  `image` varchar(1000) COLLATE utf32_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci

MySQL said: Documentation

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

The same db imported on Cpanel works fine but it throws an error in the Plesk server

Olivier
  • 13,283
  • 1
  • 8
  • 24
Shubham Nikam
  • 62
  • 1
  • 7
  • 1
    Does this answer your question? [Why there can be only one TIMESTAMP column with CURRENT\_TIMESTAMP in DEFAULT clause?](https://stackoverflow.com/questions/4489548/why-there-can-be-only-one-timestamp-column-with-current-timestamp-in-default-cla) – Olivier Apr 09 '22 at 11:49
  • @Olivier the query on the question works fine. Tested on `MySQL 8.0.25` , and works on the fiddle too https://www.db-fiddle.com/f/wVZbJBquJM4Upm8AMfoiKv/0 – Ergest Basha Apr 09 '22 at 11:55
  • @Olivier but it shows error while importing – Shubham Nikam Apr 09 '22 at 12:13

0 Answers0