Skip to content
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

Add support for DDL files in KPM #3

Closed
pierre opened this issue Mar 14, 2015 · 5 comments
Closed

Add support for DDL files in KPM #3

pierre opened this issue Mar 14, 2015 · 5 comments
Assignees
Milestone

Comments

@pierre
Copy link
Member

pierre commented Mar 14, 2015

It would be nice if KPM could install the DDL files too. We probably need to add a flag, so upgrades don't clobber existing tables.

@sbrossie
Copy link
Member

Yeah it would be nice ;-)

@pierre
Copy link
Member Author

pierre commented Mar 23, 2016

Some thoughts:

  • Because Ruby plugins already rely on ActiveRecord (see here for example), we should use Rails migrations for these
  • We don't have a migration solution today for Java code (Kill Bill or Java plugins). We could investigate https://flywaydb.org/, and if it's a fit, use it for both

KPM could then have a new verb to detect outdated DB schemata (and maybe run it by default post installation too) and output the SQL to run the migration(s) (ALTER statements and updates to migration versioning tables). This would be more useful in practice than simply having kpm run all migrations because:

  1. In production, only DBAs with special access can effectively change tables structure
  2. We don't want to force the DBA to use special tools (maven, ruby, ...) to apply the changes

@sbrossie
Copy link
Member

I agree with the thoughts:

  1. I think we want to provide the best tooling so the manual install/update becomes easy
  2. We don't want any automatic magic

@pierre pierre self-assigned this Mar 23, 2016
pierre added a commit to killbill/killbill-plugin-framework-ruby that referenced this issue Mar 24, 2016
This relates to killbill/killbill-cloud#3.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
@pierre
Copy link
Member Author

pierre commented Mar 28, 2016

Proposal: 18f069e.

@pierre
Copy link
Member Author

pierre commented Mar 28, 2016

@bgandon, @beccagaspard: we've published a proposal on how database migrations would work with Kill Bill and its plugins: https://github.com/killbill/killbill-docs/blob/v3/userguide/tutorials/database_migrations.adoc.

Since you both expressed interest in such tooling, feel free to let us know if you have any feedback and/or if this would work in your organizations. Thanks!

@pierre pierre closed this as completed Nov 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants