On 09.10.2008, at 13:25, David Holt wrote:
Is it possible to resize a column with this class?
I just tried:
ERXMigrationTable entryStatusTable = database.existingTableNamed("entry_status");
ERXMigrationColumn nameColumn = entryStatusTable.existingColumnNamed("name");
nameColumn.setWidthType(Types.VARCHAR, 200, null);
It does that, the problem is, that I have no idea, whether that will work with FrontBase. I just tried it with PostgreSQL (8.3) and there I had to change the "alter ..." statement that was created by:
public NSArray statementsToConvertColumnType(String columnName, String tableName, ColumnTypes oldType, ColumnTypes newType, NSDictionary options)
I had to change that method a little bit, so it creates a statement PostgreSQL understands:
Old: alter column table_name.column_name type <new type>;
New: alter table table_name alter column column_name type <new type>;
I don't know whether that will work with the FrontBase plugin. That one doesn't have this method so it relies on the base synchronizationFactory to create a statement. It might or might not work as expected.
So, if you are using PostgreSQL, get the update from the Wonder SVN for the PostgresqlPlugIn. If it doesn't work with FrontBase, drop me a line and I implement that method on the FrontBasePlugIn tonight or tomorrow (whenever Andrea I find the time).
cug
--
Real World WebObjects Bootcamp at the Big Nerd Ranch: