<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to execute some code at Ivy Project deployment time for upgrading a database ?</title><link>https://answers.axonivy.com/questions/3574/how-to-execute-some-code-at-ivy-project-deployment-time-for-upgrading-a-database</link><description>&lt;p&gt;Hi IvyTeam,&lt;/p&gt;
&lt;p&gt;We have the following situation: we will have to deploy from time to time an Ivy Application. This application defines a database (MS SQL) for storing the application's data. We would like to create/update this database automatically at Ivy Deployment time with an database updating system like Flyway. (With some SQL Scripts CREATE / UPDATE TABLE ....)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is that already possible with Ivy? Ivy does it already at Ivy Engine installation or upgrade time with its System database. This would be a great feature if we could create/upgrade our project's databases at application deployment time.&lt;/li&gt;
&lt;li&gt;If not we should be able to execute some code at Ivy deployment time. Is there some Ivy Server Extension points allowing this easily?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks a lot in advance
Cheers Emmanuel&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3574/how-to-execute-some-code-at-ivy-project-deployment-time-for-upgrading-a-database" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 13 Dec 2018 02:43:58 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/3574/how-to-execute-some-code-at-ivy-project-deployment-time-for-upgrading-a-database/3575</link><description>&lt;ul&gt;
&lt;li&gt;if you just need an updated database schema and you access the DB using JPA you can use the standard schema migrations: &lt;code&gt;hibernate.hbm2ddl.auto=update&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;when you have a proprietary stack you can implement an extension point that is triggered at deploy time: &lt;code&gt;ch.ivyteam.ivy.deployment.restricted.IProjectResourceDeployer&lt;/code&gt;. But be warned that this an internal extension point and can be changed at any time from our side without notice.&lt;/li&gt;
&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Thu, 13 Dec 2018 02:43:58 -0500</pubDate><guid>https://answers.axonivy.com/questions/3574/how-to-execute-some-code-at-ivy-project-deployment-time-for-upgrading-a-database/3575</guid></item></channel></rss>