|
[
Permlink
| « Hide
]
Dave Syer added a comment - 27/Jun/08 02:45 AM
Some platforms allow you to skip a drop if the table doesn't exist. Anyway this is a perfectly reasonable suggestion. I think the reason they are in the same script is historical (the InitializingDataSourceFactoryBean that we used to use had only one script to run at startup). To be sure we do not inadvertently break tests (environment specific ordering can catch you out) we should change all the tests configs to include the new drop script in the initScripts, preserving the current behaviour. Errors on drop are ignored by default in the factory bean by default so all the tests should still work on any platform.
In order to maintain the current scripts we could simply provide two additional scripts per platform - schema-create-xxx.sql and xhema-drop-xxx.sql containing the create and drop statements respectively. The schema-xxx.sql could still be provided with both drop and create statements.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||