opencart/opencart — pull request #150 by shvchk (2012-09-19 05:08:11+00:00)
Title: Choice to populate DB with sample data or not during installation

During installation process, users now can choose whether to populate database with sample data (default) or not. Here is a screenshot:
![](https://dl.dropbox.com/u/1401886/img/opencart-sample-data-checkbox.png)

To do so, all sample data is moved from install/opencart.sql to separate files named by corresponding tables, and that stripped down opencart.sql is renamed to base.sql. By default, user gets base.sql plus all other .sql files imported to the database, exactly as it is now, but if user unchecks the checkbox, only base.sql is imported, resulting in a database without any sample data. Thus, the default behavior remains unchanged, users just have a choice now.

Of course, those small .sql files could be easily combined into one, but the idea is that in future users should have a choice, which data they will import, and which not (e.g. import countries, but not currencies and products.), so "one file per table" seems to be quite a flexible approach from this perspective.