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

Schema apply broken on foreign constraint after upgrade to RC98 #8874

Closed
3 tasks done
keesvanbemmel opened this issue Oct 17, 2021 · 2 comments
Closed
3 tasks done

Schema apply broken on foreign constraint after upgrade to RC98 #8874

keesvanbemmel opened this issue Oct 17, 2021 · 2 comments
Labels

Comments

@keesvanbemmel
Copy link
Contributor

keesvanbemmel commented Oct 17, 2021

Preflight Checklist

Describe the Bug

After upgrading to RC98 (no other changes) the schema snapshot application results in an error. This was not the case with RC97, same schema.

10:11:18 🚨 error alter table "external_supplier_infos" drop constraint "external_supplier_infos_orderline_foreign" - relation "external_supplier_infos" does not exist 
error: alter table "external_supplier_infos" drop constraint "external_supplier_infos_orderline_foreign" - relation "external_supplier_infos" does not exist
at Parser.parseErrorMessage (/src/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/src/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/src/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket.<anonymous> (/src/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:265:9)
at Socket.Readable.push (internal/streams/readable.js:204:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

To Reproduce

  1. Clean installation of RC97 on Postgres
  2. Apply schema (attached)
  3. Upgrade to RC98
  4. Apply same schema.

Expected output is: No changes to apply.
Output is:

10:11:18 🚨 error alter table "external_supplier_infos" drop constraint "external_supplier_infos_orderline_foreign" - relation "external_supplier_infos" does not exist 
error: alter table "external_supplier_infos" drop constraint "external_supplier_infos_orderline_foreign" - relation "external_supplier_infos" does not exist
at Parser.parseErrorMessage (/src/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/src/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/src/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket.<anonymous> (/src/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:265:9)
at Socket.Readable.push (internal/streams/readable.js:204:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

Errors Shown

No response

What version of Directus are you using?

RC98

What version of Node.js are you using?

14 LTS

What database are you using?

Postgres 13

What browser are you using?

Chrome but not applicable

What operating system are you using?

MacOS
shema.yaml.txt

How are you deploying Directus?

Docker

@keesvanbemmel keesvanbemmel changed the title Upgrade to RC98 breaks apply schema Schema apply broken on foreign constraint Oct 17, 2021
@keesvanbemmel keesvanbemmel changed the title Schema apply broken on foreign constraint Schema apply broken on foreign constraint after upgrade to RC98 Oct 17, 2021
@azrikahar
Copy link
Contributor

Note to others looking into this: I haven't personally tried the reproduction, but I believe this is most probably related to this: #8854 (comment)

@rijkvanzanten
Copy link
Member

I was able to apply the provided snapshot without issues in the latest version (9.1.2). Closing this as I believe it was resolved 👍🏻

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants