allow 'note' to be null
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
b81962e3e8
commit
94c7052482
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace OC\Core\Migrations;
|
||||
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
use OCP\Migration\SimpleMigrationStep;
|
||||
|
||||
/**
|
||||
|
@ -35,10 +36,7 @@ class Version14000Date20180712153140 extends SimpleMigrationStep {
|
|||
$schema = $schemaClosure();
|
||||
|
||||
$table = $schema->getTable('share');
|
||||
$table->addColumn('note', 'text', [
|
||||
'notnull' => true,
|
||||
'default' => ''
|
||||
]);
|
||||
$table->addColumn('note', 'text');
|
||||
|
||||
return $schema;
|
||||
}
|
||||
|
|
|
@ -322,8 +322,11 @@ class Share implements \OCP\Share\IShare {
|
|||
* @inheritdoc
|
||||
*/
|
||||
public function getNote() {
|
||||
if (is_string($this->note)) {
|
||||
return $this->note;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
|
Loading…
Reference in New Issue