From 02c67fd114afbcc6b271d0f018d1c8f7d2d627c6 Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Wed, 5 Jun 2019 10:04:59 +0100 Subject: [PATCH] [Nodeinfo][DATABASE][Usage_stats] Fix wrong type for modified column --- plugins/Nodeinfo/NodeinfoPlugin.php | 4 ++-- plugins/Nodeinfo/classes/Usage_stats.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/Nodeinfo/NodeinfoPlugin.php b/plugins/Nodeinfo/NodeinfoPlugin.php index 79defe39fd..361b020158 100644 --- a/plugins/Nodeinfo/NodeinfoPlugin.php +++ b/plugins/Nodeinfo/NodeinfoPlugin.php @@ -6,7 +6,7 @@ if (!defined('GNUSOCIAL')) { class NodeinfoPlugin extends Plugin { - const VERSION = '1.0.1'; + const PLUGIN_VERSION = '1.0.2'; public function onRouterInitialized($m) { @@ -170,7 +170,7 @@ class NodeinfoPlugin extends Plugin public function onPluginVersion(array &$versions) { $versions[] = ['name' => 'Nodeinfo', - 'version' => self::VERSION, + 'version' => self::PLUGIN_VERSION, 'author' => 'chimo', 'homepage' => 'https://github.com/chimo/gs-nodeinfo', 'description' => _m('Plugin that presents basic instance information using the NodeInfo standard.')]; diff --git a/plugins/Nodeinfo/classes/Usage_stats.php b/plugins/Nodeinfo/classes/Usage_stats.php index fcfc1c842b..bd5c6899fd 100644 --- a/plugins/Nodeinfo/classes/Usage_stats.php +++ b/plugins/Nodeinfo/classes/Usage_stats.php @@ -43,8 +43,7 @@ class Usage_stats extends Managed_DataObject 'fields' => [ 'type' => ['type' => 'varchar', 'length' => 191, 'description' => 'Type of countable entity'], 'count' => ['type' => 'int', 'size' => 'int', 'default' => 0, 'description' => 'Number of entities of this type'], - - 'modified' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'], + 'modified' => ['type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'], ], 'primary key' => ['type'], 'unique keys' => [ -- 2.39.5