CREATE TABLE IF NOT EXISTS parametres_mail (
    id TINYINT UNSIGNED NOT NULL DEFAULT 1,
    smtp_host VARCHAR(190) NOT NULL DEFAULT '',
    smtp_port SMALLINT UNSIGNED NOT NULL DEFAULT 587,
    smtp_secure VARCHAR(10) NOT NULL DEFAULT 'tls',
    smtp_username VARCHAR(190) NOT NULL DEFAULT '',
    smtp_password_encrypted TEXT NULL,
    smtp_from_name VARCHAR(190) NOT NULL DEFAULT '',
    smtp_from_email VARCHAR(190) NOT NULL DEFAULT '',
    smtp_reply_to VARCHAR(190) NOT NULL DEFAULT '',
    smtp_test_email VARCHAR(190) NOT NULL DEFAULT '',
    actif TINYINT(1) NOT NULL DEFAULT 0,
    date_creation DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    date_modification DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
        ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (id)
) ENGINE=InnoDB
  DEFAULT CHARSET=utf8mb4
  COLLATE=utf8mb4_unicode_ci;

INSERT IGNORE INTO parametres_mail (id)
VALUES (1);
