How to make field NOT NULL Alter Table PostgreSQL Yii2?

Hello! I have a migration in which field of the result table of the transactions it is necessary to make NOT NULL.
If you use
$this->alterColumn('transactions', 'result', Schema::TYPE_INTEGER . 'SET NOT NULL');
Lose error Syntax error: 7 ERROR: syntax error at or near "set". If you remove the SET, then the error falls on the word NOT , etc.

So the question is: how to migrate to make a field NOT NULL?

PostgreSQL Yii2.
September 26th 19 at 07:20
1 answer
September 26th 19 at 07:22
$this->alterColumn('transactions', 'result', Schema::TYPE_INTEGER);
$this->alterColumn('transactions', 'result', 'SET NOT NULL');

Find more questions by tags PHPPostgreSQLYii