SHOW CREATE TABLE on a simple activeQuery

Hi all,

when i write this code :




 RemedyGalenic::find()

            ->where(['remedy_id' => $this->id])

            ->with('galenic')

            ->all();



And when I see debug toolbar (section DB) I see 3 debug Lines


SHOW FULL COLUMNS FROM `remedy_galenic`


SELECT * FROM `remedy_galenic` WHERE `remedy_id`='2'


SHOW CREATE TABLE `remedy_galenic`

I have a doubt concerning the Last one. What hell this Show create table comes here ?

Is there something i miss ? Is it because i’m not in production mode ?

Thanks for your help

I think that SHOW CREATE TABLE is to get all fields of table (so fields of model).

thx for your reply


SHOW FULL COLUMNS FROM `remedy_galenic`

is to build Yii internal representation of the model. Why does it do that ? Because i am in debug mode i think. And sure if i set debug to 0 i think Yii never do this again.

Then up to me your answer concerns Show Full Columns and not show create table.

At least if Yii needs to know fields of the model I think it will use Full columns and not create table.