From 29c200da8efe14bf230965d9ead837772d6335f5 Mon Sep 17 00:00:00 2001 From: azerttyu Date: Fri, 22 Jun 2018 18:36:54 +0200 Subject: [PATCH] [enh] Provide an insertion date * When a certificate is added , we store his creation date --- install/mysql.sql | 1 + install/upgrades/3.5.0.1.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/install/mysql.sql b/install/mysql.sql index 027ec0e8..7f37f5e5 100644 --- a/install/mysql.sql +++ b/install/mysql.sql @@ -784,6 +784,7 @@ CREATE TABLE `certificates` ( `sslkey` text NOT NULL, `sslcrt` text NOT NULL, `sslchain` text NOT NULL, + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `uid` (`uid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/install/upgrades/3.5.0.1.sql b/install/upgrades/3.5.0.1.sql index 81b0b5bc..e76d8af9 100644 --- a/install/upgrades/3.5.0.1.sql +++ b/install/upgrades/3.5.0.1.sql @@ -3,6 +3,7 @@ DROP TABLE `certif_alias`; ALTER TABLE `certificates` DROP `shared`, DROP `ssl_action`, DROP `ssl_result`; +ALTER TABLE `certificates` ADD `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP; ALTER TABLE `sub_domaines` ADD `certificate_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `enable`,