alterColumn('{{%oauth_sessions}}', 'owner_id', $this->string()->null()); } public function safeDown() { $this->delete('{{%oauth_sessions}}', ['owner_id' => null]); $this->alterColumn('{{%oauth_sessions}}', 'owner_id', $this->string()->notNull()); } }