Good afternoon,
I'm implementing migrations for the first time. After struggling a bit with the syntax for the _dbupdater table creation (Frontbase doesn't like leading underscores without the table name being quoted) I got things running. At least I was able to run my initial migration test:
public class TestMigration0 extends Migration {
..verride
public void downgrade(EOEditingContext ec, ERXMigrationDatabase database) throws Throwable {
...
}
..verride
public void upgrade(EOEditingContext ec, ERXMigrationDatabase database) throws Throwable {
ERXMigrationTable table = database.newTableNamed("NEW_TABLE");
table.newIntegerColumn("NEW_TABLE_ID", false);
table.newStringColumn("NEW_TABLE_STRING_1", 100, true);
table.newStringColumn("NEW_TABLE_STRING_2", 100, true);
table.newStringColumn("NEW_TABLE_STRING_3", 100, true);
table.create();
table.setPrimaryKey("NEW_TABLE_ID");
}
}
So far so good. I then tried to implement a second migration class:
public class TestMigration1 extends Migration {
..verride
public void downgrade(EOEditingContext ec, ERXMigrationDatabase database) throws Throwable {
...
}
..verride
public void upgrade(EOEditingContext ec, ERXMigrationDatabase database) throws Throwable {
ERXMigrationTable table = database.existingTableNamed("NEW_TABLE");
table.newStringColumn("NEW_TABLE_STRING_4", 100, true);
}
}
This results in a failure due to invalid SQL. The alter statement looks something like this:
alter table NEW_TABLE null NEW_TABLE_STRING_4 VARCHAR(100)
That's obviously not going to work. Would any of you have any idea where I went wrong?
Thanks,
Jon
OSX 10.5.5
Eclipse 3.3.2
WOLips 3.3.5503
WO 5.4.3
Wonder 10/12/08
Frontbase 4.2.7
This archive was generated by hypermail 2.0.0 : Wed Oct 15 2008 - 14:19:20 EDT