Skip to main content

data_version is the version of data added via the data scripts.

Those scripts are developpeddeveloped under the module folder under the Setup/InstallData.php and Setup/UpgradeData.php.

schema_version is the version of the database schema added via the setup scripts.

Those scripts are developed under the module folder under the Setup/InstallSchema.php and Setup/UpgradeSchema.php

So the scenario when data_version and schema_version are different is the following:

  • youYou have a module that have both setup and data scripts
  • normallyNormally you should run php bin/magento setup:upgrade so both schema and data scripts will run
  • insteadInstead of doing this you first run php bin/magento setup:db-schema:upgrade . At this point the schema_version will be different to the data_version
  • runningRunning php bin/magento setup:db-data:upgrade will upgrade the data and make both versions the same

data_version is the version of data added via the data scripts.

Those scripts are developped under the module folder under the Setup/InstallData.php and Setup/UpgradeData.php

schema_version is the version of the database schema added via the setup scripts.

Those scripts are developed under the module folder under the Setup/InstallSchema.php and Setup/UpgradeSchema.php

So the scenario when data_version and schema_version are different is the following:

  • you have a module that have both setup and data scripts
  • normally you should run php bin/magento setup:upgrade so both schema and data scripts will run
  • instead of doing this you first run php bin/magento setup:db-schema:upgrade . At this point the schema_version will be different to the data_version
  • running php bin/magento setup:db-data:upgrade will upgrade the data and make both versions the same

data_version is the version of data added via the data scripts.

Those scripts are developed under the module folder under the Setup/InstallData.php and Setup/UpgradeData.php.

schema_version is the version of the database schema added via the setup scripts.

Those scripts are developed under the module folder under the Setup/InstallSchema.php and Setup/UpgradeSchema.php

So the scenario when data_version and schema_version are different is the following:

  • You have a module that have both setup and data scripts
  • Normally you should run php bin/magento setup:upgrade so both schema and data scripts will run
  • Instead of doing this you first run php bin/magento setup:db-schema:upgrade . At this point the schema_version will be different to the data_version
  • Running php bin/magento setup:db-data:upgrade will upgrade the data and make both versions the same

data_version is the version of data added via the data scripts.

Those scripts are developped under the module folder under the Setup/InstallData.php and Setup/UpgradeData.php

schema_version is the version of the database schema added via the setup scripts.

Those scripts are developpeddeveloped under the module folder under the Setup/InstallSchema.php and Setup/UpgradeSchema.php

So the scenario when data_version and schema_version are different is the following:

  • you have a module that have both setup and data scripts
  • normally you should run php bin/magento setup:upgrade so both schema and data scripts will run
  • instead of doing this you first run php bin/magento setup:db-schema:upgrade . At this point the schema_version will be different to the data_version
  • running php bin/magento setup:db-data:upgrade will upgrade the data and make both versions the same

data_version is the version of data added via the data scripts.

Those scripts are developped under the module folder under Setup/InstallData.php and Setup/UpgradeData.php

schema_version is the version of the database schema added via the setup scripts.

Those scripts are developped under the module folder under Setup/InstallSchema.php and Setup/UpgradeSchema.php

So the scenario when data_version and schema_version are different is the following:

  • you have a module that have both setup and data scripts
  • normally you should run php bin/magento setup:upgrade so both schema and data scripts will run
  • instead of doing this you first run php bin/magento setup:db-schema:upgrade . At this point the schema_version will be different to the data_version
  • running php bin/magento setup:db-data:upgrade will upgrade the data and make both versions the same

data_version is the version of data added via the data scripts.

Those scripts are developped under the module folder under the Setup/InstallData.php and Setup/UpgradeData.php

schema_version is the version of the database schema added via the setup scripts.

Those scripts are developed under the module folder under the Setup/InstallSchema.php and Setup/UpgradeSchema.php

So the scenario when data_version and schema_version are different is the following:

  • you have a module that have both setup and data scripts
  • normally you should run php bin/magento setup:upgrade so both schema and data scripts will run
  • instead of doing this you first run php bin/magento setup:db-schema:upgrade . At this point the schema_version will be different to the data_version
  • running php bin/magento setup:db-data:upgrade will upgrade the data and make both versions the same
Source Link

data_version is the version of data added via the data scripts.

Those scripts are developped under the module folder under Setup/InstallData.php and Setup/UpgradeData.php

schema_version is the version of the database schema added via the setup scripts.

Those scripts are developped under the module folder under Setup/InstallSchema.php and Setup/UpgradeSchema.php

So the scenario when data_version and schema_version are different is the following:

  • you have a module that have both setup and data scripts
  • normally you should run php bin/magento setup:upgrade so both schema and data scripts will run
  • instead of doing this you first run php bin/magento setup:db-schema:upgrade . At this point the schema_version will be different to the data_version
  • running php bin/magento setup:db-data:upgrade will upgrade the data and make both versions the same