-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAGETWO-85326: Tool for generating schema
--stabilize CE
- Loading branch information
Sergii Kovalenko
committed
Jan 4, 2018
1 parent
4a8e192
commit dc4bb0e
Showing
34 changed files
with
1,272 additions
and
909 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
<?xml version="1.0"?> | ||
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:setup:Model/Declaration/Schema/etc/schema.xsd"> | ||
<table name="catalog_eav_attribute" resource="default"> | ||
<column xsi:type="float" name="search_weight" scale="10" precission="0" unsigned="true" nullable="false" | ||
default="1"/> | ||
</table> | ||
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:setup:Model/Declaration/Schema/etc/schema.xsd"> | ||
<table name="catalog_eav_attribute" resource="default"> | ||
<column xsi:type="float" name="search_weight" scale="10" precission="0" unsigned="true" nullable="false" default="1"/> | ||
</table> | ||
<table name="catalogsearch_fulltext_scope1_tmp" resource="default"> | ||
<column xsi:type="int" name="entity_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<column xsi:type="int" name="attribute_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<column xsi:type="longtext" name="data_index" nullable="true"/> | ||
<constraint xsi:type="primary" name="IDX_PRIMARY"> | ||
<column name="entity_id"/> | ||
<column name="attribute_id"/> | ||
</constraint> | ||
<index name="FTI_FULLTEXT_DATA_INDEX" indexType="fulltext"> | ||
<column name="data_index"/> | ||
</index> | ||
</table> | ||
<table name="catalogsearch_fulltext_scope1_tmp" resource="default"> | ||
<column xsi:type="int" name="entity_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<column xsi:type="int" name="attribute_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<column xsi:type="longtext" name="data_index" nullable="true"/> | ||
<constraint xsi:type="primary" name="IDX_PRIMARY"> | ||
<column name="entity_id"/> | ||
<column name="attribute_id"/> | ||
</constraint> | ||
<index name="FTI_FULLTEXT_DATA_INDEX" indexType="fulltext"> | ||
<column name="data_index"/> | ||
</index> | ||
</table> | ||
</schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
<?xml version="1.0"?> | ||
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:setup:Model/Declaration/Schema/etc/schema.xsd"> | ||
<table name="catalog_url_rewrite_product_category" resource="default"> | ||
<column xsi:type="int" name="url_rewrite_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<column xsi:type="int" name="category_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<column xsi:type="int" name="product_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<constraint xsi:type="foreign" name="CAT_URL_REWRITE_PRD_CTGR_PRD_ID_CAT_PRD_ENTT_ENTT_ID" | ||
table="catalog_url_rewrite_product_category" column="product_id" | ||
referenceTable="catalog_product_entity" referenceColumn="entity_id" onDelete="CASCADE"/> | ||
<constraint xsi:type="foreign" name="FK_BB79E64705D7F17FE181F23144528FC8" | ||
table="catalog_url_rewrite_product_category" column="url_rewrite_id" referenceTable="url_rewrite" | ||
referenceColumn="url_rewrite_id" onDelete="CASCADE"/> | ||
<index name="CATALOG_URL_REWRITE_PRODUCT_CATEGORY_CATEGORY_ID_PRODUCT_ID" indexType="btree"> | ||
<column name="category_id"/> | ||
<column name="product_id"/> | ||
</index> | ||
</table> | ||
<table name="catalog_url_rewrite_product_category" resource="default"> | ||
<column xsi:type="int" name="url_rewrite_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<column xsi:type="int" name="category_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<column xsi:type="int" name="product_id" padding="11" unsigned="true" nullable="false" identity="false"/> | ||
<constraint xsi:type="foreign" name="CAT_URL_REWRITE_PRD_CTGR_PRD_ID_CAT_PRD_ENTT_ENTT_ID" | ||
table="catalog_url_rewrite_product_category" column="product_id" referenceTable="catalog_product_entity" | ||
referenceColumn="entity_id" onDelete="CASCADE"/> | ||
<constraint xsi:type="foreign" name="FK_BB79E64705D7F17FE181F23144528FC8" | ||
table="catalog_url_rewrite_product_category" column="url_rewrite_id" referenceTable="url_rewrite" | ||
referenceColumn="url_rewrite_id" onDelete="CASCADE"/> | ||
<constraint xsi:type="foreign" name="CAT_URL_REWRITE_PRD_CTGR_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID" | ||
table="catalog_url_rewrite_product_category" column="category_id" | ||
referenceTable="catalog_category_entity" referenceColumn="entity_id" onDelete="CASCADE"/> | ||
<index name="CATALOG_URL_REWRITE_PRODUCT_CATEGORY_CATEGORY_ID_PRODUCT_ID" indexType="btree"> | ||
<column name="category_id"/> | ||
<column name="product_id"/> | ||
</index> | ||
</table> | ||
</schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Customer\Setup; | ||
|
||
use Magento\Framework\Indexer\IndexerRegistry; | ||
use Magento\Framework\Setup\InstallDataInterface; | ||
use Magento\Framework\Setup\ModuleContextInterface; | ||
use Magento\Framework\Setup\ModuleDataSetupInterface; | ||
use Magento\Customer\Model\Customer; | ||
|
||
/** | ||
* Upgrade registered themes | ||
*/ | ||
class RecurringData implements InstallDataInterface | ||
{ | ||
/** | ||
* @var IndexerRegistry | ||
*/ | ||
private $indexerRegistry; | ||
|
||
/** | ||
* Init | ||
* | ||
* @param IndexerRegistry $indexerRegistry | ||
*/ | ||
public function __construct(IndexerRegistry $indexerRegistry) | ||
{ | ||
$this->indexerRegistry = $indexerRegistry; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) | ||
{ | ||
$indexer = $this->indexerRegistry->get(Customer::CUSTOMER_GRID_INDEXER_ID); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
$indexer->reindexAll(); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
@sereban Why is this needed? In this way a complete customer grid reindex is triggered at every setup run and it can takes lots of time if you have many customers.