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

Fixed the current schema/current user confusion in OracleSchema #1558

merged 2 commits into from Mar 20, 2017


Copy link

@voidunit voidunit commented Mar 18, 2017

This pull request is to address some of the flaws mentioned in Issue #1550 related to the confusion between current_schema and user functions in Oracle database.

Main points:

  1. Current schema name can be determined with SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA') function.
  2. Current execution context user name can be determined with USER function.
  3. Modifying objects in shemas other than the user's own schema may require extra privileges or be impossible. Flyway checks if the current user and the affected schema coincide while executing Clean command.
  4. User/schema names are case-sensitive and must be compared with equals() method. Flyway uses quoted schema names to work correctly.

This PR supersedes PR #1552 (closed due to a wrong branch selection).

@axelfontaine axelfontaine added this to the Flyway 4.2.0 milestone Mar 20, 2017
@axelfontaine axelfontaine merged commit b39d3fc into flyway:master Mar 20, 2017
axelfontaine added a commit to flyway/ that referenced this pull request Mar 20, 2017
Copy link

@axelfontaine axelfontaine commented Mar 20, 2017

Merged. Thanks for the excellent PR!

dohrayme pushed a commit to dohrayme/flyway that referenced this pull request Feb 3, 2020

Fixed the current schema/current user confusion in OracleSchema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants