• Hello, every I update this plugin, I get DB error:

    [Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause]
    ALTER TABLE kkrwp2_mailpoet_scheduled_task_subscribers ADD COLUMN updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

    current table structure:
    https://drive.google.com/open?id=1ThOBHn9RYAIqZV3FAs3D0vHmryocRNh3

    WP v5.2.2
    Mailpoet 3 v3.35.0

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi

    I have the same problem and reported it to support
    They are investigating it
    Removal of MailPoet and reinstallation does not work
    Because the tables are not removed!

    Hi there @jansudek,

    Are you using MariaDB or MySQL?

    Thanks!

    Thread Starter jansudek

    (@jansudek)

    Hello @wysija ,

    MySQL v5.5.59 not working ??
    MySQL v5.7.21 working ??
    MariaDB v10.1.38 working ??

    yes, there is still so old mysql 5.5 versions…
    need to change on hosting, but this is not easy ??

    Thread Starter jansudek

    (@jansudek)

    // DB structure:
    
    CREATE TABLE kkrwp2_mailpoet_scheduled_task_subscribers (
      task_id int(11) UNSIGNED NOT NULL,
      subscriber_id int(11) UNSIGNED NOT NULL,
      processed int(1) NOT NULL,
      created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      failed smallint(1) NOT NULL DEFAULT '0',
      error text COLLATE utf8mb4_unicode_ci
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    
    ALTER TABLE kkrwp2_mailpoet_scheduled_task_subscribers
      ADD PRIMARY KEY (task_id,subscriber_id),
      ADD KEY subscriber_id (subscriber_id);
    COMMIT;
    
    // After plugin update:
    
    ALTER TABLE kkrwp2_mailpoet_scheduled_task_subscribers ADD COLUMN updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
    
    // Error on MySQL v5.5.59
    
    #1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

    Hi there @jansudek,

    I’ve just tried the latest release with MySQL 5.5 and can’t replicate. Can you check if it’s still an issue with the latest release?

    Thanks!

    Thread Starter jansudek

    (@jansudek)

    hellooo @wysija ,

    still db error :/ Mailpoet 3 v3.35.3

    [Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause]

    ALTER TABLE kkrwp2_mailpoet_scheduled_task_subscribers ADD COLUMN updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

    its better to change column created_at to DATETIME and while insert row in DB just send mysql datetime ?? this solve error with more then one timestamp datatype in one table

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘DB error: ADD COLUMN updated_at timestamp’ is closed to new replies.