Closed Tijs-2 closed 1 week ago
Hi Rob,
I was looking into migrations and multiple databases was wondering how this works:
If I create tables like this:
@Entity public class TableA{ String column; } @Entity @DbName("Database2") public class TableB{ String column; }
Then I want to create the database migrations like this:
DbMigration dbMigration = DbMigration.create(); dbMigration.addPlatform(Platform.POSTGRES); dbMigration.addPlatform(Platform.MYSQL); dbMigration.generateMigration();
But I have no clue how to generate the migrations for the second database.
Kind regards, Tijs
hi @Tijs-2. seems you can simply call dbMigration.setServer(<your Database instance>)
dbMigration.setServer(<your Database instance>)
I solved it indeed, lets close this ticket :)
Hi Rob,
I was looking into migrations and multiple databases was wondering how this works:
If I create tables like this:
Then I want to create the database migrations like this:
But I have no clue how to generate the migrations for the second database.
Kind regards, Tijs