webERP Forum

Full Version: Demo Data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I noticed today that the file sql/mysq/country_sql/demo.sql contains more or less the same info as the default.sql file. At one time it included demo data that people could use to play around with, but that seems to have gone.

I assume this was accidental and not deliberate?

There are a bunch of INSERTs towards the end of that file... what other things appear to be missing?
Customers, suppliers, stock items, stock categories, stock locations, all the other things that are needed to create those things such as sales areas, sales people etc.
Here is an example of what it used to look like:
Ok, I'll diff that tomorrow night to compare.

I know that I've not removed anything, at least not intentionally.
I'll also have to check if the release handling may have done something unexpected. (I would think not, but...)
The way the release script works is that it takes the data that is in the weberpdemo database on the system where you are running the script and appends it to a dump of just the structure, so if you start with a weberpdemo database that contains just the default, that is the data that ends up in the demo.sql file.

Looking at it, I think you created a weberpdemo database based on sql/mysql/country_sql/default.sql before running the release script, and so that is what you ended up with in demo.sql. Perhaps we would be better moving to a system where the demo data wasn't automatically created, but was something we constructed to be most helpful to a user?

Yes, I see what you mean in the diff. At first, it appeared to be mostly chartdetails, which is a huge section, but there are at least a dozen other areas as well.

To the part about "the demo data wasn't automatically created" ... do you mean like a separate sql file for that data, if desired? If so, this could be a better idea, perhaps.

I don't recall exactly what happened, but I do recall having the install issue with the FK thing (where all the tables were not being created) before the release, and I may have only had a 'skeleton' structure at the end. So that point is very plausible.
What I had in mind was to make a hand crafted sql file containing a selection of suppliers/customers/inventory items, with their associated date, designed to show off the various accounting features of webERP. This would then just need to be updated with any database changes each release, but that could easily be scripted.

In the absence of anything from any of the admins I have committed a demo.sql file based on the one I linked to earlier from a previous release. I have updated it for the database changes that have since happened.

I think I messed up with this. While trying to track down reported issues else where I realised that there were errors with the demo.sql file. I have committed revised demo.sql and default.sql files.

Would be great if someone could test what I have done.

Paul: I have created a pull request to your repository if you want to check what I have done and merge when you are happy.

Sure, I can test that later this week.