[DATABASE][User_openid_prefs] Fix wrong type for modified column

Patch submited by Sorokin Alexei (XRevan86)
This commit is contained in:
Diogo Cordeiro 2019-06-05 10:00:09 +01:00
parent 00b4a084ad
commit b6be1a3659
2 changed files with 34 additions and 23 deletions

View 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);

View 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' => [],
];
}
}