mirror of
https://github.com/processwire/processwire.git
synced 2025-08-22 06:13:57 +02:00
Fix issue processwire/processwire-issues#512 correct unnecessary error message when performing file field schema update
This commit is contained in:
@@ -539,6 +539,7 @@ class FieldtypeFile extends FieldtypeMulti {
|
|||||||
if($field->id && !($field->get('fileSchema') & self::fileSchemaFiledata)) {
|
if($field->id && !($field->get('fileSchema') & self::fileSchemaFiledata)) {
|
||||||
// permanently add new 'filedata' column to schema
|
// permanently add new 'filedata' column to schema
|
||||||
$addFiledata = false;
|
$addFiledata = false;
|
||||||
|
if($field->flags & Field::flagFieldgroupContext) $field = $this->wire('fields')->get($field->name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$query = $database->prepare("SHOW COLUMNS FROM `$table` WHERE Field='filedata'");
|
$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)) {
|
if($field->id && !($field->get('fileSchema') & self::fileSchemaDate)) {
|
||||||
// permanently add new 'modified' and 'created' column to file schema
|
// permanently add new 'modified' and 'created' column to file schema
|
||||||
$addDates = false;
|
$addDates = false;
|
||||||
|
if($field->flags & Field::flagFieldgroupContext) $field = $this->wire('fields')->get($field->name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$query = $database->prepare("SHOW COLUMNS FROM `$table` WHERE Field='modified'");
|
$query = $database->prepare("SHOW COLUMNS FROM `$table` WHERE Field='modified'");
|
||||||
|
Reference in New Issue
Block a user