You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@yahoo.com> on 2008/06/29 17:05:28 UTC

Best Practice for Entity Deprecation Service

I need to create a service that runs one time to move records from a deprecated entity to its replacement.

I know I can schedule a job to run only once, but what do I do with the deprecated entity? Do I delete the records in it, so the copying isn't performed again by accident?

-Adrian



      

Re: Best Practice for Entity Deprecation Service

Posted by David E Jones <jo...@hotwaxmedia.com>.
Oh yeah, for the deleting records part. Similar to the other post: I'd  
leave that to be manual as well. In other words, once they have  
checked that the data is okay and working and such they can just kill  
old tables/columns pretty easily. You could have a separate service to  
do it if you want to have that part of it available in a service.

-David


On Jun 29, 2008, at 9:05 AM, Adrian Crum wrote:

> I need to create a service that runs one time to move records from a  
> deprecated entity to its replacement.
>
> I know I can schedule a job to run only once, but what do I do with  
> the deprecated entity? Do I delete the records in it, so the copying  
> isn't performed again by accident?
>
> -Adrian
>
>
>
>


Re: Best Practice for Entity Deprecation Service

Posted by Jacques Le Roux <ja...@les7arts.com>.
Adrian,

In the sequel I suppose that the task you intend to to is not for OFBiz stock but your own OFBiz version.

From: "Adrian Crum" <ad...@yahoo.com>
>I need to create a service that runs one time to move records from a deprecated entity to its replacement.
>
> I know I can schedule a job to run only once, but what do I do with the deprecated entity? Do I delete the records in it, so the 
> copying isn't performed again by accident?

I'd to suggest to rename it at the end of the job by adding _old

Jacques

>
> -Adrian
>
>
>
>
> 


Re: Best Practice for Entity Deprecation Service

Posted by David E Jones <jo...@hotwaxmedia.com>.
Don't worry about having it run in an automated way. The point is just  
to have something around that people can run on a production database  
(generally after testing it on a staging database that is a clone of  
the production database) that will do the data move needed.

In other words, they are to be used as part of a semi-manual upgrade  
process. For many of these things I'm not sure that we would want it  
to be totally automated (for the same reason it's best to run it on a  
staging database first before moving to the production database).  
Because people may customize things or have a different revision than  
they think they do, or whatever, this becomes pretty important.

-David


On Jun 29, 2008, at 9:05 AM, Adrian Crum wrote:

> I need to create a service that runs one time to move records from a  
> deprecated entity to its replacement.
>
> I know I can schedule a job to run only once, but what do I do with  
> the deprecated entity? Do I delete the records in it, so the copying  
> isn't performed again by accident?
>
> -Adrian
>
>
>
>