On Jan 26, 2011, at 2:47 PM, Ramsey Gurley wrote:

Hi John,

I just tried it on a clean db and that appears to be the case. Whether I use newDateColumn or newTimestampColumn I'm getting

CREATE TABLE StockReservation (created timestamp NOT NULL, expiration timestamp...

Do you happen to know where it's failing to generate the right type? Is it a postgresql specific problem, or is the same with migrations on other dbs?

Nevermind, I think I see where it gets the value. externalTypeForJDBCType on the SQLHelper class.


Oddly, now the migrations are doing timestamp without timezone... which is what I expected. Somehow the ones I generated on a different database a few days ago created "with timezone". (>.<) Gotta love timestamps.

Ramsey



On Jan 26, 2011, at 2:09 PM, John Huss wrote:

I don't think there is any way currently to use migrations to create a column with external type "date". You have to write SQL or modify the PostgresqlPlugIn.

John


On Wed, Jan 26, 2011 at 1:04 PM, Theodore Petrosky <[email protected]> wrote:
Ramsey,

I tried the newDateColumn and I got a :

timestamp without time zone

however I was expecting a date column. Am I missing something?

Ted

--- On Wed, 1/26/11, Ramsey Gurley <[email protected]> wrote:

> From: Ramsey Gurley <[email protected]>
> Subject: Re: what am i doing wrong with this qualifier
> To: "Theodore Petrosky" <[email protected]>
> Cc: "WebObjects Development" <[email protected]>
> Date: Wednesday, January 26, 2011, 9:39 AM
> No, you're doing it right. I haven't
> had a chance to update the
> migration templates yet.  I need to add a migration
> method for time
> and make sure that works too.  For now, just change
> that to a
> newDateColumn method yourself. I believe it should work
> fine.
>
> Ramsey
>
> On Jan 26, 2011, at 9:31 AM, Theodore Petrosky wrote:
>
> > sorry, I didn't copy the list.
> >
> > Great, I will experiment but I did try to add a
> JodaLocalDate
> >
> > I used the prototype and got
> >
> > Prototype: jodaLocalDate
> > External Type:  date
> > Class:  org.joda.time.LocalDate
> > Value Class: org.joda.time.LocalDate
> > Value Type: D
> >
> > Factory and Conversion method  jodaLoalDate
> >
> > but when I asked for the Migrations I got:
> >
> > securitySettingsTable.newBlobColumn("c_a_date",
> false);
> >
> > a new blob column? I expected a date column. Do I need
> to do
> > something more?
> >>
> >> Ted
> >>
> >>
> >> --- On Wed, 1/26/11, Ramsey Gurley <[email protected]>
> >> wrote:
> >>
> >>> From: Ramsey Gurley <[email protected]>
> >>> Subject: Re: what am i doing wrong with this
> >> qualifier
> >>> To: "Theodore Petrosky" <[email protected]>
> >>> Cc: "WebObjects Development" <[email protected]>
> >>> Date: Wednesday, January 26, 2011, 8:43 AM
> >>>
> >>> On Jan 26, 2011, at 6:47 AM, Theodore Petrosky
> wrote:
> >>>
> >>>>
> >>>> Postgresql supports dates without
> timestamp, I
> >> wish I
> >>> knew how to do this in webobject java. (But
> still call
> >> them
> >>> dates so I can do date math.)
> >>>
> >>> If you are using a very recent version of 54
> Wonder
> >>> (committed in the last week), there are new
> date
> >> prototypes
> >>> using Joda time classes instead of
> NSTimestamps. Joda
> >> allows
> >>> for datetimes, dates, and times without a
> timezone.
> >>> Joda simplifies date math quite a bit too.
> >>>
> >>> Ramsey
> >>
> >>
> >>
> >>
> >
> >
> >
> > _______________________________________________
> > 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/ramsey%40xeotech.com
> >
> > This email sent to [email protected]
> >
>
>



_______________________________________________
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/johnthuss%40gmail.com

This email sent to [email protected]

_______________________________________________
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/ramsey%40xeotech.com

This email sent to [email protected]

_______________________________________________
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/ramsey%40xeotech.com

This email sent to [email protected]


 _______________________________________________
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]

Reply via email to