| @@ 11-29 (lines=19) @@ | ||
| 8 | use Oro\Bundle\MigrationBundle\Migration\OrderedMigrationInterface; |
|
| 9 | use Oro\Bundle\MigrationBundle\Migration\QueryBag; |
|
| 10 | ||
| 11 | class DropFields implements Migration, OrderedMigrationInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @inheritdoc |
|
| 15 | */ |
|
| 16 | public function getOrder() |
|
| 17 | { |
|
| 18 | return 30; |
|
| 19 | } |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @inheritdoc |
|
| 23 | */ |
|
| 24 | public function up(Schema $schema, QueryBag $queries) |
|
| 25 | { |
|
| 26 | $table = $schema->getTable('orocrm_magento_customer'); |
|
| 27 | $table->dropColumn('vat_temp'); |
|
| 28 | } |
|
| 29 | } |
|
| 30 | ||
| @@ 11-32 (lines=22) @@ | ||
| 8 | use Oro\Bundle\MigrationBundle\Migration\OrderedMigrationInterface; |
|
| 9 | use Oro\Bundle\MigrationBundle\Migration\QueryBag; |
|
| 10 | ||
| 11 | class RemoveLeadEmail implements Migration, OrderedMigrationInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * {@inheritdoc} |
|
| 15 | */ |
|
| 16 | public function getOrder() |
|
| 17 | { |
|
| 18 | return 5; |
|
| 19 | } |
|
| 20 | ||
| 21 | /** |
|
| 22 | * {@inheritdoc} |
|
| 23 | */ |
|
| 24 | public function up(Schema $schema, QueryBag $queries) |
|
| 25 | { |
|
| 26 | /** Tables generation **/ |
|
| 27 | $table = $schema->getTable('orocrm_sales_lead'); |
|
| 28 | if ($table->hasColumn('email')) { |
|
| 29 | $table->dropColumn('email'); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||
| @@ 11-32 (lines=22) @@ | ||
| 8 | use Oro\Bundle\MigrationBundle\Migration\OrderedMigrationInterface; |
|
| 9 | use Oro\Bundle\MigrationBundle\Migration\QueryBag; |
|
| 10 | ||
| 11 | class RemovePhoneNumberField implements Migration, OrderedMigrationInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * {@inheritdoc} |
|
| 15 | */ |
|
| 16 | public function getOrder() |
|
| 17 | { |
|
| 18 | return 6; |
|
| 19 | } |
|
| 20 | ||
| 21 | /** |
|
| 22 | * {@inheritdoc} |
|
| 23 | */ |
|
| 24 | public function up(Schema $schema, QueryBag $queries) |
|
| 25 | { |
|
| 26 | /** Tables generation **/ |
|
| 27 | $table = $schema->getTable('orocrm_sales_lead'); |
|
| 28 | if ($table->hasColumn('phone_number')) { |
|
| 29 | $table->dropColumn('phone_number'); |
|
| 30 | } |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||