mahnung/sql/llx_mahnung_trackingpattern.sql
Eduard Wisch bfc89917b1
All checks were successful
Deploy mahnung / deploy (push) Successful in 14s
fix(mahnung): tms-Spalten auf ON UPDATE CURRENT_TIMESTAMP umstellen [deploy]
tms war als reines TIMESTAMP angelegt -> unter explicit_defaults_for_timestamp
NULL DEFAULT NULL, blieb daher bei jedem UPDATE leer. Jetzt Dolibarr-Standard
DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP fuer mahnung/stufe/
trackingpattern. Neue idempotente Migration migrateTimestampSpalten() im init()
befuellt Alt-NULLs aus datec und stellt die Spalte per ALTER TABLE um.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 18:13:25 +02:00

21 lines
909 B
SQL

-- Copyright (C) 2026 Eduard Wisch <data@data-it-solution.de>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
-- Konfigurierbare Tracking-Pattern (Regex + URL-Template) pro Versand-Provider.
CREATE TABLE llx_mahnung_trackingpattern (
rowid INTEGER AUTO_INCREMENT PRIMARY KEY,
entity INTEGER DEFAULT 1 NOT NULL,
provider VARCHAR(20) NOT NULL,
label VARCHAR(80) NOT NULL,
regex VARCHAR(255) NOT NULL,
url_template VARCHAR(255) NOT NULL,
priority INTEGER DEFAULT 100,
active TINYINT DEFAULT 1,
datec DATETIME,
tms TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;