]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
[DATABASE][User_openid_prefs] Fix wrong type for modified column
authorDiogo Cordeiro <diogo@fc.up.pt>
Wed, 5 Jun 2019 09:00:09 +0000 (10:00 +0100)
committerDiogo Cordeiro <diogo@fc.up.pt>
Fri, 7 Jun 2019 14:02:09 +0000 (15:02 +0100)
Patch submited by Sorokin Alexei (XRevan86)

lib/framework.php
plugins/OpenID/classes/User_openid_prefs.php

index 91e5f4ccd27a5be3da56a933f83e50f183653619..a9a003270bddfcef705b899292644f78f41a6f2a 100644 (file)
@@ -22,7 +22,7 @@ if (!defined('GNUSOCIAL')) { exit(1); }
 define('GNUSOCIAL_ENGINE', 'GNU social');
 define('GNUSOCIAL_ENGINE_URL', 'https://www.gnu.org/software/social/');
 
-define('GNUSOCIAL_BASE_VERSION', '1.19.1');
+define('GNUSOCIAL_BASE_VERSION', '1.19.2');
 define('GNUSOCIAL_LIFECYCLE', 'rc0'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
 
 define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE);
index fcd88f454197db1970f9c1722fcf4fb7fcabf7fa..e1278f76b53a5a7761e8e734a8e421792274c2a8 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2012, StatusNet, Inc.
  *
  * User_openid_prefs.php
- * 
+ *
  * PHP version 5
  *
  * This program is free software: you can redistribute it and/or modify
@@ -59,26 +59,37 @@ class User_openid_prefs extends Managed_DataObject
 
     public static function schemaDef()
     {
-        return array(
-                     'description' => 'Per-user preferences for OpenID display',
-                     'fields' => array('user_id' => array('type' => 'integer',
-                                                          'not null' => true,
-                                                          'description' => 'User whose prefs we are saving'),
-                                       'hide_profile_link' => array('type' => 'int',
-                                                                    'not null' => true,
-                                                                    'default' => 0,
-                                                                    'description' => 'Whether to hide profile links from profile block'),
-                                       'created' => array('type' => 'datetime',
-                                                          'not null' => true,
-                                                          'description' => 'date this record was created'),
-                                       'modified' => array('type' => 'datetime',
-                                                           'not null' => true,
-                                                           'description' => 'date this record was modified'),
-                                       ),
-                     'primary key' => array('user_id'),
-                     'foreign keys' => array('user_openid_prefs_user_id_fkey' => array('user', array('user_id' => 'id')),
-                                             ),
-                     'indexes' => array(),
-                     );
+        return [
+            'description' => 'Per-user preferences for OpenID display',
+            'fields' => [
+                'user_id' => [
+                    'type'        => 'integer',
+                    'not null'    => true,
+                    'description' => 'User whose prefs we are saving'
+                ],
+                'hide_profile_link' => [
+                    'type'        => 'integer',
+                    'not null'    => true,
+                    'default'     => 0,
+                    'description' => 'Whether to hide profile links from profile block'
+                ],
+                'created'  => [
+                    'type'        => 'datetime',
+                    'not null'    => true,
+                    'description' => 'date this record was created',
+                    'default'     => 'CURRENT_TIMESTAMP'
+                ],
+                'modified' => [
+                    'type'        => 'timestamp',
+                    'not null'    => true,
+                    'description' => 'date this record was modified',
+                    'default'     => 'CURRENT_TIMESTAMP'
+                ],
+            ],
+                'primary key'  => ['user_id'],
+                'foreign keys' => ['user_openid_prefs_user_id_fkey' => ['user', ['user_id' => 'id']],
+            ],
+            'indexes' => [],
+        ];
     }
 }