title: How to use sugar orm to run migrations
body: <p>I have an existing Android application which pre packages a database called app.db . The app.db file resides in src/main/res/raw . On starting the application it gets copied over to data/data/app/databases. </p>
  
  <p>The current version of db is 2, which was set using SQLiteOpenHelper. I don't want to bind this db to any model object but only add or delete rows from it by running some dmls. </p>
  
  <p>The Manifest looks like this:</p>
  
  <pre><code>&lt;application
     android:label="@string/app_name"
     android:icon="@drawable/launcher"
     android:name="MyApplication"&gt;
     ...
   &lt;meta-data android:name="DATABASE" android:value="app.db" /&gt;
   &lt;meta-data android:name="VERSION" android:value="3" /&gt;
   &lt;meta-data android:name="QUERY_LOG" android:value="true" /&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>MyAppplication class extends SugarApp.
   I created a folder called sugar_upgrades in assets and created a file in it called 3.sql. This file contains a script like:</p>
  
  <pre><code>DELETE FROM images WHERE id = 53;
  </code></pre>
  
  <p>But after running the application this script never runs. I think the issue is Sugar is expecting the db to be present in /data folder. But in the start of the application it is present in res/raw and that is why it is not able to pick it up. Any way that I can achieve this?</p>