Skip to content

Instantly share code, notes, and snippets.

@schakko
Created December 23, 2011 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schakko/1514418 to your computer and use it in GitHub Desktop.
Save schakko/1514418 to your computer and use it in GitHub Desktop.
Database migration workflow sample in XML
<db-workflow>
<defaults>
<var key="server">test</var>
<var key="test">${server}_name</var>
</default>
<workflows>
<workflow name="update">
<vars>
<ask_for var="server" />
<ask_for var="user" />
<ask_for var="password" />
<ask_for var="database" />
</vars>
<actions>
<execute with-compile="true" result-to-var="latest">%sql_script_command SELECT* FROM schema_version</execute>
<execute with-compile="true">handlers/lock_database_template.sql</execute>
<execute-dir>handlers/</execute-dir>
<execute-dir by-order="true">tables/</execute-dir>
</action>
</workflow>
</workflows>
</db-workflow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment