-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to add column to table #222
Comments
Could we have the full stacktrace and the migration-script, please? |
Hi, Here is the stack trace. java.lang.RuntimeException: Unable to create application On Mon, Apr 28, 2014 at 5:54 PM, Niki Hansche notifications@github.comwrote:
|
Migration Script: (3.sql) Also Tried with Both are resulting in same error. |
I could also see the below errors: 1553-1553/com.hannan.delivery E/SQLiteLog﹕ (21) API called with NULL prepared statement Please check and let me know what has to be done? |
Hi HannanShaik! I’m really sorry, but I couldn’t reproduce this error, which means the error is in your setup, not in ActiveAndroid. If you want to, you can download http://uploaded.net/file/3zom6ayx |
I'm getting this as well. A fresh install works fine. Although my scenario is a bit different. When I did my migration, a column would go missing in one of my tables. (I didn't remove it). Trying to add it manually with the migration script would result in this error. |
Figured it out, I think. Would an empty line (blank space) cause an issue here? One migration script I had did and it failed. I removed it and it seemed to work. |
I also had this issue - the reason is because comments, newlines, and queries broken up across multiple lines are not processed correctly - my guess is because the migration is being ran line-by-line, so multi-line queries fail and comments and spaces become nulls. |
Please have a look at #215. |
@vonloxley thanks for the heads up, using that tag fixes it for me! |
@HannanShaik You can now close this issue :) |
Hi Team,
I have a table with below structure.
@table(name="books")
public class Books extends Model {
@column(name = "bookId")
public String bookId;
}
I want to Add a new column. I followed the steps mentioned in https://github.com/pardom/ActiveAndroid/wiki/Schema-migrations. But I am getting the below error:
Caused by: android.database.sqlite.SQLiteException: not an error (code 0)
This happens at My Application class where I am initializing active android.
Please Help.
Thanks.
The text was updated successfully, but these errors were encountered: