yii2 schema cache clear not work code example
Example: yii1 refresh cache schema
Yii::app()->db->schema->getTables();
// clear the cache of all loaded tables
Yii::app()->db->schema->refresh();
Yii::app()->db->schema->getTables();
// clear the cache of all loaded tables
Yii::app()->db->schema->refresh();