Skip to content

Commit 545b30c

Browse files
committed
Merge branch 'ACP2E-1792' of https://github.com/magento-l3/magento2ce into PR-04202023
2 parents 98fb0dc + 8951368 commit 545b30c

File tree

3 files changed

+55
-3
lines changed

3 files changed

+55
-3
lines changed

app/code/Magento/Quote/etc/db_schema.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@
9797
<column name="store_id"/>
9898
<column name="is_active"/>
9999
</index>
100-
<index referenceId="QUOTE_STORE_ID" indexType="btree">
100+
<index referenceId="QUOTE_STORE_ID_UPDATED_AT" indexType="btree">
101101
<column name="store_id"/>
102+
<column name="updated_at"/>
102103
</index>
103104
</table>
104105
<table name="quote_address" resource="checkout" engine="innodb" comment="Sales Flat Quote Address">

app/code/Magento/Quote/etc/db_schema_whitelist.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
},
5454
"index": {
5555
"QUOTE_CUSTOMER_ID_STORE_ID_IS_ACTIVE": true,
56-
"QUOTE_STORE_ID": true
56+
"QUOTE_STORE_ID": true,
57+
"QUOTE_STORE_ID_UPDATED_AT": true
5758
},
5859
"constraint": {
5960
"PRIMARY": true,
@@ -121,7 +122,9 @@
121122
"vat_is_valid": true,
122123
"vat_request_id": true,
123124
"vat_request_date": true,
124-
"vat_request_success": true
125+
"vat_request_success": true,
126+
"validated_country_code": true,
127+
"validated_vat_number": true
125128
},
126129
"index": {
127130
"QUOTE_ADDRESS_QUOTE_ID": true
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Quote;
9+
10+
use Magento\Framework\App\ObjectManager;
11+
use Magento\Framework\App\ResourceConnection;
12+
use Magento\Framework\DB\Adapter\AdapterInterface;
13+
use Monolog\Test\TestCase;
14+
15+
class DbSchemaTest extends TestCase
16+
{
17+
/**
18+
* @param string $tableName
19+
* @param string $indexName
20+
* @param array $columns
21+
* @param string $indexType
22+
* @return void
23+
* @dataProvider indexDataProvider
24+
*/
25+
public function testIndex(
26+
string $tableName,
27+
string $indexName,
28+
array $columns,
29+
string $indexType = AdapterInterface::INDEX_TYPE_INDEX,
30+
): void {
31+
$connection = ObjectManager::getInstance()->get(ResourceConnection::class)->getConnection();
32+
$indexes = $connection->getIndexList($tableName);
33+
$this->assertArrayHasKey($indexName, $indexes);
34+
$this->assertSame($columns, $indexes[$indexName]['COLUMNS_LIST']);
35+
$this->assertSame($indexType, $indexes[$indexName]['INDEX_TYPE']);
36+
}
37+
38+
public function indexDataProvider(): array
39+
{
40+
return [
41+
[
42+
'quote',
43+
'QUOTE_STORE_ID_UPDATED_AT',
44+
['store_id', 'updated_at']
45+
]
46+
];
47+
}
48+
}

0 commit comments

Comments
 (0)