smontgomerie/Appcelerator-on-Rails — Issue #2: Error running migrations
Author: nicinabox
Created: 2011-10-24 17:32:37+00:00
State: open

It loads up, runs the initial migrations, then crashes with a stack trace when it tries to update the schema_migrations version. I tried with the [demo app](http://primegap.net/2011/08/05/mvc-implementation-for-appcelerator-part-4-model-and-db/) and it seemed to work okay.

> [ERROR] Error occurred calling next on a PLSqliteResultSet. SQLite error: 'constraint failed' for 'INSERT INTO schema_migrations VALUES (?)'

I've got the following at the top of my controller:

Ti.include("../include/inheritance.js");
Ti.include("../include/db.js");
Ti.include("../common/controller.js");
Ti.include("../views/lookbooks.js");
Ti.include("../models/lookbooks.js");