Hi Guido,
Thanks for this information. I just tried a migration with:
import java.sql.Types; // for Types.VARCHAR parameter below
ERXMigrationTable surveyTable = database.existingTableNamed("Survey");
survey1500.existingColumnNamed("5_box").setWidthType(Types.VARCHAR,
200,null);
And it worked out of the box with Frontbase. It preserves the field
values too, which is what I was concerned about.
This was in the Stack trace:
INFO er.extensions.jdbc.ERXJDBCUtilities - Executing alter column
"Survey"."5_box" to VARCHAR(200)
David
On 9-Oct-08, at 2:40 PM, Guido Neitzer wrote:
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:
http://www.bignerdranch.com/classes/real-world_webobjects.shtml
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]