[ 
https://issues.apache.org/jira/browse/OFBIZ-4779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262285#comment-13262285
 ] 

Daniel Riquelme commented on OFBIZ-4779:
----------------------------------------

I have lot of experience with this matter and I came to the conclusion that the 
optimal solution in general is to drop tables or indexes as needed during 
development. And dropping the entire database and recreating it when the mess 
is to big. 
If for any reason you need to delete all data frequently and don't want to wait 
for database re-recreation, you can always have a blank database with all the 
tables and indexes created and use that as a template, in Postgres you can do a:

{code} 
DROP DATABASE <database name>
{code}

and then:

{code} 
CREATE DATABASE <database name> TEMPLATE <blank database> 
{code}

This will be faster than letting OFBiz do the database creation.
                
> Add an ant task/code/script for dropping all datas from the database
> --------------------------------------------------------------------
>
>                 Key: OFBIZ-4779
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4779
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: WXP SP3 Sun JDK 1.6.0_30 Postgres 9.1
>            Reporter: Francis ANDRE
>
> Hi
> It would be nice to have an ant task or a script for cleaning/removing all 
> datas in the databases so that one can restart reloading the seed, 
> seed-initial and then its own data file.
> When developing a new environment for ofbiz, one has always to fix bugs on 
> the entities values in this datafile until it is properly cleaned up. Thus, 
> avoiding the unnecessary "create tables/key/indexes" phases will shorten the 
> development cycle.
> Rgds

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to