title: creating tables in existing database sqlite sugar orm
body: <p>I have existing database that I have created using <code>SQLiteOpenHelper</code>, but now I want to move to Sugar Orm and trying to add new tables in existing databases. I am following all the points mentioned on configuration page of sugar orm page (<a href="http://satyan.github.io/sugar/getting-started.html" rel="nofollow">Sugar Orm Configuration</a>).</p>
  
  <p>Here is how my configuration looks like,</p>
  
  <p>AndroidManifest.xml</p>
  
  <pre><code>&lt;application
      android:name=".application"
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
  
      &lt;meta-data android:name="DATABASE" android:value="database.db" /&gt;
      &lt;meta-data android:name="VERSION" android:value="5" /&gt;
      &lt;meta-data android:name="QUERY_LOG" android:value="true" /&gt;
      &lt;meta-data android:name="DOMAIN_PACKAGE_NAME" android:value="com.example.in.smart" /&gt;
  </code></pre>
  
  <p>application.java (Application class)</p>
  
  <pre><code>public class application extends com.orm.SugarApp
   {
  private static Context instance;
   public static Context get() {
      return application.instance;
  }
  </code></pre>
  
  <p>Model class</p>
  
  <pre><code>public class Now extends SugarRecord&lt;Now&gt; {
  public String type = null;
  public String name = null;
  public String address = null;
  public Date created;
  
  public Now(){}
  
  public Now(String type, String name,String address,Date created){
      super();
      this.type = type;
      this.name = name;
      this.address = address;
      this.created = created;
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>@Override public void onCreate()
  {
      super.onCreate();
      instance = getApplicationContext();
      //ACRA.init(this);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>adding data process </p>
  
  <pre><code>   Now now = new Now(entry.getKey(), entry.getValue().get(i).name, entry.getValue().get(i).address, calendar.getTime());
    now.save(); // throws exception here
  </code></pre>
  
  <p>But I get this exception </p>
  
  <pre><code>E/SQLiteLog﹕ (1) no such table: NOW
   E/SQLiteDatabase﹕ Error inserting ADDRESS=abc TYPE=Now NAME=tyy CREATED=1430229379156
  android.database.sqlite.SQLiteException: no such table: NOW (code 1): , while compiling: INSERT INTO NOW(ADDRESS,TYPE,NAME,CREATED) VALUES (?,?,?,?)
          at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
          at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
          at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
          at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
          at android.database.sqlite.SQLiteProgram.&lt;init&gt;(SQLiteProgram.java:58)
          at android.database.sqlite.SQLiteStatement.&lt;init&gt;(SQLiteStatement.java:31)
          at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1469)
          at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1341)
          at com.orm.SugarRecord.save(SugarRecord.java:126)
          at com.orm.SugarRecord.save(SugarRecord.java:45)
  </code></pre>
  
  <p>any suggestion coz for me it looks like I am doing everything right. Thanks</p>