Skip to content

Commit

Permalink
Merge pull request #449 from magento-firedrakes/MAGETWO-40015
Browse files Browse the repository at this point in the history
[Firedrakes] Remove Schema & Data Upgrades
  • Loading branch information
sivaschenko committed Jul 12, 2015
2 parents 2382298 + 7f36f6a commit 5e8b706
Show file tree
Hide file tree
Showing 44 changed files with 375 additions and 1,416 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Magento_Backend" setup_version="2.0.0.0">
<module name="Magento_Backend" setup_version="2.0.0">
<sequence>
<module name="Magento_Directory"/>
</sequence>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backup/etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Magento_Backup" setup_version="1.6.0.0">
<module name="Magento_Backup" setup_version="2.0.0">
<sequence>
<module name="Magento_Store"/>
</sequence>
Expand Down
12 changes: 12 additions & 0 deletions app/code/Magento/Catalog/Setup/InstallData.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,17 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
'1'
);
}
$categorySetup->updateAttribute(
\Magento\Catalog\Model\Category::ENTITY,
'custom_design_from',
'attribute_model',
'Magento\Catalog\Model\Resource\Eav\Attribute'
);
$categorySetup->updateAttribute(
\Magento\Catalog\Model\Category::ENTITY,
'custom_design_from',
'frontend_model',
'Magento\Eav\Model\Entity\Attribute\Frontend\Datetime'
);
}
}
127 changes: 12 additions & 115 deletions app/code/Magento/Catalog/Setup/InstallSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
'Entity ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_set_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -93,10 +86,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
[],
'Update Time'
)
->addIndex(
$installer->getIdxName('catalog_product_entity', ['entity_type_id']),
['entity_type_id']
)
->addIndex(
$installer->getIdxName('catalog_product_entity', ['attribute_set_id']),
['attribute_set_id']
Expand All @@ -117,13 +106,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
'attribute_set_id',
\Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
)
->addForeignKey(
$installer->getFkName('catalog_product_entity', 'entity_type_id', 'eav_entity_type', 'entity_type_id'),
'entity_type_id',
$installer->getTable('eav_entity_type'),
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
)
->setComment('Catalog Product Table');
$installer->getConnection()->createTable($table);

Expand All @@ -139,13 +121,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -237,13 +212,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -335,13 +303,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -423,13 +384,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -521,13 +475,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -619,13 +566,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -664,10 +604,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
->addIndex(
$installer->getIdxName(
'catalog_product_entity_gallery',
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
),
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE]
)
->addIndex(
Expand Down Expand Up @@ -728,13 +668,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
'Entity ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_set_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -810,13 +743,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -848,10 +774,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
->addIndex(
$installer->getIdxName(
'catalog_category_entity_datetime',
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
),
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE]
)
->addIndex(
Expand Down Expand Up @@ -912,13 +838,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -950,10 +869,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
->addIndex(
$installer->getIdxName(
'catalog_category_entity_decimal',
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
[ 'entity_id', 'attribute_id', 'store_id'],
\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
),
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE]
)
->addIndex(
Expand Down Expand Up @@ -1014,13 +933,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -1052,10 +964,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
->addIndex(
$installer->getIdxName(
'catalog_category_entity_int',
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
),
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE]
)
->addIndex(
Expand Down Expand Up @@ -1111,13 +1023,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -1149,10 +1054,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
->addIndex(
$installer->getIdxName(
'catalog_category_entity_text',
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
),
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE]
)
->addIndex(
Expand Down Expand Up @@ -1208,13 +1113,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
['identity' => true, 'nullable' => false, 'primary' => true],
'Value ID'
)
->addColumn(
'entity_type_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['unsigned' => true, 'nullable' => false, 'default' => '0'],
'Entity Type ID'
)
->addColumn(
'attribute_id',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
Expand Down Expand Up @@ -1246,10 +1144,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
->addIndex(
$installer->getIdxName(
'catalog_category_entity_varchar',
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
\Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
),
['entity_type_id', 'entity_id', 'attribute_id', 'store_id'],
['entity_id', 'attribute_id', 'store_id'],
['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE]
)
->addIndex(
Expand Down Expand Up @@ -4659,7 +4557,6 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
);
$installer->getConnection()
->createTable($table);

$installer->endSetup();

}
Expand Down
56 changes: 0 additions & 56 deletions app/code/Magento/Catalog/Setup/UpgradeData.php

This file was deleted.

Loading

0 comments on commit 5e8b706

Please sign in to comment.