Skip to content

Commit 00cfc97

Browse files
authored
Create declarative db scheme
2 parents f6cabb4 + 3d36b67 commit 00cfc97

File tree

3 files changed

+50
-85
lines changed

3 files changed

+50
-85
lines changed

app/code/Magento/LoginAsCustomer/Setup/InstallSchema.php

Lines changed: 0 additions & 85 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
10+
<table name="login_as_customer_log" resource="default" engine="innodb" comment="Magento Login As Customer Table">
11+
<column xsi:type="int" name="login_id" nullable="false" identity="true"
12+
comment="Admin Login ID"/>
13+
<column xsi:type="int" name="customer_id" nullable="true" identity="false"
14+
comment="Customer ID"/>
15+
<column xsi:type="int" name="admin_id" nullable="true" identity="false"
16+
comment="Admin ID"/>
17+
<column xsi:type="varchar" name="secret" length="64" nullable="true" comment="Login Secret"/>
18+
<column xsi:type="smallint" name="used" padding="6" nullable="false" default="1" comment="Is Login Used"/>
19+
<column xsi:type="timestamp" name="created_at" comment="Creation Time"/>
20+
<constraint xsi:type="primary" referenceId="PRIMARY">
21+
<column name="login_id"/>
22+
</constraint>
23+
<index referenceId="LOGIN_AS_CUSTOMER_LOG_CUSTOMER_ID" indexType="btree">
24+
<column name="customer_id"/>
25+
</index>
26+
<index referenceId="LOGIN_AS_CUSTOMER_LOG_ADMIN_ID" indexType="btree">
27+
<column name="admin_id"/>
28+
</index>
29+
</table>
30+
</schema>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"login_as_customer_log": {
3+
"column": {
4+
"login_id": true,
5+
"customer_id": true,
6+
"admin_id": true,
7+
"secret": true,
8+
"used": true,
9+
"created_at": true
10+
},
11+
"index": {
12+
"LOGIN_AS_CUSTOMER_LOG_CUSTOMER_ID_ADMIN_ID": true,
13+
"LOGIN_AS_CUSTOMER_LOG_CUSTOMER_ID": true,
14+
"LOGIN_AS_CUSTOMER_LOG_ADMIN_ID": true
15+
},
16+
"constraint": {
17+
"PRIMARY": true
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)