创建新模块时出现此错误:
"Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Sangeeta_Octan data: current version - none, required version - 0.0.1";i:1;s:1781:"#0
我在google上搜索过,除了重新安装Magento之外,没有找到解决办法。如:
版本已从" 2.0.0.0"更改到" 2.0.0"在开发过程中 所以更新工具无法识别" 2.0.0.0" < =" 2.0.0"。请, 从头开始重新安装您的应用程序以获取最新版本。 `
除了重新安装之外,我还有其他选择吗?
答案 0 :(得分:7)
更改模块的 setup_version (Sangeeta_Octan)
app/code/Sangeeta/Octan/etc/module.xml
。尝试不同的版本
名称如setup_version="2.0.1"
或setup_version="3.0.0"
运行bin/magento setup:upgrade
如果这不起作用,请通过将app/etc/config.php
中的模块名称从Sangeeta_Octan => 1
更改为Sangeeta_Octan => 0
来停用您的模块。然后运行bin/magento setup:upgrade
我希望以下解决方案也可以解决您的问题。
答案 1 :(得分:6)
NULL
它将有3个字段。在data_version
&中查找schema_version
值让它们匹配 <?php
//Merchant Admin URL: https://migs.mastercard.com.au/ma/CBA
//Merchant ID: TEST
//Operator ID: Admin
//Password: d#test
// Access Code AEFTEST 1A22FTESTTEST
$session_id = 1;
$finalprice = 50;
$testarr = array(
"vpc_Amount" => $finalprice*100,//Final price should be multifly by 100
"vpc_AccessCode" => "AEFTEST",//Put your access code here
"vpc_Command"=> "pay",
"vpc_Locale"=> "en",
"vpc_MerchTxnRef"=> "CLI".$session_id, //This should be something unique number, i have used the session id for this
"vpc_Merchant"=> "TEST",//Add your merchant number here
"vpc_OrderInfo"=> "1A22FTESTTEST",//this also better to be a unique number
"vpc_ReturnURL"=> "http://localhost/test1/index.php/commweb/",//Add the return url here so you have to code here to capture whether the payment done successfully or not
"vpc_Version"=> "1");
ksort($testarr); // You have to ksort the arry to make it according to the order that it needs
$SECURE_SECRET = "d#test";//Add the secure secret you have get
$securehash = $SECURE_SECRET;
$url = "https://migs.mastercard.com.au/ma/CBA";
foreach ($testarr as $key => $value)
{
$securehash .= $value;
$url .= $key."=".urlencode($value)."&";
}
$securehash = md5($securehash);//Encoding
$url .= "vpc_SecureHash=".$securehash;
header("location:https://migs.mastercard.com.au/vpcpay?$url");
?>
答案 2 :(得分:5)
作为替代方案,您可以访问magento数据库并查看表setup_module
您将看到所有已安装模块的列表,您可以在此处手动设置架构/数据版本号。
答案 3 :(得分:0)
从setup_module
表中删除有问题的行(如果它们在那里)并从Magento 2根目录运行命令bin/magento setup:upgrade
。