diff --git a/Setup/InstallSchema.php b/Setup/InstallSchema.php deleted file mode 100755 index af4e2ea..0000000 --- a/Setup/InstallSchema.php +++ /dev/null @@ -1,86 +0,0 @@ -startSetup(); - - /** - * Create table 'magefan_login_as_customer' - */ - $table = $installer->getConnection()->newTable( - $installer->getTable('magefan_login_as_customer') - )->addColumn( - 'login_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, - null, - ['identity' => true, 'nullable' => false, 'primary' => true], - 'Admin Login ID' - )->addColumn( - 'customer_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, - null, - ['nullable' => true], - 'Customer ID' - )->addColumn( - 'admin_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, - null, - ['nullable' => true], - 'Admin ID' - )->addColumn( - 'secret', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - '64', - ['nullable' => true], - 'Login Secret' - )->addColumn( - 'used', - \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, - null, - ['nullable' => false, 'default' => '1'], - 'Is Login Used' - )->addColumn( - 'created_at', - \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, - null, - [], - 'Creation Time' - )->addIndex( - $installer->getIdxName('magefan_login_as_customer', ['customer_id']), - ['customer_id'] - ) - ->addIndex( - $installer->getIdxName('magefan_login_as_customer', ['admin_id']), - ['admin_id'] - )->setComment( - 'Magefan Login As Customer Table' - ); - $installer->getConnection()->createTable($table); - - $installer->endSetup(); - } -} diff --git a/etc/db_schema.xml b/etc/db_schema.xml new file mode 100644 index 0000000..80db86b --- /dev/null +++ b/etc/db_schema.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + +
+