cebe / yii2-openapi

REST API application generator for Yii2, openapi 3.0 YAML -> Yii2
MIT License
129 stars 23 forks source link

Remove unnecessary null or default related migrations in PgSQL #151

Closed SOHELAHMED7 closed 2 weeks ago

SOHELAHMED7 commented 1 year ago
class m200000_000000_change_table_fruits extends \yii\db\Migration
{
    public function safeUp()
    {
        $this->alterColumn('{{%fruits}}', 'name', $this->string(151)->notNull());
        // below line is not needed, it should not be generated for above migration statement
        $this->alterColumn('{{%fruits}}', 'name', "SET NOT NULL");

// same applies for `default`
    }

See PR: https://github.com/SOHELAHMED7/yii2-openapi/pull/26

This issue is likely to be introduced by this PR.

See file : https://github.com/SOHELAHMED7/yii2-openapi/pull/26/files#diff-9eed73e84806272cde21cc4b561335226dd1f198aeb37173756c4c1a27df5c54


priority: very low

type: enhancement