facebooktwittergoogle_pluslinkedinmailby feather

In case you are supposed to feed the initial data to the DB for a code-first project during deploy-time (There are possible ways to do it in the code level of course), there is a problem: You do not know when the database schema is created even if you start the service.

In my case, i have Tomcat environment and i cannot feed the data just after i start the tomcat service. There can be two ways to workaround that:

1. Polling: Check periodically if the schema is created and after feed the data

2. Sleep: Observe the worst-case time and put a "sleep" before the data feed scripts

If there are other practical ways to do that during deploy-time and out of the codebase, please comment!