1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-21 22:06:12 +02:00

Fix issue processwire/processwire-issues#512 correct unnecessary error message when performing file field schema update

This commit is contained in:
Ryan Cramer
2018-03-06 10:53:54 -05:00
parent aada758d14
commit 0aefc2baa3

View File

@@ -539,6 +539,7 @@ class FieldtypeFile extends FieldtypeMulti {
if($field->id && !($field->get('fileSchema') & self::fileSchemaFiledata)) {
// permanently add new 'filedata' column to schema
$addFiledata = false;
if($field->flags & Field::flagFieldgroupContext) $field = $this->wire('fields')->get($field->name);
try {
$query = $database->prepare("SHOW COLUMNS FROM `$table` WHERE Field='filedata'");
@@ -583,6 +584,7 @@ class FieldtypeFile extends FieldtypeMulti {
if($field->id && !($field->get('fileSchema') & self::fileSchemaDate)) {
// permanently add new 'modified' and 'created' column to file schema
$addDates = false;
if($field->flags & Field::flagFieldgroupContext) $field = $this->wire('fields')->get($field->name);
try {
$query = $database->prepare("SHOW COLUMNS FROM `$table` WHERE Field='modified'");