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

Define schema for javers related tables #398

Closed
ianagius opened this issue Jul 5, 2016 · 14 comments
Closed

Define schema for javers related tables #398

ianagius opened this issue Jul 5, 2016 · 14 comments
Labels

Comments

@ianagius
Copy link
Contributor

@ianagius ianagius commented Jul 5, 2016

At the moment, JaVers is creating tables in the public schema. It would be great to be able to define the schema where these tables are created,

@bartoszwalacik
Copy link
Member

@bartoszwalacik bartoszwalacik commented Jul 5, 2016

Agreed but schema support have to be implemented in polyJdbc first

@ouaibsky
Copy link

@ouaibsky ouaibsky commented Sep 6, 2016

It could be nice to provide some configuration as well in order to tune table name.
I'm working for a big company, where DBA's rules are strict and we must follow some guidelines on naming (mainly table)

Christophe

@ianagius
Copy link
Contributor Author

@ianagius ianagius commented Sep 6, 2016

has there been any progress on this case? We just need to expose a setter method for private String schema property in SchemaInspectorImpl.

@bartoszwalacik
Copy link
Member

@bartoszwalacik bartoszwalacik commented Sep 6, 2016

no progress yet. Dont think that someone from core team will take this issue soon. If you need this feature - contribute

ianagius added a commit to ianagius/javers that referenced this issue Sep 16, 2016
… to create and use tables in a defined Schema.

As part of the change, the static table and sequence names in the FixedSchemaFactory class have been made private and access to them is made available through static getters (which check if a schema was defined).

The JaversSchemaManager has been modified to check for the javers tables if a schema has been defined.  If no schema has been defined, this resposibility to handed over to PolyJDBC.
@ianagius
Copy link
Contributor Author

@ianagius ianagius commented Sep 16, 2016

We have decided to contribute :) and we have created a pull request for you to consider. Let us know if you have any questions or you would like further clarifications.

@bartoszwalacik
Copy link
Member

@bartoszwalacik bartoszwalacik commented Sep 16, 2016

I can't accept this, see #433 (review)
It will be easier to work on this issue, if you follow my guidelines. As I wrote in the second comment in this issue: schema support has to be implemented in polyJdbc first.

@LucasDesenv
Copy link

@LucasDesenv LucasDesenv commented Sep 20, 2016

This is a good one... It's not quite nice to use public schema for auditing.. kinda security failure, no? Or I didn't get it?

@bartoszwalacik
Copy link
Member

@bartoszwalacik bartoszwalacik commented Sep 20, 2016

security failure? I'm affraid that you are missing that JaVers doesn't write to public schema. It writes to a default schema, for most databases it means schema of a current db user

@LucasDesenv
Copy link

@LucasDesenv LucasDesenv commented Sep 20, 2016

Oh, now I get it! Thanks for explaining.

ianagius added a commit to ianagius/javers that referenced this issue Sep 22, 2016
* '398' of https://github.com/ianagius/javers:
  javers#398 added withSchema() to SqlRepositoryBuilder to enable users to create and use tables in a defined Schema.
@bartoszwalacik
Copy link
Member

@bartoszwalacik bartoszwalacik commented Oct 12, 2016

done & released in 2.4.0

@pedroxs
Copy link

@pedroxs pedroxs commented Oct 27, 2017

How to configure the schema? I could not find anywhere on the docs page

@pedroxs
Copy link

@pedroxs pedroxs commented Nov 8, 2017

Perfect, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants