Skip to content

Instantly share code, notes, and snippets.

@delineas
Created November 9, 2015 20:50
Show Gist options
  • Select an option

  • Save delineas/42d1fae2e4c881912cbe to your computer and use it in GitHub Desktop.

Select an option

Save delineas/42d1fae2e4c881912cbe to your computer and use it in GitHub Desktop.
OroCRM example for user migration
<?php
namespace Ecowala\UserCRMBundle\Migrations\Schema\v1_1;
use Doctrine\DBAL\Schema\Schema;
use Oro\Bundle\EntityExtendBundle\EntityConfig\ExtendScope;
use Oro\Bundle\MigrationBundle\Migration\Migration;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;
class UserMigration implements Migration
{
public function up(Schema $schema, QueryBag $queries)
{
$table = $schema->getTable('oro_user');
$table->addColumn('origin', 'text',
array(
'notnull' => false,
'oro_options' => array(
'extend' => array('is_extend' => true, 'owner' => ExtendScope::OWNER_CUSTOM),
'datagrid' => array('is_visible' => true),
'merge' => array('display' => true),
))
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment