<?php

namespace Oro\Bundle\ImapBundle\Migrations\Schema\v1_4;

use Doctrine\DBAL\Schema\Schema;

use Oro\Bundle\MigrationBundle\Migration\Migration;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;

class OroImapBundle implements Migration
{
    /**
     * {@inheritdoc}
     */
    public function up(Schema $schema, QueryBag $queries)
    {
        self::addAccessTokenFieldToOroEmailOriginTable($schema);
    }

    /**
     * Adds Access Token field to the oro_email_origin table
     *
     * @param Schema $schema
     * @throws \Doctrine\DBAL\Schema\SchemaException
     */
    public static function addAccessTokenFieldToOroEmailOriginTable(Schema $schema)
    {
        $table = $schema->getTable('oro_email_origin');
        $table->addColumn('access_token', 'string', ['notnull' => false, 'length' => 255]);
    }
}

<?php

namespace Oro\Bundle\ImapBundle\Migrations\Schema\v1_4;

use Doctrine\DBAL\Schema\SchemaException;

use Doctrine\DBAL\Schema\Schema;

use Oro\Bundle\MigrationBundle\Migration\Migration;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;

class OroImapBundle implements Migration
{
    /**
     * {@inheritdoc}
     */
    public function up(Schema $schema, QueryBag $queries)
    {
        self::addAccessTokenFieldToOroEmailOriginTable($schema);
    }

    /**
     * Adds Access Token field to the oro_email_origin table
     *
     * @param Schema $schema
     * @throws SchemaException
     */
    public static function addAccessTokenFieldToOroEmailOriginTable(Schema $schema)
    {
        $table = $schema->getTable('oro_email_origin');
        $table->addColumn('access_token', 'string', ['notnull' => false, 'length' => 255]);
    }
}

Create new type Origin oauthOrigin
BAP-9558: Create new type Origin oauthOrigin
