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

Unable to detect changes not default schema #176

Open
jitsuishi opened this issue Sep 20, 2021 · 1 comment
Open

Unable to detect changes not default schema #176

jitsuishi opened this issue Sep 20, 2021 · 1 comment

Comments

@jitsuishi
Copy link

jitsuishi commented Sep 20, 2021

I am using Oracle DB for testing.
Also, the application user and the schema management user are different.

Watching at changes.changesList in the code below, it's null.

OracleDataSource ods = new OracleDataSource();
ods.setURL(...);
ods.setUser(...);
ods.setPassword(...);

Changes changes = new Changes(ods);
changes.setStartPointNow();

makeChangesInTheData();

changes.setEndPointNow();

Changes targets the default schema for change detection, can it target another schema?

@VanRoy
Copy link
Member

VanRoy commented Sep 25, 2021

Hi @jitsuishi Indeed assertj-db know have currently the capability to select schema and the Oracle JDBC driver either.
I think you can use Hikari as workaround.

You can try this :

HikariDataSource hikariDs = new HikariDataSource(); hikariDs.setDataSource(ods); hikariDs.setConnectionInitSql("ALTER SESSION SET CURRENT_SCHEMA = SOME_SCHEMA");

Julien.

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