[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', 'GNU social');
define('GNUSOCIAL_ENGINE_URL', 'https://www.gnu.org/software/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_LIFECYCLE', 'rc0'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE); define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE);

View File

@ -4,7 +4,7 @@
* Copyright (C) 2012, StatusNet, Inc. * Copyright (C) 2012, StatusNet, Inc.
* *
* User_openid_prefs.php * User_openid_prefs.php
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * 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() public static function schemaDef()
{ {
return array( return [
'description' => 'Per-user preferences for OpenID display', 'description' => 'Per-user preferences for OpenID display',
'fields' => array('user_id' => array('type' => 'integer', 'fields' => [
'not null' => true, 'user_id' => [
'description' => 'User whose prefs we are saving'), 'type' => 'integer',
'hide_profile_link' => array('type' => 'int', 'not null' => true,
'not null' => true, 'description' => 'User whose prefs we are saving'
'default' => 0, ],
'description' => 'Whether to hide profile links from profile block'), 'hide_profile_link' => [
'created' => array('type' => 'datetime', 'type' => 'integer',
'not null' => true, 'not null' => true,
'description' => 'date this record was created'), 'default' => 0,
'modified' => array('type' => 'datetime', 'description' => 'Whether to hide profile links from profile block'
'not null' => true, ],
'description' => 'date this record was modified'), 'created' => [
), 'type' => 'datetime',
'primary key' => array('user_id'), 'not null' => true,
'foreign keys' => array('user_openid_prefs_user_id_fkey' => array('user', array('user_id' => 'id')), 'description' => 'date this record was created',
), 'default' => 'CURRENT_TIMESTAMP'
'indexes' => array(), ],
); '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' => [],
];
} }
} }