AnsweredAssumed Answered

custom db patches configuration

Question asked by vycitalr on Jun 16, 2008
Hello,

In my project I need to have some custom changes in DB (PL/SQL procedure), and I want it to manage on bootstrap. In other words, during bootstrap I want to check that my custom DB object is created, and if not then create it.  What is the easiest/ preffered  way to do this?  After a while of studying the patch-services-context.xml and the bootstrap-context.xml I am little bit confused about it. Some points:

1. I want the object be checked/created in both cases when bootstraping on clean shcema as well as when updating
2. is it enough to define a patch bean (based on SchemaUpgradeScriptPatch) to be executed? Or does this bean need to be refferenced from the schemaBootstrap?
3. what are the meainings of fixesFromSchema, fixesToSchema, targetSchema properties in patch bean? How to set these ? For me it would be  satysfying to launch my sql-script on every bootstrap, as I can use "CREATE or REPLACE function"…so it is no problem when is called again and again.

Thanks for any clarification. 
Regards Robert

Outcomes