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

Added naming to migration bundles #1430

Merged
merged 4 commits into from Jan 28, 2016

Conversation

Projects
None yet
2 participants
@souravmitra
Contributor

souravmitra commented Jan 26, 2016

In similar lines to HibernateBundles, having the possibility of unique names. This PR attempts to do the same for MigrationBundles, so that multiple migration bundles can be provided for.

bootstrap.addCommand(new DbCommand<>(name(), this, klass));
}

protected String name() {

This comment has been minimized.

@jplock

jplock Jan 26, 2016

Member

can you make this public?

This comment has been minimized.

@souravmitra

souravmitra Jan 26, 2016

Contributor

@jplock : Thanks for the comments. Do you see usage of name() outside subclasses of MigrationBundle?

This comment has been minimized.

@jplock

This comment has been minimized.

@souravmitra

souravmitra Jan 26, 2016

Contributor

Made the change. Thanks

@@ -7,11 +7,17 @@
import io.dropwizard.setup.Environment;

public abstract class MigrationsBundle<T extends Configuration> implements Bundle, DatabaseConfiguration<T> {
public static final String DEFAULT_NAME = "db";

This comment has been minimized.

@jplock

jplock Jan 26, 2016

Member

can you make this private?

This comment has been minimized.

@souravmitra

souravmitra Jan 26, 2016

Contributor

Done

@jplock

This comment has been minimized.

Member

jplock commented Jan 26, 2016

I think this is a good improvement. Thanks for the contribution! Just left some minor comments.

@jplock jplock added the improvement label Jan 26, 2016

@jplock jplock added this to the 1.0.0 milestone Jan 26, 2016

@jplock

This comment has been minimized.

Member

jplock commented Jan 26, 2016

Sorry, one more minor change, would you mind updating https://github.com/dropwizard/dropwizard/blob/master/docs/source/about/release-notes.rst with a note about this new functionality and reference to this PR?

@souravmitra

This comment has been minimized.

Contributor

souravmitra commented Jan 26, 2016

@jplock Added to the release notes. Thanks.

@jplock

This comment has been minimized.

Member

jplock commented Jan 28, 2016

Looks great, thanks for contributing!

jplock added a commit that referenced this pull request Jan 28, 2016

Merge pull request #1430 from souravmitra/dropwizrd_custom_migrationb…
…undlecommandname

Added naming to migration bundles

@jplock jplock merged commit 79cb3d6 into dropwizard:master Jan 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment