I have experienced this problem twice with one of my magento 2 setup. Running in developer mode, it sometime asks me to upgrade Database schema or data when it shows that modules are out dated.
Following the instructions i ran php bin/magento setup:upgrade
which updates the schema but installs the sample data too.
Please share your inputs on this.
If you have the sample data module added to your magento2 this command will install the sample data, if you took the version without sample data, this will not install sample data
see here the 2 versions: https://www.magentocommerce.com/download
See here the instructions how to install the sample data module: http://devdocs.magento.com/guides/v2.1/install-gde/install/sample-data-after-composer.html
php bin/magento setup:upgrade
doesn't install anything. This command updates database schema and data for modules you have already installed.
To install sample data modules, run php bin/magento sampledata:deploy
then run setup:upgrade
command::php bin/magento setup:upgrade
This commands updates the all default and custom modules . in any custom module there will be Setup Folder.
All four files(i.e Installschema.php,InstallData.php,UpdateSchema.php,UpdateData.php) in Setup folder will be executed automatically
If there is some sample data in InstallData.php Then only sample data will be added in model(i.e db table)