| View previous topic :: View next topic |
| Author |
Message |
andrey
Joined: 05 Jan 2005 Posts: 4 Location: Sofia, Bulgaria
|
Posted: Sun Jan 30, 2005 4:52 pm Post subject: Clear test data from Compiere |
|
|
I want to share a code that has proved very useful for us. When one begin to fiddle with Compiere and enter sample test data, he or she may often find in position when things go messy and start over is needed. But in Compiere it is not easy to delete data: especially transactions and accounting data.
So here I present you with the current version of our ClearData process, that erases all the transactional data (orders, financial and material storage data) from Compiere's current client, and let you start over. You do not lose any static data - like business partners, products, etc. With this process you can easily start over testing. But it is highly recommended not to use this process on production environment!
Here you are:
http://alpha.bulgarpress.com/ClearData.rar
Some installation hints: inside the archive you'll find 2 java classes. To run it you'll probably need to change their package names (we use custom build schema, as we have a lot of addons which we keep outside compiere source). The easiest way is to put them into Compiere's "base" project. Then you shall rebuild Compiere. After that start up compiere, log-in as System and add (from "Report & Process") a new process using ClearData class. Then add a Menu item and restart the Compiere client.
Use it at your own risk! I do not guarantee that it will always work, as we have come to it in an empiric way, and from time to time we use to add some more tables for deletion. Nevertheless it works for us. Hope some of you may find it useful.
Regards,
Andrey. |
|
| Back to top |
|
 |
red1 Site Admin
Joined: 06 Jul 2004 Posts: 1753 Location: Kuala Lumpur, Malaysia
|
Posted: Sun Jan 30, 2005 10:38 pm Post subject: |
|
|
Hi Andrey,
This sounds really useful. I m sure many will enjoy what u contributed. On behalf of them, I heartily thank you.
many regards,
red1 |
|
| Back to top |
|
 |
eric100
Joined: 15 Aug 2006 Posts: 9
|
Posted: Sat Oct 14, 2006 11:06 am Post subject: Where to download the file ? |
|
|
Hi,
The URL to download this file "ClearData.rar" is no longer available.
I really need this file as i want to reset test data from compiere and i find it difficult to do manually.
Could anyone give the updted URL for downloading it ?
Thanks |
|
| Back to top |
|
 |
andrey
Joined: 05 Jan 2005 Posts: 4 Location: Sofia, Bulgaria
|
Posted: Sun Oct 15, 2006 2:27 am Post subject: |
|
|
Hi!
it's been long time since I worked on compiere, meanwhile we have changed our company site... Now ClearData source (which was developed at the time of Compiere 251.x) is available for download from this location. I haven't tried it on newer distributions... and it needs some integration with Compiere to get it to work. But it hope that this source will be useful.
Regards,
Andrey. |
|
| Back to top |
|
 |
eric100
Joined: 15 Aug 2006 Posts: 9
|
Posted: Sun Oct 15, 2006 4:11 am Post subject: Delete transaction data |
|
|
Hi, the code and the idea behind are very good, i have just tried it on 253b but in vain.
I have to dig more..
what am trying to do is to delete test data and migrate customization from an instance to an other.
Anyway thanks a lot for your reply. |
|
| Back to top |
|
 |
andrey
Joined: 05 Jan 2005 Posts: 4 Location: Sofia, Bulgaria
|
Posted: Wed Oct 18, 2006 8:17 pm Post subject: |
|
|
| My code is very simple and just removes the data from some of the tables of Compiere. It does not cope with migration at all. A fellow member (Trifon) of this forum has some solution for migration of some of the customization data - but you'll have to look at it to see if it works for you. |
|
| Back to top |
|
 |
eric100
Joined: 15 Aug 2006 Posts: 9
|
Posted: Thu Oct 19, 2006 4:45 am Post subject: Removing testing data |
|
|
I have found a similar sql scrpit of what you have given wrote by pshen but it has to be adapted for 253b as the database has evolved.
I tested th 2 pack solution without any problem for creationg packages and exporting them (packOut), but the problem is in importing (packIn).
there ares some issues.
now am examinating the trifon solution and testing it.
I tried with taod but...
with the import and restoredb scripts given by compiere some customised windows have some fields that do not recognize their colum db fields even if the exists in database and compiere tables
i think i will finish by trying to create an sql scrip or an xml tool for that if i can
Thanks |
|
| Back to top |
|
 |
|