Re: adding new columns to table

2012-11-26 Thread Michael Gentry
Using Flyway (or Liquibase), you'll have to extract the JDBC connection
from Cayenne to pass to Flyway to perform the migration when the
application initializes.  See the bottom of:

http://flywaydb.org/documentation/api.html

Also, Flyway doesn't know about Cayenne, so you'd have to update your
Cayenne model to have your new column(s) then add an SQL script (or Java
migration) for Flyway to use to upgrade the schema separately.  Not too
difficult, just something to keep in mind to be part of your process.

mrg



On Sun, Nov 25, 2012 at 10:45 AM, emeka okafor emeka_1...@yahoo.com wrote:

 Thank you for your suggestions; I am going to try both and see which one
 is easier.



 
  From: Juan José Gil mat...@gmail.com
 To: user@cayenne.apache.org
 Sent: Saturday, November 24, 2012 11:08 PM
 Subject: Re: adding new columns to table

 wouldn't be better to use something like flyway? http://flywaydb.org/


 2012/11/24 John Huss johnth...@gmail.com

  There is an experimental library in the cayenne-sandbox you could try:
  http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
 
  I'm using it in production, but your mileage may vary.  The migrations
 are
  not automatically generated (except for the initial database) but they
 are
  easy to write.
 
 
  On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor emeka_1...@yahoo.com
  wrote:
 
   Is there a cayenne way to modifying a databse table? Like a way for
   cayenne to generate a migration class that can be run when when my
 schema
   changes.
 



Re: adding new columns to table

2012-11-26 Thread Juan José Gil
I've been using cayenne+flyway in a maven3 project... its a pleasure ;)
its true that they don't integrate but, till now it does not been a problem
for me :)


2012/11/26 Michael Gentry mgen...@masslight.net

 Using Flyway (or Liquibase), you'll have to extract the JDBC connection
 from Cayenne to pass to Flyway to perform the migration when the
 application initializes.  See the bottom of:

 http://flywaydb.org/documentation/api.html

 Also, Flyway doesn't know about Cayenne, so you'd have to update your
 Cayenne model to have your new column(s) then add an SQL script (or Java
 migration) for Flyway to use to upgrade the schema separately.  Not too
 difficult, just something to keep in mind to be part of your process.

 mrg



 On Sun, Nov 25, 2012 at 10:45 AM, emeka okafor emeka_1...@yahoo.com
 wrote:

  Thank you for your suggestions; I am going to try both and see which one
  is easier.
 
 
 
  
   From: Juan José Gil mat...@gmail.com
  To: user@cayenne.apache.org
  Sent: Saturday, November 24, 2012 11:08 PM
  Subject: Re: adding new columns to table
 
  wouldn't be better to use something like flyway? http://flywaydb.org/
 
 
  2012/11/24 John Huss johnth...@gmail.com
 
   There is an experimental library in the cayenne-sandbox you could try:
   http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
  
   I'm using it in production, but your mileage may vary.  The migrations
  are
   not automatically generated (except for the initial database) but they
  are
   easy to write.
  
  
   On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor emeka_1...@yahoo.com
   wrote:
  
Is there a cayenne way to modifying a databse table? Like a way for
cayenne to generate a migration class that can be run when when my
  schema
changes.
  
 



Re: adding new columns to table

2012-11-26 Thread emeka okafor
For some reason I can't seem to be able to check out cayenne-migrations:
svn co http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations does not 
work



 From: emeka okafor emeka_1...@yahoo.com
To: user@cayenne.apache.org user@cayenne.apache.org 
Sent: Sunday, November 25, 2012 4:45 PM
Subject: Re: adding new columns to table
 
Thank you for your suggestions; I am going to try both and see which one is 
easier.




From: Juan José Gil mat...@gmail.com
To: user@cayenne.apache.org 
Sent: Saturday, November 24, 2012 11:08 PM
Subject: Re: adding new columns to table

wouldn't be better to use something like flyway? http://flywaydb.org/


2012/11/24 John Huss johnth...@gmail.com

 There is an experimental library in the cayenne-sandbox you could try:
 http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/

 I'm using it in production, but your mileage may vary.  The migrations are
 not automatically generated (except for the initial database) but they are
 easy to write.


 On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor emeka_1...@yahoo.com
 wrote:

  Is there a cayenne way to modifying a databse table? Like a way for
  cayenne to generate a migration class that can be run when when my schema
  changes.


Re: adding new columns to table

2012-11-26 Thread Andrus Adamchik
This is a viewer URL. Try this instead:

http://svn.apache.org/repos/asf/cayenne/sandbox/cayenne-migrations/

On Nov 26, 2012, at 10:43 PM, emeka okafor emeka_1...@yahoo.com wrote:

 For some reason I can't seem to be able to check out cayenne-migrations:
 svn co http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations does 
 not work
 
 
 
 From: emeka okafor emeka_1...@yahoo.com
 To: user@cayenne.apache.org user@cayenne.apache.org 
 Sent: Sunday, November 25, 2012 4:45 PM
 Subject: Re: adding new columns to table
 
 Thank you for your suggestions; I am going to try both and see which one is 
 easier.
 
 
 
 
 From: Juan José Gil mat...@gmail.com
 To: user@cayenne.apache.org 
 Sent: Saturday, November 24, 2012 11:08 PM
 Subject: Re: adding new columns to table
 
 wouldn't be better to use something like flyway? http://flywaydb.org/
 
 
 2012/11/24 John Huss johnth...@gmail.com
 
 There is an experimental library in the cayenne-sandbox you could try:
 http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
 
 I'm using it in production, but your mileage may vary.  The migrations are
 not automatically generated (except for the initial database) but they are
 easy to write.
 
 
 On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor emeka_1...@yahoo.com
 wrote:
 
 Is there a cayenne way to modifying a databse table? Like a way for
 cayenne to generate a migration class that can be run when when my schema
 changes.



Re: adding new columns to table

2012-11-26 Thread emeka okafor
Thank you very much indeed.




 From: Andrus Adamchik and...@objectstyle.org
To: user@cayenne.apache.org 
Sent: Monday, November 26, 2012 8:47 PM
Subject: Re: adding new columns to table
 
This is a viewer URL. Try this instead:

http://svn.apache.org/repos/asf/cayenne/sandbox/cayenne-migrations/

On Nov 26, 2012, at 10:43 PM, emeka okafor emeka_1...@yahoo.com wrote:

 For some reason I can't seem to be able to check out cayenne-migrations:
 svn co http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations does 
 not work
 
 
 
 From: emeka okafor emeka_1...@yahoo.com
 To: user@cayenne.apache.org user@cayenne.apache.org 
 Sent: Sunday, November 25, 2012 4:45 PM
 Subject: Re: adding new columns to table
 
 Thank you for your suggestions; I am going to try both and see which one is 
 easier.
 
 
 
 
 From: Juan José Gil mat...@gmail.com
 To: user@cayenne.apache.org 
 Sent: Saturday, November 24, 2012 11:08 PM
 Subject: Re: adding new columns to table
 
 wouldn't be better to use something like flyway? http://flywaydb.org/
 
 
 2012/11/24 John Huss johnth...@gmail.com
 
 There is an experimental library in the cayenne-sandbox you could try:
 http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/
 
 I'm using it in production, but your mileage may vary.  The migrations are
 not automatically generated (except for the initial database) but they are
 easy to write.
 
 
 On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor emeka_1...@yahoo.com
 wrote:
 
 Is there a cayenne way to modifying a databse table? Like a way for
 cayenne to generate a migration class that can be run when when my schema
 changes.

Re: adding new columns to table

2012-11-25 Thread emeka okafor
Thank you for your suggestions; I am going to try both and see which one is 
easier.




 From: Juan José Gil mat...@gmail.com
To: user@cayenne.apache.org 
Sent: Saturday, November 24, 2012 11:08 PM
Subject: Re: adding new columns to table
 
wouldn't be better to use something like flyway? http://flywaydb.org/


2012/11/24 John Huss johnth...@gmail.com

 There is an experimental library in the cayenne-sandbox you could try:
 http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/

 I'm using it in production, but your mileage may vary.  The migrations are
 not automatically generated (except for the initial database) but they are
 easy to write.


 On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor emeka_1...@yahoo.com
 wrote:

  Is there a cayenne way to modifying a databse table? Like a way for
  cayenne to generate a migration class that can be run when when my schema
  changes.


Re: adding new columns to table

2012-11-24 Thread John Huss
There is an experimental library in the cayenne-sandbox you could try:
http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/

I'm using it in production, but your mileage may vary.  The migrations are
not automatically generated (except for the initial database) but they are
easy to write.


On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor emeka_1...@yahoo.com wrote:

 Is there a cayenne way to modifying a databse table? Like a way for
 cayenne to generate a migration class that can be run when when my schema
 changes.


Re: adding new columns to table

2012-11-24 Thread Juan José Gil
wouldn't be better to use something like flyway? http://flywaydb.org/


2012/11/24 John Huss johnth...@gmail.com

 There is an experimental library in the cayenne-sandbox you could try:
 http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/

 I'm using it in production, but your mileage may vary.  The migrations are
 not automatically generated (except for the initial database) but they are
 easy to write.


 On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor emeka_1...@yahoo.com
 wrote:

  Is there a cayenne way to modifying a databse table? Like a way for
  cayenne to generate a migration class that can be run when when my schema
  changes.



Re: adding new columns to table

2012-11-24 Thread Aristedes Maniatis

Also liquibase is really good, especially if you support multiple database 
types.

Ari


On 25/11/12 9:08am, Juan José Gil wrote:

wouldn't be better to use something like flyway? http://flywaydb.org/


2012/11/24 John Huss johnth...@gmail.com


There is an experimental library in the cayenne-sandbox you could try:
http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-migrations/

I'm using it in production, but your mileage may vary.  The migrations are
not automatically generated (except for the initial database) but they are
easy to write.


On Sat, Nov 24, 2012 at 10:59 AM, emeka okafor emeka_1...@yahoo.com
wrote:


Is there a cayenne way to modifying a databse table? Like a way for
cayenne to generate a migration class that can be run when when my schema
changes.






--
--
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A