The first time my application is used on a given device, I need to perform local database initialisation (this could be for example sql schema or no-sql persistent queries initialisation). This needs to be done before user we’ll be able to use application for the first time but also at the moment when all libraries will be loaded and accessible for me.
Where (when) should I perform such initialisation and how can I guarantee that it will be never fired again, unless user re-installs the application.
(I’m using Ionic2 with TypeScript if it does matter)
Thank you in advance for all ideas.