<p>You will add flyway migration as it is, nothing special and than this migration will be applied before the application is opened for service.</p>
<p>There is no specific difference between versions as far as flyway migrations concerns.</p>
<p>If they are master slave than migration can be applied on master instances only.</p>

CC BY-SA 4.0
2021-10-04T07:07:32.660Z
But you won't add users or whole new databases by flyway right?
Chris Pillen
CC BY-SA 4.0
2021-10-04T10:32:17.160Z
we can add users, whole new database via flyway migration it all depends that do we have later available as migration. For large db we can write another job to copy from somewhere and push them in initdb script of docker etc
Siddique Ahmad
CC BY-SA 4.0
2021-10-05T21:17:38.103Z
Well, the latter is what interessts me. How is that done correctly?
Chris Pillen
CC BY-SA 4.0
2021-10-04T03:32:59.183Z
2021-10-04T03:32:59.183Z
Siddique Ahmad
<p>we have multiple clusters - like 6 - and of course, as a dev makes changes to an application and it is deployed it will migrate the table data and so on by flyway/liquibase.</p>
<p>But what if there is the need for a new user?</p>
<p>Where does the dev &quot;show up&quot; to define the user needed for a specific task in the database?</p>
<p>Or say we need a new wholedatabase or so.</p>
<p>And will this migration work. Let's say we have a single microservice which did not need the user <code>User</code> in version 1.7.0. But now, in 1.8.0 it will need the user. So before we deploy 1.8.0 on a certain cluster, we will want to add the user.</p>
<p>How is it done in an Continuous Deployment environemtn?</p>

<build-pipeline><continuous-delivery><microservices>
Best practice to update (migrate) e.g. users on database server on several clusters
Chris Pillen
# Best practice to update (migrate) e.g. users on database server on several clusters

(Asked by: username_0 on 2021-10-03)

we have multiple clusters - like 6 - and of course, as a dev makes changes to an application and it is deployed it will migrate the table data and so on by flyway/liquibase.

But what if there is the need for a new user?

Where does the dev "show up" to define the user needed for a specific task in the database?

Or say we need a new wholedatabase or so.

And will this migration work. Let's say we have a single microservice which did not need the user `User` in version 1.7.0. But now, in 1.8.0 it will need the user. So before we deploy 1.8.0 on a certain cluster, we will want to add the user.

How is it done in an Continuous Deployment environemtn?

**Tags:** build-pipeline, continuous-delivery, microservices


---

## 1 answers

### Answer by username_1 on 2021-10-04. Score: 0

You will add flyway migration as it is, nothing special and than this migration will be applied before the application is opened for service.

There is no specific difference between versions as far as flyway migrations concerns.

If they are master slave than migration can be applied on master instances only.

> **Comments:**
> **username_0**: But you won't add users or whole new databases by flyway right?  
> **username_1**: we can add users, whole new database via flyway migration it all depends that do we have later available as migration. For large db we can write another job to copy from somewhere and push them in initdb script of docker etc  
> **username_0**: Well, the latter is what interessts me. How is that done correctly?  

---

