Android Application-Architecture: Using multiple ContentProviders and sql-tables and onUpgrade Event
<p>I have a relativly simple application that has <code>Products</code> and a <code>ShoppingCard</code>. <code>Product</code> is one table and <code>ShoppingCard</code> is another table.</p>

<p>So I made a <code>ProductContentProvider</code> and <code>ShoppingCardContentProvider</code>.</p>

<p>Each <code>ContentProvider</code> invokes in its <code>onCreate</code> Method a private Class that is child of <code>SQLiteOpenHelper</code>.</p>

<p>So the <code>ProductContentProvider</code>, create its <code>Product</code>-Table and the <code>ShoppingCardContentProvider</code> creates it <code>ShoppingCard</code> table.</p>

<p>Now comes the confusing part: From my point of view I would make a global static variable *DATABASE_VERSION* in a SEPARATED ConfigBean that is responsible for BOTH ContentProvider's, so if I update that all tables are updated.
=> That does not work. Simply the onUpdate Event is never thrown.</p>

<p>If you specify a DATABASE_VERSION in each ContentProvider, but with DIFFERENT version-numbers in each Content-Provider
=> That does not work [also makes no sense even from my point of view, cause the param in the class SQLiteOpenHelper is called DATABASE_VERSION NOT TABLE_VERSION, so in other words you cannot update any table without updating/throwing an event on all onUpgrade Listeners].</p>

<p>If you specify a DATABASE_VERSION in each ContentProvider, but with EQUAL version-numbers in each Content-Provider
=> works.</p>

<p>My question is, why can't you make the DATABASE_VERSION a public static variable outside to handle upgrades globaly, or am I completely on the wrong path with my architecture?</p>
