hasTable('systemtag_object_mapping')) { $table = $schema->getTable('systemtag_object_mapping'); if (!$table->hasIndex('systag_objecttype')) { $table->addIndex(['objecttype'], 'systag_objecttype'); } } if ($schema->hasTable('systemtag')) { $table = $schema->getTable('systemtag'); if (!$table->hasColumn('etag')) { $table->addColumn('etag', Types::STRING, [ 'notnull' => false, 'length' => 32, ]); } } return $schema; } }