Giter VIP home page Giter VIP logo

Comments (2)

sprankhub avatar sprankhub commented on September 18, 2024

As you can see here:

get('database_upgrade_needed') || get('config_import_needed') ?

the maintenance mode will be set if database_upgrade_needed or config_import_needed is set.

database_upgrade_needed checks bin/magento setup:db:status:

set('database_upgrade_needed', function () {
try {
run('{{bin/php}} {{release_path}}/{{magento_bin}} setup:db:status');
} catch (ProcessFailedException $e) {
if ($e->getProcess()->getExitCode() == DB_UPDATE_NEEDED_EXIT_CODE) {
return true;
}
throw $e;
} catch (RuntimeException $e) {
if ($e->getExitCode() == DB_UPDATE_NEEDED_EXIT_CODE) {
return true;
}
throw $e;
}
return false;
});

config_import_needed checks bin/magento app:config:status:

set('config_import_needed', function () {
try {
run('{{bin/php}} {{release_path}}/{{magento_bin}} app:config:status');
} catch (ProcessFailedException $e) {
if ($e->getProcess()->getExitCode() == CONFIG_IMPORT_NEEDED_EXIT_CODE) {
return true;
}
throw $e;
} catch (RuntimeException $e) {
if ($e->getExitCode() == CONFIG_IMPORT_NEEDED_EXIT_CODE) {
return true;
}
throw $e;
}
return false;
});

So either your database needs to be upgraded every time or config needs to be imported every time.

For us, the maintenance mode is only set when necessary, so this seems to be working in general.

from magento2-deployer-plus.

VivekShingala avatar VivekShingala commented on September 18, 2024

Hi @sprankhub

Yes, I already checked the code behind the task maintenance:set:if-needed and I was still facing the issue. Upon checking further, I found that there is some issue with Magento and we need to update this parameter in my.cnf file.

In order for MySQL TIMESTAMP fields to follow the preferences and composition expected by Magento's declarative schema architecture, the system variable explicit_defaults_for_timestamp must be set to on.

If this setting is not enabled, setup:db:status will always report that Declarative Schema is not up to date

More info here: Added note regarding use of explicit_defaults_for_timestamps=on

from magento2-deployer-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.