title: How to add column to an active android database table?
body: <p>I am using <code>Active Android</code> in order to perform sqllite operations in my android app. Following is a model class.</p>
  
  <pre><code>@Table(name="books")
  public class Books extends Model {
  @Column(name = "bookId")
  public String bookId;
  @Column(name = "bookName")
  public String bookName;
  }
  </code></pre>
  
  <p>I want to add a new column to this. So I followed the instructions on <a href="https://github.com/pardom/ActiveAndroid/wiki/Schema-migrations" rel="nofollow">Active Android's Schema Migration Doc</a>.</p>
  
  <p>a. Updated the <code>AA_DB_VERSION</code></p>
  
  <p>b. Added a new sql file in <code>assets/migrations</code></p>
  
  <p>Then when I run my app I get the below exception</p>
  
  <pre><code>1553-1553/com.hannan.delivery E/SQLiteLog﹕ (21) API called with NULL prepared statement
  1553-1553/com.hannan.delivery E/SQLiteLog﹕ (21) misuse at line 63241 of [00bb9c9ce4]
  java.lang.RuntimeException: Unable to create application com.hannan.delivery.MyApplication: android.database.sqlite.SQLiteException: not an error (code 0)
          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4154)
          at android.app.ActivityThread.access$1300(ActivityThread.java:130)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
          ....
   Caused by: android.database.sqlite.SQLiteException: not an error (code 0)
          at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
          at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:727)
          at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
          at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
          at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1665)
          at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1594)
          at com.activeandroid.DatabaseHelper.executeSqlScript(DatabaseHelper.java:180)
          at com.activeandroid.DatabaseHelper.executeMigrations(DatabaseHelper.java:150)
          at com.activeandroid.DatabaseHelper.onUpgrade(DatabaseHelper.java:74)
          at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:257)
          at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
          at com.activeandroid.Cache.openDatabase(Cache.java:102)
          at com.activeandroid.Cache.initialize(Cache.java:75)
          at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:44)
          at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:34)
          at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:30)
          at com.activeandroid.app.Application.onCreate(Application.java:25)
          at com.hannan.delivery.MyApplication.onCreate(MyApplication.java:51)
          at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
          ...
  </code></pre>
  
  <p>Here's MyApplication's Create method where it is failing.</p>
  
  <pre><code>@Override
  public void onCreate() {
      super.onCreate();
      ActiveAndroid.initialize(this);
  }
  </code></pre>
  
  <p>Migration Script is: (2.sql)</p>
  
  <pre><code>ALTER TABLE books ADD COLUMN bookAuthor TEXT;
  </code></pre>
  
  <p>Kindly suggest as to why I am getting this error.</p>