From 884b54be2f39e24d93d02bb095afd7a275c88edd Mon Sep 17 00:00:00 2001 From: "ivan.hrytsai" Date: Wed, 20 Nov 2024 15:39:45 +0200 Subject: [PATCH] 12220-Declarative-Schema-for-all-extensions --- Setup/InstallSchema.php | 86 ----------------------------------------- etc/db_schema.xml | 20 ++++++++++ 2 files changed, 20 insertions(+), 86 deletions(-) delete mode 100755 Setup/InstallSchema.php create mode 100644 etc/db_schema.xml 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 @@ + + + + + + + + + + + + + + + + + + +
+