forked from GNUsocial/gnu-social
Various fixes
Fix OAuth and Realtime issues introduced in9a515b9234
[DATABASE] Fix an empty default value mistake introduced infde929b151
[DATABASE][PostgreSQL] Avoid use of pg_constraint.consrc, which was removed in PostgreSQL 12. [DATABASE][MariaDB] Fix a typo introduced inaed2344bd4
[DAEMON] Wrap an assignment inside "switch": a follow-up toadc689cb15
This commit is contained in:
parent
c540466147
commit
06dfd91a82
@ -190,7 +190,7 @@ class Oauth_application extends Managed_DataObject
|
||||
'type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'type of app, 1 = browser, 2 = desktop'),
|
||||
'access_type' => array('type' => 'int', 'size' => 'tiny', 'default' => 0, 'description' => 'default access type, bit 1 = read, bit 2 = write'),
|
||||
'created' => array('type' => 'datetime', 'description' => 'date this record was created'),
|
||||
'modified' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was modified'),
|
||||
'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
|
||||
),
|
||||
'primary key' => array('id'),
|
||||
'unique keys' => array(
|
||||
|
@ -461,7 +461,7 @@ class MysqlSchema extends Schema
|
||||
$phrase[] = "ENGINE '{$engine}'";
|
||||
}
|
||||
if (strtolower($oldProps['TABLE_COLLATION']) !== "{$charset}_bin") {
|
||||
$phrase[] = "CONVERT TO CHARACTER SET '{$charset} COLLATE '{$charset}_bin'";
|
||||
$phrase[] = "CONVERT TO CHARACTER SET '{$charset}' COLLATE '{$charset}_bin'";
|
||||
$phrase[] = "DEFAULT CHARACTER SET '{$charset}'";
|
||||
$phrase[] = "DEFAULT COLLATE '{$charset}_bin'";
|
||||
}
|
||||
|
@ -328,7 +328,8 @@ class PgsqlSchema extends Schema
|
||||
{
|
||||
$data = $this->fetchQueryData(
|
||||
<<<END
|
||||
SELECT "cols"."attname" AS "col", "con"."consrc" AS "check"
|
||||
SELECT "cols"."attname" AS "col",
|
||||
pg_get_expr("con"."conbin", "con"."conrelid") AS "check"
|
||||
FROM pg_constraint AS "con"
|
||||
INNER JOIN pg_attribute AS "cols"
|
||||
ON "con"."conrelid" = "cols"."attrelid"
|
||||
|
@ -878,7 +878,7 @@ class Schema
|
||||
{
|
||||
// MDB2_Driver_Common::quote changes empty strings to "NULL".
|
||||
if ($val === '') {
|
||||
return '';
|
||||
return "''";
|
||||
}
|
||||
return $this->conn->quote($val);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ class Realtime_channel extends Managed_DataObject
|
||||
'created' => ['type' => 'datetime',
|
||||
'not null' => true,
|
||||
'description' => 'date this record was created'],
|
||||
'modified' => ['type' => 'datetime',
|
||||
'modified' => ['type' => 'timestamp',
|
||||
'not null' => true,
|
||||
'description' => 'date this record was modified'],
|
||||
],
|
||||
|
@ -78,12 +78,12 @@ class Daemon
|
||||
|
||||
public function background()
|
||||
{
|
||||
// Database connection will likely get lost after forking
|
||||
// Database connection will be likely lost after forking.
|
||||
$this->resetDb();
|
||||
|
||||
// Double-forking.
|
||||
foreach (['single', 'double'] as $v) {
|
||||
switch ($pid = pcntl_fork()) {
|
||||
switch (($pid = pcntl_fork())) {
|
||||
case -1: // error
|
||||
common_log(LOG_ERR, 'Could not fork.');
|
||||
return false;
|
||||
|
@ -44,7 +44,7 @@ class Email_summary_status extends Managed_DataObject
|
||||
public $send_summary; // bool not_null default_true
|
||||
public $last_summary_id; // int(4) null
|
||||
public $created; // datetime not_null
|
||||
public $modified; // datetime not_null
|
||||
public $modified; // timestamp not_null
|
||||
|
||||
public static function schemaDef()
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ class User_poll_prefs extends Managed_DataObject
|
||||
public $user_id; // int id
|
||||
public $hide_responses; // bool
|
||||
public $created; // datetime
|
||||
public $modified; // datetime
|
||||
public $modified; // timestamp
|
||||
|
||||
/**
|
||||
* The One True Thingy that must be defined and declared.
|
||||
|
Loading…
Reference in New Issue
Block a user