Fix #3335: Queue migration broken on some database configurations

This commit is contained in:
Lucas Bartholemy 2019-02-11 14:38:06 +01:00
parent b87bf0b755
commit 9b3c16b280
3 changed files with 49 additions and 1 deletions

View File

@ -22,6 +22,7 @@ HumHub Change Log
- Enh: Added `humhub\widgets\Link::post()` for `data-method="POST` requests
- Fix: Use `humhub\modules\user\components\ActiveQueryUser::active()` on UserPicker fillquery by default
- Added `relativeUrl` to notification view parameter
- Fix #3335: Queue migration broken on some database configurations
1.3.8 (December 10, 2018)

View File

@ -21,7 +21,7 @@ class m171025_142030_queue_update extends Migration
$this->createTable($this->tableName, [
'id' => $this->primaryKey(),
'channel' => $this->string()->notNull(),
'channel' => $this->string(50)->notNull(),
'job' => $this->binary()->notNull(),
'pushed_at' => $this->integer()->notNull(),
'ttr' => $this->integer()->notNull(),

View File

@ -0,0 +1,47 @@
<?php
/**
* @link https://www.humhub.org/
* @copyright Copyright (c) 2019 HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*/
use yii\db\Migration;
/**
* Class m190211_133045_channel_length
*/
class m190211_133045_channel_length extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->alterColumn('queue', 'channel', $this->string(50)->notNull());
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
echo "m190211_133045_channel_length cannot be reverted.\n";
return false;
}
/*
// Use up()/down() to run migration code without a transaction.
public function up()
{
}
public function down()
{
echo "m190211_133045_channel_length cannot be reverted.\n";
return false;
}
*/
}