Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

next: schema create handler #752

Merged
merged 8 commits into from
Nov 5, 2018

Conversation

carmenlau
Copy link
Contributor

@carmenlau carmenlau commented Nov 1, 2018

connect #731

Commit 5047e06 is fixing problem that occur after adding transaction to schema create handler, we didn't have this problem in v1 as we didn't have transaction in schema create handler.
The problem happens if we make query before the previous query cursor close, updated GetRecordSchemas to avoid this.
related issue: lib/pq#635

@carmenlau carmenlau changed the title WIP: next: schema create handler next: schema create handler Nov 1, 2018
@rickmak
Copy link
Member

rickmak commented Nov 2, 2018

I got pq: function public.notify_record_change() does not exist error when I try it with curl. Any idea?

@Steven-Chan
Copy link
Contributor

I got pq: function public.notify_record_change() does not exist error when I try it with curl. Any idea?

I have no problem wo 🤔

@Steven-Chan
Copy link
Contributor

@carmenlau I can repeat the error la.

Probably we tested the api with a postgres database which has been used for another skygear v1 app. The function mentioned in the error message is public.notify_record_change() which does not belong to any schema/app.

…ous query cursor is not yet closed.

Problem only happen when the queries are run in the same transaction, we don’t have db transaction in v1
schema create handler. So only apply this fix to next.
Related issue: lib/pq#635
This is for record subscription in v1 which is no longer support in next
@carmenlau
Copy link
Contributor Author

Removed the trigger creation when creating schema. Thanks! @rickmak @Steven-Chan

@Steven-Chan Steven-Chan merged commit 3f6bba8 into SkygearIO:next Nov 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants