Answer the question
In order to leave comments, you need to log in
How to make field NOT NULL PostgreSQL Yii2 Alter Table?
Hello! I have a migration in which the result field of the transactions table must be made NOT NULL .
If use
$this->alterColumn('transactions', 'result', Schema::TYPE_INTEGER . ' SET NOT NULL');
Then the error Syntax error: 7 ERROR: syntax error at or near "set" takes off . If you remove SET , then the error falls out on the word NOT , etc. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question