Exception with Subsonic 2.2, SQLite and Migrations
- by Holger Amann
Hi,
I'm playing with Migrations and created a simple migration like
public class Migration001 : Migration
{
public override void Up()
{
TableSchema.Table testTable = CreateTableWithKey("TestTable");
}
public override void Down()
{
}
}
after executing sonic.exe migrate I'm getting the following output:
Setting ConfigPath: 'App.config'
Building configuration from c:\tmp\MigrationTest\MigrationTest\App.config
Adding connection to SQLiteProvider
Found 1 migration files
Current DB Version is 0
Migrating to 001_Init (1)
There was an error running migration (001_Init):
SQLite error
near "IDENTITY": syntax error
Stack Trace:
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] argum
ents, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle
typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] argume
nts, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwn
er)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
at SubSonic.CodeRunner.RunAndExecute(ICodeLanguage lang, String sourceCode, S
tring methodName, Object[] parameters) in D:\@SubSonic\SubSonic\SubSonic.Migrati
ons\CodeRunner.cs:line 95
at SubSonic.Migrations.Migrator.ExecuteMigrationCode(String migrationFile) in
D:\@SubSonic\SubSonic\SubSonic.Migrations\Migrator.cs:line 177
at SubSonic.Migrations.Migrator.Migrate() in D:\@SubSonic\SubSonic\SubSonic.M
igrations\Migrator.cs:line 141
Any hints?