mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:15:14 +00:00
make sess_data field larger on mysql driver to hold seen_items array > 4k items
This commit is contained in:
parent
70a1ee55d3
commit
f97e02706e
3 changed files with 32 additions and 2 deletions
30
Code/Update/_1273.php
Normal file
30
Code/Update/_1273.php
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Code\Update;
|
||||||
|
|
||||||
|
class _1273
|
||||||
|
{
|
||||||
|
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
if (ACTIVE_DBTYPE != DBTYPE_POSTGRES) {
|
||||||
|
q("START TRANSACTION");
|
||||||
|
|
||||||
|
$r = q("ALTER TABLE session MODIFY COLUMN sess_data MEDIUMTEXT NOT NULL");
|
||||||
|
|
||||||
|
if ($r) {
|
||||||
|
q("COMMIT");
|
||||||
|
return UPDATE_SUCCESS;
|
||||||
|
} else {
|
||||||
|
q("ROLLBACK");
|
||||||
|
return UPDATE_FAILED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function verify()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
2
boot.php
2
boot.php
|
@ -26,7 +26,7 @@ use Code\Lib\Url;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const REPOSITORY_ID = 'streams';
|
const REPOSITORY_ID = 'streams';
|
||||||
const DB_UPDATE_VERSION = 1272;
|
const DB_UPDATE_VERSION = 1273;
|
||||||
const PROJECT_BASE = __DIR__;
|
const PROJECT_BASE = __DIR__;
|
||||||
const ACTIVITYPUB_ENABLED = true;
|
const ACTIVITYPUB_ENABLED = true;
|
||||||
const NOMAD_PROTOCOL_VERSION = '12.0';
|
const NOMAD_PROTOCOL_VERSION = '12.0';
|
||||||
|
|
|
@ -1039,7 +1039,7 @@ CREATE TABLE IF NOT EXISTS `register` (
|
||||||
CREATE TABLE IF NOT EXISTS `session` (
|
CREATE TABLE IF NOT EXISTS `session` (
|
||||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`sid` varchar(255) NOT NULL DEFAULT '',
|
`sid` varchar(255) NOT NULL DEFAULT '',
|
||||||
`sess_data` text NOT NULL,
|
`sess_data` mediumtext NOT NULL,
|
||||||
`expire` bigint unsigned NOT NULL DEFAULT 0 ,
|
`expire` bigint unsigned NOT NULL DEFAULT 0 ,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `sid` (`sid`(191)),
|
KEY `sid` (`sid`(191)),
|
||||||
|
|
Loading…
Reference in a new issue