data_version is the version of data added via the data scripts.
Those scripts are developped under the module folder under the
schema_version is the version of the database schema added via the setup scripts.
Those scripts are developed under the module folder under the
So the scenario when
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
php bin/magento setup:db-data:upgrade will upgrade the data and make both versions the same