Skip to content

Conversation

@data-envoy
Copy link
Contributor

@data-envoy data-envoy commented Apr 1, 2023

Change Summary

This change adds a schemaExists check. The check doesn't need CREATE ON DATABASE permissions. Whereas the CREATE SCHEMA IF NOT EXISTS ?? AUTHORIZATION ?? does.

So it avoids throwing an error in case where both:

  • The schema already exists
  • The user doesn't have CREATE ON DATABASE permission

Fixes issue: #5398

Change type

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

Test/ Verification

Running loaclly. Awaiting workflow

The schemaExists check doesn't need `CREATE ON DATABASE` permissions. 

So it avoids throwing an error in case where both: 
- The schema already exists
- The user doesn't have  `CREATE ON DATABASE` permission
Add semicolon;
@dstala dstala requested review from pranavxc and wingkwong April 3, 2023 16:52
@wingkwong wingkwong merged commit b222ab7 into nocodb:develop Apr 4, 2023
@data-envoy data-envoy deleted the fix/pg-data-source-wo-create-on-db-permission branch April 4, 2023 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants