[aerogear-dev] [RFC] UPS DB Migration Strategy

classic Classic list List threaded Threaded
13 messages Options
qmx
Reply | Threaded
Open this post in threaded view
|

[aerogear-dev] [RFC] UPS DB Migration Strategy

qmx
Administrator
Howdy!

I've been envisioning a plan for UPS migrations, and would like to get
some feedback from the community, so here it is:

When there are model changes, it's kinda annoying to generate the sql
migration files. This is one of the reasons Erik Jan de Wit started
working to add liquibase to the project, allowing for seamless
migrations.

I'd like to build upon Erik's initial work and prepare a `ups-migrator`
distribution:

ups-migrator-VERSION.zip
`--ups-migrator.jar
`--ups-migrator-postgresql.properties
`--ups-migrator-mysql.properties
`--lib
   `-- <jdbc drivers>
         `-- <liquibase & deps>

This migrator tool can be run with plain `java -jar` and deals with all
the migrations needed up to `VERSION`, which means we would need only
one migrator tool for both 1.0.x and HEAD.

Thoughts? Comments?

--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

Bruno Oliveira
+1

On Mon, Jan 26, 2015 at 8:43 AM, Douglas Campos <[hidden email]> wrote:
Howdy!

I've been envisioning a plan for UPS migrations, and would like to get
some feedback from the community, so here it is:

When there are model changes, it's kinda annoying to generate the sql
migration files. This is one of the reasons Erik Jan de Wit started
working to add liquibase to the project, allowing for seamless
migrations.

I'd like to build upon Erik's initial work and prepare a `ups-migrator`
distribution:

ups-migrator-VERSION.zip
`--ups-migrator.jar
`--ups-migrator-postgresql.properties
`--ups-migrator-mysql.properties
`--lib
   `-- <jdbc drivers>
         `-- <liquibase & deps>

This migrator tool can be run with plain `java -jar` and deals with all
the migrations needed up to `VERSION`, which means we would need only
one migrator tool for both 1.0.x and HEAD.

Thoughts? Comments?

--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

-- 
"The measure of a man is what he does with power" - Plato
-
@abstractj
-
Volenti Nihil Difficile

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

danielbevenius
+1 Sounds nice

On 26 January 2015 at 11:57, Bruno Oliveira <[hidden email]> wrote:
+1

On Mon, Jan 26, 2015 at 8:43 AM, Douglas Campos <[hidden email]> wrote:
Howdy!

I've been envisioning a plan for UPS migrations, and would like to get
some feedback from the community, so here it is:

When there are model changes, it's kinda annoying to generate the sql
migration files. This is one of the reasons Erik Jan de Wit started
working to add liquibase to the project, allowing for seamless
migrations.

I'd like to build upon Erik's initial work and prepare a `ups-migrator`
distribution:

ups-migrator-VERSION.zip
`--ups-migrator.jar
`--ups-migrator-postgresql.properties
`--ups-migrator-mysql.properties
`--lib
   `-- <jdbc drivers>
         `-- <liquibase & deps>

This migrator tool can be run with plain `java -jar` and deals with all
the migrations needed up to `VERSION`, which means we would need only
one migrator tool for both 1.0.x and HEAD.

Thoughts? Comments?

--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

-- 
"The measure of a man is what he does with power" - Plato
-
@abstractj
-
Volenti Nihil Difficile

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

Matthias Wessendorf
In reply to this post by qmx


On Mon, Jan 26, 2015 at 11:43 AM, Douglas Campos <[hidden email]> wrote:
Howdy!

I've been envisioning a plan for UPS migrations, and would like to get
some feedback from the community, so here it is:

When there are model changes, it's kinda annoying to generate the sql
migration files. This is one of the reasons Erik Jan de Wit started
working to add liquibase to the project, allowing for seamless
migrations.

I'd like to build upon Erik's initial work and prepare a `ups-migrator`
distribution:

ups-migrator-VERSION.zip
`--ups-migrator.jar
`--ups-migrator-postgresql.properties
`--ups-migrator-mysql.properties
`--lib
   `-- <jdbc drivers>
         `-- <liquibase & deps>

This migrator tool can be run with plain `java -jar` and deals with all
the migrations needed up to `VERSION`, which means we would need only
one migrator tool for both 1.0.x and HEAD.


Sounds like a great idea. How do I specify the actual DB that I'd like to touch during the migration? Do I specify (cmd args?) which of the properties is picked up ? 

-Matthias 

 

Thoughts? Comments?

--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

Erik Jan de Wit
In reply to this post by qmx

On 26/01/2015 11:43, Douglas Campos wrote:
> This migrator tool can be run with plain `java -jar` and deals with all
> the migrations needed up to `VERSION`, which means we would need only
> one migrator tool for both 1.0.x and HEAD.
>
> Thoughts? Comments?
great idea, but why not use the maven plugin to execute the liquibase
migration?

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
qmx
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

qmx
Administrator
In reply to this post by Matthias Wessendorf
On Mon, Jan 26, 2015 at 12:19:50PM +0100, Matthias Wessendorf wrote:
> On Mon, Jan 26, 2015 at 11:43 AM, Douglas Campos <[hidden email]> wrote:
> Sounds like a great idea. How do I specify the actual DB that I'd like to
> touch during the migration? Do I specify (cmd args?) which of the
> properties is picked up ?
I should've named the files ups-migrator-postgresql-example.properties.
You just create a ups-migrator.properties :)


--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

Matthias Wessendorf


On Mon, Jan 26, 2015 at 12:30 PM, Douglas Campos <[hidden email]> wrote:
On Mon, Jan 26, 2015 at 12:19:50PM +0100, Matthias Wessendorf wrote:
> On Mon, Jan 26, 2015 at 11:43 AM, Douglas Campos <[hidden email]> wrote:
> Sounds like a great idea. How do I specify the actual DB that I'd like to
> touch during the migration? Do I specify (cmd args?) which of the
> properties is picked up ?
I should've named the files ups-migrator-postgresql-example.properties.
You just create a ups-migrator.properties :)

Sounds good to me !
 


--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
qmx
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

qmx
Administrator
In reply to this post by Erik Jan de Wit
On Mon, Jan 26, 2015 at 12:22:41PM +0100, Erik Jan de Wit wrote:
>
> On 26/01/2015 11:43, Douglas Campos wrote:
> > This migrator tool can be run with plain `java -jar` and deals with all
> > the migrations needed up to `VERSION`, which means we would need only
> > one migrator tool for both 1.0.x and HEAD.
> >
> > Thoughts? Comments?
> great idea, but why not use the maven plugin to execute the liquibase
> migration?
There are several reasons, but the most important is to avoid asking our
users which just deploy a war file into their appserver to clone the
project, wait for maven to download the internet, then finally see the
migration happening.

Also, the maven plugin has less features than the liquibase cli tools.

--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

Matthias Wessendorf


On Mon, Jan 26, 2015 at 12:32 PM, Douglas Campos <[hidden email]> wrote:
On Mon, Jan 26, 2015 at 12:22:41PM +0100, Erik Jan de Wit wrote:
>
> On 26/01/2015 11:43, Douglas Campos wrote:
> > This migrator tool can be run with plain `java -jar` and deals with all
> > the migrations needed up to `VERSION`, which means we would need only
> > one migrator tool for both 1.0.x and HEAD.
> >
> > Thoughts? Comments?
> great idea, but why not use the maven plugin to execute the liquibase
> migration?
There are several reasons, but the most important is to avoid asking our
users which just deploy a war file into their appserver to clone the
project, wait for maven to download the internet, then finally see the
migration happening.

That is true, not every user of UPS may have maven on his box!
 

Also, the maven plugin has less features than the liquibase cli tools.

--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

Sebastien Blanc
In reply to this post by qmx
Sounds good !
Let's also make sure we will be able to run this tool on the OS cartridge

Envoyé de mon iPhone

> Le 26 janv. 2015 à 11:43, Douglas Campos <[hidden email]> a écrit :
>
> Howdy!
>
> I've been envisioning a plan for UPS migrations, and would like to get
> some feedback from the community, so here it is:
>
> When there are model changes, it's kinda annoying to generate the sql
> migration files. This is one of the reasons Erik Jan de Wit started
> working to add liquibase to the project, allowing for seamless
> migrations.
>
> I'd like to build upon Erik's initial work and prepare a `ups-migrator`
> distribution:
>
> ups-migrator-VERSION.zip
> `--ups-migrator.jar
> `--ups-migrator-postgresql.properties
> `--ups-migrator-mysql.properties
> `--lib
>   `-- <jdbc drivers>
>     `-- <liquibase & deps>
>
> This migrator tool can be run with plain `java -jar` and deals with all
> the migrations needed up to `VERSION`, which means we would need only
> one migrator tool for both 1.0.x and HEAD.
>
> Thoughts? Comments?
>
> --
> qmx
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

Matthias Wessendorf


On Mon, Jan 26, 2015 at 12:39 PM, Sébastien Blanc <[hidden email]> wrote:
Sounds good !
Let's also make sure we will be able to run this tool on the OS cartridge

yeah, I think best is reaching out to Farah on that. Let me create a sub-ticket for Openshift hook
 

Envoyé de mon iPhone

> Le 26 janv. 2015 à 11:43, Douglas Campos <[hidden email]> a écrit :
>
> Howdy!
>
> I've been envisioning a plan for UPS migrations, and would like to get
> some feedback from the community, so here it is:
>
> When there are model changes, it's kinda annoying to generate the sql
> migration files. This is one of the reasons Erik Jan de Wit started
> working to add liquibase to the project, allowing for seamless
> migrations.
>
> I'd like to build upon Erik's initial work and prepare a `ups-migrator`
> distribution:
>
> ups-migrator-VERSION.zip
> `--ups-migrator.jar
> `--ups-migrator-postgresql.properties
> `--ups-migrator-mysql.properties
> `--lib
>   `-- <jdbc drivers>
>     `-- <liquibase & deps>
>
> This migrator tool can be run with plain `java -jar` and deals with all
> the migrations needed up to `VERSION`, which means we would need only
> one migrator tool for both 1.0.x and HEAD.
>
> Thoughts? Comments?
>
> --
> qmx
> _______________________________________________
> aerogear-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/aerogear-dev

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
qmx
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

qmx
Administrator
On Mon, Jan 26, 2015 at 01:48:29PM +0100, Matthias Wessendorf wrote:
> On Mon, Jan 26, 2015 at 12:39 PM, Sébastien Blanc <[hidden email]>
> wrote:
>
> > Sounds good !
> > Let's also make sure we will be able to run this tool on the OS cartridge
> >
>
> yeah, I think best is reaching out to Farah on that. Let me create a
> sub-ticket for Openshift hook
Liquibase migrations are idempotent, so you can safely always run the
migrator during deploy for openshift - it'll be a noop in the worst case
;)


--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] [RFC] UPS DB Migration Strategy

Daniel Passos-2
Very nice idea!

-- Passos

On Mon, Jan 26, 2015 at 2:14 PM, Douglas Campos <[hidden email]> wrote:
On Mon, Jan 26, 2015 at 01:48:29PM +0100, Matthias Wessendorf wrote:
> On Mon, Jan 26, 2015 at 12:39 PM, Sébastien Blanc <[hidden email]>
> wrote:
>
> > Sounds good !
> > Let's also make sure we will be able to run this tool on the OS cartridge
> >
>
> yeah, I think best is reaching out to Farah on that. Let me create a
> sub-ticket for Openshift hook
Liquibase migrations are idempotent, so you can safely always run the
migrator during deploy for openshift - it'll be a noop in the worst case
;)


--
qmx
_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev