-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
fix(postgres): drop views with no metadata #11887
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
base: master
Are you sure you want to change the base?
Conversation
5aa178e to
d9ccf77
Compare
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to d5ca61a
Previous suggestionsSuggestions up to commit ef7aa92
Suggestions up to commit 769eed4
Suggestions up to commit 35ae94d
Suggestions up to commit 009295d
Suggestions up to commit 0709342
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
commit: |
8a1df18 to
404e9fa
Compare
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Nosfistis for your help.
Few tests are failing can you verify them please?
c4a6934 to
eb7c47c
Compare
|
Apologies @gioboa as I had troubles running the tests locally. It should pass now. |
eb7c47c to
0709342
Compare
Use the schema name as well when dropping a view, where the view is passed as a View object. Fixes typeorm#11209
0709342 to
009295d
Compare
|
@gioboa I do not know why the test fails. I cannot run the CI docker container locally, as it is private. Running the tests in a postgres docker image with vector & postgis installed they pass. Could we run the tests with query logs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw tests are running on your personal repo too, e.g. here
you can add few logs to debug the tests.
|
I found out what causes the crash. While trying to emulate the behaviour of typeorm's metadata table, I set the loaded view expression to the definition stored in It might be that storing metadata in the |
Drop views that were created with no metadata Fixes typeorm#11209
769eed4 to
ef7aa92
Compare
|
@gioboa The issue is fixed, however CI seems not to be working. |
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to trigger it manually 😅
Description of change
Fix a postgres issue with
.dropView(myView)that failed when the view to be dropped is not the default one.Fix a postgres issue with
.dropView(myView)when used on a view created with.createView(myView), or.createedView(myView, false), i.e. created with no metadata set intypeorm_metadata.Closes #11209
Pull-Request Checklist
masterbranchFixes #00000tests/**.test.ts)docs/docs/**.md)