• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Wonder-disc] ERXMigrationColumn resize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wonder-disc] ERXMigrationColumn resize


  • Subject: Re: [Wonder-disc] ERXMigrationColumn resize
  • From: David Holt <email@hidden>
  • Date: Thu, 9 Oct 2008 15:05:15 -0700

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [Wonder-disc] ERXMigrationColumn resize
      • From: Guido Neitzer <email@hidden>
References: 
 >Re: [Wonder-disc] ERXMigrationColumn resize (From: Guido Neitzer <email@hidden>)

  • Prev by Date: WORadioButton error
  • Next by Date: Re: [Wonder-disc] ERXMigrationColumn resize
  • Previous by thread: Re: [Wonder-disc] ERXMigrationColumn resize
  • Next by thread: Re: [Wonder-disc] ERXMigrationColumn resize
  • Index(es):
    • Date
    • Thread