Hi Anshul,

Here would be my approach. Manually add the new column but without the
not null constraint. I would set it so that a default value is applied
for new rows. Update the data of the existing rows setting the default
value for the column, then alter the table to set the not null
constraint on the field.

The next question is will hibernate freak out with an extra column that
it doesn't know about. I've seen it go both ways, but some quick testing
should answer that.

---
*John Gasper*
IAM Consultant
Unicon, Inc.
PGP/GPG Key: 0xbafee3ef

On 9/29/14 5:41 AM, Anshul wrote:
> Hi,
>
> I am using JPA ticket registry feature to store tickets in postgresql 
> database, while upgrading CAS 3.5.2 to CAS 4.0.0, a new column 
> "supplemental_authentications" need to be added in ticketgrantingticket table 
> of type oid with not null constraint.
>
> Before upgrading to CAS 4.0.0, we have already logged-in users, whose TGT's 
> are present in postgresql database, and upgrading to CAS 4.0.0 gives an error 
> asking for column "supplemental_authentications". If i delete all TGT's from 
> database and restart tomcat, a new column is added and all works fine. I 
> don't want to loose TGT's present in database earlier in database.
>
> Is this possible to retain TGT's present in database while upgrading from CAS 
> 3.5.2 to CAS 4.0.0. ?


-- 
You are currently subscribed to cas-dev@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-dev

Reply via email to