Fix file hash column length (#4956)

This commit is contained in:
Yuriy Bakhtin 2021-03-10 14:42:58 +03:00 committed by GitHub
parent 3fada821cd
commit a75b05120c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View File

@ -11,6 +11,7 @@ HumHub Changelog
- Fix #4942: MemberOf Display in LDAP CLI Show User Details
- Fix #4465: LDAP PHP 8 incompatibility (multiPageSearch)
- Fix #4946: Fix migration of the default permissions
- Fix #4956: Fix file hash column length
1.8.0 (March 1, 2021)

View File

@ -0,0 +1,28 @@
<?php
use yii\db\Migration;
/**
* Class m210310_103412_fix_hash
*/
class m210310_103412_fix_hash extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->update('file', ['hash_sha1' => NULL]);
$this->alterColumn('file', 'hash_sha1', $this->string(40)->null());
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
echo "m210310_103412_fix_hash cannot be reverted.\n";
return false;
}
}