diff --git a/app/code/Magento/Bundle/etc/db_schema.xml b/app/code/Magento/Bundle/etc/db_schema.xml
index 4189da661cf0f..7c455d82742e2 100644
--- a/app/code/Magento/Bundle/etc/db_schema.xml
+++ b/app/code/Magento/Bundle/etc/db_schema.xml
@@ -1,274 +1,259 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/etc/db_schema.xml b/app/code/Magento/Catalog/etc/db_schema.xml
index d911988f73dcf..3d25559ae2013 100644
--- a/app/code/Magento/Catalog/etc/db_schema.xml
+++ b/app/code/Magento/Catalog/etc/db_schema.xml
@@ -16,9 +16,7 @@
-
+
@@ -67,7 +65,7 @@
default="0"/>
-
+
@@ -296,7 +294,7 @@
default="0"/>
-
+
@@ -448,6 +446,9 @@
+
@@ -600,7 +601,7 @@
identity="false"/>
+ default="0"/>
@@ -676,10 +677,9 @@
default="1"/>
-
+
+ default="0"/>
@@ -799,7 +799,7 @@
+ default="0"/>
@@ -867,7 +867,7 @@
+ default="0"/>
@@ -1019,7 +1019,8 @@
-
+
@@ -1050,25 +1051,24 @@
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+ disabled="1"/>
@@ -1085,7 +1085,8 @@
-
+
@@ -1110,8 +1111,7 @@
-
+
@@ -1127,8 +1127,9 @@
-
-
+
+
@@ -1142,8 +1143,9 @@
-
-
+
+
@@ -1156,9 +1158,12 @@
-
-
-
+
+
+
@@ -1170,9 +1175,12 @@
-
-
-
+
+
+
@@ -1186,12 +1194,17 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -1205,12 +1218,17 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -1222,9 +1240,12 @@
-
-
-
+
+
+
@@ -1236,9 +1257,12 @@
-
-
-
+
+
+
@@ -1252,9 +1276,12 @@
-
-
-
+
+
+
@@ -1269,9 +1296,12 @@
-
-
-
+
+
+
@@ -1343,7 +1373,8 @@
-
+
@@ -1373,7 +1404,8 @@
-
+
@@ -1405,11 +1437,15 @@
-
-
-
-
-
+
+
+
+
+
@@ -1432,11 +1468,15 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/app/code/Magento/CatalogInventory/etc/db_schema.xml b/app/code/Magento/CatalogInventory/etc/db_schema.xml
index ec184d6da1a24..f2df994f117e1 100644
--- a/app/code/Magento/CatalogInventory/etc/db_schema.xml
+++ b/app/code/Magento/CatalogInventory/etc/db_schema.xml
@@ -20,7 +20,7 @@
default="0"/>
+ default="0"/>
+ default="1"/>
+ default="0"/>
-
+
+ default="0"/>
-
+
@@ -107,8 +107,7 @@
-
+
@@ -126,8 +125,7 @@
-
+
diff --git a/app/code/Magento/CatalogRule/etc/db_schema.xml b/app/code/Magento/CatalogRule/etc/db_schema.xml
index 16755bdf75d96..7deba44776d17 100644
--- a/app/code/Magento/CatalogRule/etc/db_schema.xml
+++ b/app/code/Magento/CatalogRule/etc/db_schema.xml
@@ -46,7 +46,7 @@
default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
@@ -91,7 +91,7 @@
+ default="0"/>
@@ -126,15 +126,10 @@
-
-
+
+
+ disabled="1"/>
diff --git a/app/code/Magento/CatalogSearch/etc/db_schema.xml b/app/code/Magento/CatalogSearch/etc/db_schema.xml
index d4d77163bce9c..81642b8de50ca 100644
--- a/app/code/Magento/CatalogSearch/etc/db_schema.xml
+++ b/app/code/Magento/CatalogSearch/etc/db_schema.xml
@@ -1,8 +1,30 @@
-
-
+
+
+
+
diff --git a/app/code/Magento/CatalogUrlRewrite/etc/db_schema.xml b/app/code/Magento/CatalogUrlRewrite/etc/db_schema.xml
index ac6321056bc6f..3cb765c66ba23 100644
--- a/app/code/Magento/CatalogUrlRewrite/etc/db_schema.xml
+++ b/app/code/Magento/CatalogUrlRewrite/etc/db_schema.xml
@@ -1,19 +1,22 @@
-
+
diff --git a/app/code/Magento/Customer/Setup/RecurringData.php b/app/code/Magento/Customer/Setup/RecurringData.php
new file mode 100644
index 0000000000000..719489b51b761
--- /dev/null
+++ b/app/code/Magento/Customer/Setup/RecurringData.php
@@ -0,0 +1,44 @@
+indexerRegistry = $indexerRegistry;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
+ {
+ $indexer = $this->indexerRegistry->get(Customer::CUSTOMER_GRID_INDEXER_ID);
+ $indexer->reindexAll();
+
+ }
+}
diff --git a/app/code/Magento/Customer/Setup/UpgradeData.php b/app/code/Magento/Customer/Setup/UpgradeData.php
index b5aba18a92f28..b5f8619391c3c 100644
--- a/app/code/Magento/Customer/Setup/UpgradeData.php
+++ b/app/code/Magento/Customer/Setup/UpgradeData.php
@@ -159,8 +159,6 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
$this->upgradeVersionTwoZeroTwelve($customerSetup);
}
- $indexer = $this->indexerRegistry->get(Customer::CUSTOMER_GRID_INDEXER_ID);
- $indexer->reindexAll();
$this->eavConfig->clear();
$setup->endSetup();
}
diff --git a/app/code/Magento/Customer/etc/db_schema.xml b/app/code/Magento/Customer/etc/db_schema.xml
index df61fd9107826..cd54263b5ebe4 100644
--- a/app/code/Magento/Customer/etc/db_schema.xml
+++ b/app/code/Magento/Customer/etc/db_schema.xml
@@ -134,7 +134,7 @@
+ default="0"/>
@@ -276,7 +276,7 @@
+ default="0"/>
diff --git a/app/code/Magento/Directory/etc/db_schema.xml b/app/code/Magento/Directory/etc/db_schema.xml
index b0ec8f46a10e4..4254682d0a48f 100644
--- a/app/code/Magento/Directory/etc/db_schema.xml
+++ b/app/code/Magento/Directory/etc/db_schema.xml
@@ -54,7 +54,7 @@
+ default="0"/>
diff --git a/app/code/Magento/Downloadable/etc/db_schema.xml b/app/code/Magento/Downloadable/etc/db_schema.xml
index 4eb425ca80d13..03058faf0467d 100644
--- a/app/code/Magento/Downloadable/etc/db_schema.xml
+++ b/app/code/Magento/Downloadable/etc/db_schema.xml
@@ -35,7 +35,7 @@
+ default="0"/>
@@ -201,9 +201,9 @@
identity="false"/>
+ default="0"/>
+ default="0"/>
@@ -216,9 +216,9 @@
identity="false"/>
+ default="0"/>
+ default="0"/>
diff --git a/app/code/Magento/Eav/etc/db_schema.xml b/app/code/Magento/Eav/etc/db_schema.xml
index 4c344784666fe..101940ce440db 100644
--- a/app/code/Magento/Eav/etc/db_schema.xml
+++ b/app/code/Magento/Eav/etc/db_schema.xml
@@ -109,7 +109,7 @@
+ default="0"/>
diff --git a/app/code/Magento/GiftMessage/etc/db_schema.xml b/app/code/Magento/GiftMessage/etc/db_schema.xml
index 072eeeb50f3d5..4103bb4024f5f 100644
--- a/app/code/Magento/GiftMessage/etc/db_schema.xml
+++ b/app/code/Magento/GiftMessage/etc/db_schema.xml
@@ -12,4 +12,24 @@
+
+
+
+
+
+
diff --git a/app/code/Magento/OfflineShipping/etc/db_schema.xml b/app/code/Magento/OfflineShipping/etc/db_schema.xml
index 2416dc984d6ad..7c64f5c5fa15c 100644
--- a/app/code/Magento/OfflineShipping/etc/db_schema.xml
+++ b/app/code/Magento/OfflineShipping/etc/db_schema.xml
@@ -11,11 +11,10 @@
+ default="0"/>
-
+ default="0"/>
+
diff --git a/app/code/Magento/Paypal/etc/db_schema.xml b/app/code/Magento/Paypal/etc/db_schema.xml
index 2359875539a94..86ccf5e125b2e 100644
--- a/app/code/Magento/Paypal/etc/db_schema.xml
+++ b/app/code/Magento/Paypal/etc/db_schema.xml
@@ -70,11 +70,11 @@
+ nullable="false" default="0"/>
+ default="0"/>
@@ -117,4 +117,13 @@
+
+
diff --git a/app/code/Magento/ProductAlert/etc/db_schema.xml b/app/code/Magento/ProductAlert/etc/db_schema.xml
index 2c41514052407..17190f22ae341 100644
--- a/app/code/Magento/ProductAlert/etc/db_schema.xml
+++ b/app/code/Magento/ProductAlert/etc/db_schema.xml
@@ -8,7 +8,7 @@
+ default="0"/>
diff --git a/app/code/Magento/Quote/etc/db_schema.xml b/app/code/Magento/Quote/etc/db_schema.xml
index c7177ac0b9048..d82f9632fdf30 100644
--- a/app/code/Magento/Quote/etc/db_schema.xml
+++ b/app/code/Magento/Quote/etc/db_schema.xml
@@ -17,20 +17,20 @@
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
-
-
+
+
-
-
+
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
@@ -104,7 +106,7 @@
-
+
@@ -119,56 +121,64 @@
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
-
+ nullable="false" default="0"/>
+
+ nullable="true" default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ default="0"/>
+ default="0"/>
+ nullable="true" default="0"/>
-
+ nullable="true" default="0"/>
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
-
+ unsigned="false" nullable="true" default="0"/>
+
+ nullable="true" default="0"/>
+
+
+
+
+
@@ -197,54 +207,56 @@
-
+ default="0"/>
+
+ default="0"/>
-
+ default="0"/>
+
+ default="0"/>
+ default="0"/>
+ nullable="true" default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ nullable="true" default="0"/>
+ default="0"/>
-
+ nullable="true" default="0"/>
+
+ nullable="true" default="0"/>
-
-
-
-
+
+
+
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
@@ -254,6 +266,7 @@
referenceTable="quote" referenceColumn="entity_id" onDelete="CASCADE"/>
+
@@ -279,25 +292,24 @@
-
+ default="0"/>
+
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ default="0"/>
+ default="0"/>
@@ -306,23 +318,28 @@
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
@@ -405,7 +422,7 @@
+ default="0"/>
diff --git a/app/code/Magento/Reports/etc/db_schema.xml b/app/code/Magento/Reports/etc/db_schema.xml
index 04799d3c87f4f..f54d8104f8a18 100644
--- a/app/code/Magento/Reports/etc/db_schema.xml
+++ b/app/code/Magento/Reports/etc/db_schema.xml
@@ -127,7 +127,7 @@
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
-
+ nullable="true" default="0"/>
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
-
+ nullable="true" default="0"/>
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
-
-
-
-
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
+
+
+
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
-
+ nullable="true" default="0"/>
+
-
-
-
-
-
-
-
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
+
+
+
+
+
+
+
+
+ nullable="true" default="0"/>
-
-
-
+ nullable="true" default="0"/>
+
+
+
-
-
+
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
-
+ nullable="true" default="0"/>
+
+ nullable="true" default="0"/>
-
-
-
+ nullable="true" default="0"/>
+
+
+
@@ -173,24 +206,25 @@
identity="false" default="0"/>
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
+ nullable="true" default="0"/>
-
+ unsigned="false" nullable="true" default="0"/>
+
+ nullable="true" default="0"/>
@@ -241,10 +275,14 @@
-
-
-
-
+
+
+
+
@@ -257,12 +295,14 @@
-
+
+ nullable="true" default="0"/>
-
+
@@ -336,6 +376,12 @@
+
+
+
+
+
@@ -383,7 +429,7 @@
+ default="0"/>
@@ -394,95 +440,101 @@
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
-
-
+ default="0"/>
+
+
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ nullable="true" default="0"/>
+ default="0"/>
+ nullable="true" default="0"/>
+ default="0"/>
+ nullable="true" default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ default="0"/>
-
+ nullable="true" default="0"/>
+
-
-
-
+
+
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
+ nullable="true" default="0"/>
-
+ unsigned="false" nullable="true" default="0"/>
+
-
-
-
+ nullable="true" default="0"/>
+
+
+
+ nullable="true" default="0"/>
@@ -501,32 +553,41 @@
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
+ nullable="true" default="0"/>
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
-
+ nullable="true" default="0"/>
+
-
+ nullable="true" default="0"/>
+
+ nullable="true" default="0"/>
@@ -574,8 +635,10 @@
-
-
+
+
@@ -634,7 +697,8 @@
-
+
@@ -697,10 +761,12 @@
-
-
-
-
+
+
+
+
@@ -720,8 +786,9 @@
-
-
+
+
@@ -770,34 +837,44 @@
-
-
-
-
-
+
+
+
+
+
+ nullable="true" default="0"/>
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
-
+ nullable="true" default="0"/>
+
-
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
+
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
-
+ unsigned="false" nullable="true" default="0"/>
+
-
+ nullable="true" default="0"/>
+
-
+
-
+ nullable="true" default="0"/>
+
@@ -948,24 +1028,32 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
+
+
-
+ nullable="true" default="0"/>
+
@@ -973,9 +1061,9 @@
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
@@ -1012,43 +1100,54 @@
-
+
-
+ nullable="true" default="0"/>
+
-
-
+ nullable="true" default="0"/>
+
+
+ nullable="true" default="0"/>
-
-
-
+ nullable="true" default="0"/>
+
+
+
-
-
-
-
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
+
+
+
+
-
-
-
+ nullable="true" default="0"/>
+
+
+
@@ -1068,16 +1167,17 @@
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
-
+ unsigned="false" nullable="true" default="0"/>
+
+ nullable="true" default="0"/>
-
+
@@ -1139,15 +1240,16 @@
identity="false"/>
-
+
-
-
+ nullable="true" default="0"/>
+
+
+ nullable="true" default="0"/>
@@ -1201,24 +1303,32 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+ nullable="true" default="0"/>
+
+
+
+
+
+
-
+ nullable="true" default="0"/>
+
@@ -1226,9 +1336,9 @@
+ nullable="true" default="0"/>
+ unsigned="false" nullable="true" default="0"/>
@@ -1269,11 +1379,14 @@
-
-
-
+
+
+
+ nullable="true" default="0"/>
@@ -1296,11 +1409,14 @@
-
-
-
+
+
+
+ nullable="true" default="0"/>
@@ -1324,35 +1440,35 @@
+ default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
@@ -1376,35 +1492,35 @@
+ default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
@@ -1465,9 +1581,12 @@
-
-
-
+
+
+
@@ -1490,9 +1609,12 @@
-
-
-
+
+
+
@@ -1516,9 +1638,10 @@
-
+
+ nullable="true" default="0"/>
@@ -1543,9 +1666,10 @@
-
+
+ nullable="true" default="0"/>
@@ -1569,9 +1693,9 @@
+ default="0"/>
+ default="0"/>
@@ -1580,6 +1704,7 @@
+
@@ -1599,9 +1724,9 @@
+ default="0"/>
+ default="0"/>
@@ -1610,6 +1735,8 @@
+
@@ -1629,9 +1756,9 @@
+ default="0"/>
+ default="0"/>
@@ -1640,6 +1767,7 @@
+
@@ -1657,13 +1785,17 @@
-
-
+
+
-
+
-
+
@@ -1677,11 +1809,16 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/app/code/Magento/SalesRule/etc/db_schema.xml b/app/code/Magento/SalesRule/etc/db_schema.xml
index 0c8a91175aa93..dbea9859c5161 100644
--- a/app/code/Magento/SalesRule/etc/db_schema.xml
+++ b/app/code/Magento/SalesRule/etc/db_schema.xml
@@ -22,8 +22,9 @@
default="0"/>
-
+ default="0"/>
+
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
@@ -223,17 +224,17 @@
+ default="0"/>
+ default="0"/>
+ default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
+ nullable="false" default="0"/>
@@ -263,11 +264,11 @@
+ default="0"/>
+ default="0"/>
+ default="0"/>
diff --git a/app/code/Magento/SalesSequence/etc/db_schema.xml b/app/code/Magento/SalesSequence/etc/db_schema.xml
index f49ca61f1637e..de5d78a5684c5 100644
--- a/app/code/Magento/SalesSequence/etc/db_schema.xml
+++ b/app/code/Magento/SalesSequence/etc/db_schema.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/app/code/Magento/Search/etc/db_schema.xml b/app/code/Magento/Search/etc/db_schema.xml
index d478536cc4b26..a37ec6a8070de 100644
--- a/app/code/Magento/Search/etc/db_schema.xml
+++ b/app/code/Magento/Search/etc/db_schema.xml
@@ -52,7 +52,6 @@
default="0"/>
-
diff --git a/app/code/Magento/Security/etc/db_schema.xml b/app/code/Magento/Security/etc/db_schema.xml
index 6bbc85b074fd9..61a230706001e 100644
--- a/app/code/Magento/Security/etc/db_schema.xml
+++ b/app/code/Magento/Security/etc/db_schema.xml
@@ -9,7 +9,7 @@
default="1"/>
-
+
@@ -27,7 +27,7 @@
-
+
diff --git a/app/code/Magento/Tax/etc/db_schema.xml b/app/code/Magento/Tax/etc/db_schema.xml
index 21b6f5a6cef75..dd911796bb984 100644
--- a/app/code/Magento/Tax/etc/db_schema.xml
+++ b/app/code/Magento/Tax/etc/db_schema.xml
@@ -35,7 +35,7 @@
-
+
@@ -129,10 +129,11 @@
-
+
-
+
@@ -156,10 +157,11 @@
-
+
-
+
diff --git a/app/code/Magento/Theme/Setup/RecurringData.php b/app/code/Magento/Theme/Setup/RecurringData.php
index 9b2a9ab931304..972b60dc67f89 100644
--- a/app/code/Magento/Theme/Setup/RecurringData.php
+++ b/app/code/Magento/Theme/Setup/RecurringData.php
@@ -6,10 +6,12 @@
namespace Magento\Theme\Setup;
+use Magento\Framework\Indexer\IndexerRegistry;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Theme\Model\Theme\Registration;
+use Magento\Theme\Model\Data\Design\Config;
/**
* Upgrade registered themes
@@ -23,14 +25,21 @@ class RecurringData implements InstallDataInterface
*/
private $themeRegistration;
+ /**
+ * @var IndexerRegistry
+ */
+ private $indexerRegistry;
+
/**
* Init
*
* @param Registration $themeRegistration
+ * @param IndexerRegistry $indexerRegistry
*/
- public function __construct(Registration $themeRegistration)
+ public function __construct(Registration $themeRegistration, IndexerRegistry $indexerRegistry)
{
$this->themeRegistration = $themeRegistration;
+ $this->indexerRegistry = $indexerRegistry;
}
/**
@@ -38,6 +47,8 @@ public function __construct(Registration $themeRegistration)
*/
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
+ $indexer = $this->indexerRegistry->get(Config::DESIGN_CONFIG_GRID_INDEXER_ID);
+ $indexer->reindexAll();
$this->themeRegistration->register();
}
}
diff --git a/app/code/Magento/Theme/Setup/UpgradeData.php b/app/code/Magento/Theme/Setup/UpgradeData.php
index 366e5387b46e5..ade0e9d3f6c39 100644
--- a/app/code/Magento/Theme/Setup/UpgradeData.php
+++ b/app/code/Magento/Theme/Setup/UpgradeData.php
@@ -9,11 +9,9 @@
use Magento\Framework\DB\DataConverter\SerializedToJson;
use Magento\Framework\DB\FieldDataConverterFactory;
use Magento\Framework\DB\Select\QueryModifierFactory;
-use Magento\Framework\Indexer\IndexerRegistry;
use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
-use Magento\Theme\Model\Data\Design\Config;
/**
* @codeCoverageIgnore
@@ -30,26 +28,18 @@ class UpgradeData implements UpgradeDataInterface
*/
private $queryModifierFactory;
- /**
- * @var IndexerRegistry
- */
- protected $indexerRegistry;
-
/**
* UpgradeData constructor
*
- * @param IndexerRegistry $indexerRegistry
* @param FieldDataConverterFactory $fieldDataConverterFactory
* @param QueryModifierFactory $queryModifierFactory
*/
public function __construct(
- IndexerRegistry $indexerRegistry,
FieldDataConverterFactory $fieldDataConverterFactory,
QueryModifierFactory $queryModifierFactory
) {
$this->fieldDataConverterFactory = $fieldDataConverterFactory;
$this->queryModifierFactory = $queryModifierFactory;
- $this->indexerRegistry = $indexerRegistry;
}
/**
@@ -58,8 +48,6 @@ public function __construct(
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
$setup->startSetup();
- $indexer = $this->indexerRegistry->get(Config::DESIGN_CONFIG_GRID_INDEXER_ID);
- $indexer->reindexAll();
if (version_compare($context->getVersion(), '2.0.2', '<')) {
$this->upgradeToVersionTwoZeroTwo($setup);
}
diff --git a/app/code/Magento/Theme/etc/db_schema.xml b/app/code/Magento/Theme/etc/db_schema.xml
index 884a09e9c39c8..a70687eb9eff4 100644
--- a/app/code/Magento/Theme/etc/db_schema.xml
+++ b/app/code/Magento/Theme/etc/db_schema.xml
@@ -7,7 +7,7 @@
-
+
@@ -23,7 +23,7 @@
-
+
diff --git a/app/code/Magento/Weee/etc/db_schema.xml b/app/code/Magento/Weee/etc/db_schema.xml
index b513bf9689080..54a3b1153f7a2 100644
--- a/app/code/Magento/Weee/etc/db_schema.xml
+++ b/app/code/Magento/Weee/etc/db_schema.xml
@@ -9,7 +9,7 @@
default="0"/>
+ default="0"/>
@@ -40,4 +40,80 @@
+
+
+
+
diff --git a/app/code/Magento/Widget/etc/db_schema.xml b/app/code/Magento/Widget/etc/db_schema.xml
index 6f0e4b190ead6..49a2b0ddbcfb9 100644
--- a/app/code/Magento/Widget/etc/db_schema.xml
+++ b/app/code/Magento/Widget/etc/db_schema.xml
@@ -88,7 +88,7 @@
-
+
diff --git a/app/code/Magento/Wishlist/etc/db_schema.xml b/app/code/Magento/Wishlist/etc/db_schema.xml
index f9d0361a88371..2977494a6bda4 100644
--- a/app/code/Magento/Wishlist/etc/db_schema.xml
+++ b/app/code/Magento/Wishlist/etc/db_schema.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/clean_db_schemas.php b/clean_db_schemas.php
index 081c906692c6c..2cd96079c3f16 100644
--- a/clean_db_schemas.php
+++ b/clean_db_schemas.php
@@ -45,7 +45,7 @@
$adapter->query('CREATE DATABASE ' . $resourceConnection->getSchemaName('default'));
foreach ($componentRegistrar->getPaths(\Magento\Framework\Component\ComponentRegistrar::MODULE) as $path) {
- if (strpos($path, 'magento2ee') !== false) {
+ if (strpos($path, 'magento2ce') !== false) {
@unlink($path . DIRECTORY_SEPARATOR . 'etc/db_schema.xml');
}
}
diff --git a/setup/src/Magento/Setup/Model/Declaration/Schema/Db/MySQL/Definition/Columns/Timestamp.php b/setup/src/Magento/Setup/Model/Declaration/Schema/Db/MySQL/Definition/Columns/Timestamp.php
index c5bdf40e0fc50..480932691baa2 100644
--- a/setup/src/Magento/Setup/Model/Declaration/Schema/Db/MySQL/Definition/Columns/Timestamp.php
+++ b/setup/src/Magento/Setup/Model/Declaration/Schema/Db/MySQL/Definition/Columns/Timestamp.php
@@ -48,12 +48,16 @@ public function __construct(OnUpdate $onUpdate, ResourceConnection $resourceConn
*/
public function toDefinition(ElementInterface $column)
{
+ $nullable = $column->getDefault() === 'NULL' ? 'NULL' : 'NOT NULL';
+ $default = $column->getDefault() === 'NULL' ?
+ '' : sprintf('DEFAULT %s', $column->getDefault());
+
return sprintf(
- '%s %s %s %s',
+ '%s %s %s %s %s',
$this->resourceConnection->getConnection()->quoteIdentifier($column->getName()),
$column->getType(),
- $column->getDefault() === 'NULL' ?
- '' : sprintf('DEFAULT %s', $column->getDefault()),
+ $nullable,
+ $default,
$this->onUpdate->toDefinition($column)
);
}
@@ -64,7 +68,7 @@ public function toDefinition(ElementInterface $column)
public function fromDefinition(array $data)
{
if ($data['default'] === self::CONST_DEFAULT_TIMESTAMP) {
- $data['default'] = 0;
+ $data['default'] = '0';
}
$data = $this->onUpdate->fromDefinition($data);
diff --git a/setup/src/Magento/Setup/Model/Declaration/Schema/Db/MySQL/Definition/Columns/Varchar.php b/setup/src/Magento/Setup/Model/Declaration/Schema/Db/MySQL/Definition/Columns/Varchar.php
index 819b29137de4c..8468c0487a1e1 100644
--- a/setup/src/Magento/Setup/Model/Declaration/Schema/Db/MySQL/Definition/Columns/Varchar.php
+++ b/setup/src/Magento/Setup/Model/Declaration/Schema/Db/MySQL/Definition/Columns/Varchar.php
@@ -48,7 +48,7 @@ public function toDefinition(ElementInterface $column)
$column->getType(),
$column->getLength(),
$this->nullable->toDefinition($column),
- !empty($column->getDefault()) ?
+ $column->getDefault() !== null && $column->getDefault() !== '' ?
sprintf('DEFAULT "%s"', $column->getDefault()) : ''
);
}
diff --git a/setup/src/Magento/Setup/Model/Installer.php b/setup/src/Magento/Setup/Model/Installer.php
index f27c831148906..965ed287cfc04 100644
--- a/setup/src/Magento/Setup/Model/Installer.php
+++ b/setup/src/Magento/Setup/Model/Installer.php
@@ -916,7 +916,17 @@ private function handleDBSchemaData($setup, $type, array $request)
$this->logProgress();
}
}
-
+ $stagingModules = [
+ 'Magento_Bundle',
+ 'Magento_Catalog',
+ 'Magento_CatalogUrlRewrite',
+ 'Magento_CatalogInventory',
+ 'Magento_ConfigurableProduct',
+ 'Magento_ProductAlert',
+ 'Magento_Reports',
+ 'Magento_Weee',
+ 'Magento_Wishlist',
+ ];
$this->schemaListener->toogleIgnore(SchemaListener::IGNORE_ON);
if ($type === 'schema') {
$this->log->log('Schema post-updates:');
@@ -926,6 +936,10 @@ private function handleDBSchemaData($setup, $type, array $request)
$handlerType = 'data-recurring';
}
foreach ($moduleNames as $moduleName) {
+ if (in_array($moduleName, $stagingModules)) {
+ $this->schemaListener->setModuleName($moduleName);
+ $this->schemaListener->toogleIgnore(SchemaListener::IGNORE_OFF);
+ }
$this->log->log("Module '{$moduleName}':");
$modulePostUpdater = $this->getSchemaDataHandler($moduleName, $handlerType);
if ($modulePostUpdater) {
@@ -933,6 +947,7 @@ private function handleDBSchemaData($setup, $type, array $request)
$modulePostUpdater->install($setup, $moduleContextList[$moduleName]);
}
$this->logProgress();
+ $this->schemaListener->toogleIgnore(SchemaListener::IGNORE_ON);
}
$this->schemaListener->toogleIgnore(SchemaListener::IGNORE_OFF);
}