-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flyway-error: Could ninja get an Flyway-upgrade so that postgresql 12 gets supported? #684
Comments
You can easily replace flyway with a different version:
public class FlywayMigration implements MigrationEngine
{
private final NinjaProperties ninjaProperties;
@Inject
public FlywayMigration(NinjaProperties ninjaProperties)
{
this.ninjaProperties = ninjaProperties;
}
@Override
public void migrate()
{
String connectionUrl = this.ninjaProperties.getOrDie("db.connection.url");
String connectionUsername = this.ninjaProperties.getOrDie("db.connection.username");
String connectionPassword = this.ninjaProperties.getOrDie("db.connection.password");
Properties properties = new Properties();
Flyway flyway = Flyway.configure()
.configuration(properties)
.dataSource(connectionUrl, connectionUsername, connectionPassword)
.load();
if (this.ninjaProperties.getBooleanWithDefault("ninja.migration.drop", this.ninjaProperties.isTest()))
{
flyway.clean();
}
if (!ninjaProperties.isTest())
{
// Test starts with a clean DB anyways
flyway.baseline();
}
try
{
flyway.migrate();
}
catch (FlywaySqlScriptException e)
{
e.printStackTrace();
throw e;
}
}
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
i am currently migrating my ninja-project to run with:
Ubuntu Server 20.04 LTS
Postgres (PostgreSQL) 12.2 (Ubuntu 12.2-4)
ninja framework 6.6.1
but I am getting an error,
please refer to:
The flyway-documentation says, that the current version supports posgtresql version 12:
https://flywaydb.org/documentation/database/postgresql
Question:
Thanks in advance and best regards :-)
The text was updated successfully, but these errors were encountered: