Skip to content

Commit 547f43b

Browse files
authored
Merge pull request #24 from magento-tsg/MC-41539
MC-41539: [2.3.7] After running setup:upgrade, setup:db:check still says: Declarative Schema is not up to date
2 parents 8073878 + 0badb78 commit 547f43b

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\AdobeIms\Test\Integration;
10+
11+
use Magento\TestFramework\Helper\Bootstrap;
12+
use PHPUnit\Framework\TestCase;
13+
use Magento\Framework\Setup\Declaration\Schema\UpToDateDeclarativeSchema;
14+
15+
/**
16+
* Test for declarative schema setup
17+
*/
18+
class DbSchemaTest extends TestCase
19+
{
20+
/**
21+
* @var UpToDateDeclarativeSchema
22+
*/
23+
private $validator;
24+
25+
/**
26+
* @inheritdoc
27+
*/
28+
protected function setUp(): void
29+
{
30+
$this->validator = Bootstrap::getObjectManager()->get(UpToDateDeclarativeSchema::class);
31+
}
32+
33+
/**
34+
* Test for db schema
35+
*/
36+
public function testDbSchemaUpToDate(): void
37+
{
38+
$this->assertTrue($this->validator->isUpToDate());
39+
}
40+
}

AdobeIms/etc/db_schema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<column xsi:type="text" name="refresh_token" nullable="true" comment="Refresh Token"/>
1818
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Created At"/>
1919
<column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Updated At"/>
20-
<column xsi:type="timestamp" name="access_token_expires_at" on_update="false" nullable="false" comment="Access Token Expires At"/>
20+
<column xsi:type="timestamp" name="access_token_expires_at" on_update="false" nullable="false" default="0" comment="Access Token Expires At"/>
2121
<index referenceId="ADOBE_USER_PROFILE_ID" indexType="btree">
2222
<column name="id"/>
2323
</index>

0 commit comments

Comments
 (0)