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

error: relation "snapshots" does not exist #21

Open
git-manuel opened this issue Jun 6, 2024 · 1 comment
Open

error: relation "snapshots" does not exist #21

git-manuel opened this issue Jun 6, 2024 · 1 comment

Comments

@git-manuel
Copy link

git-manuel commented Jun 6, 2024

Hi,

I keep getting this error even after creating all the tables snapshots and ops from the script provided.

CREATE TABLE IF NOT EXISTS ops (
  collection character varying(255) not null,
  doc_id character varying(255) not null,
  version integer not null,
  operation jsonb not null, -- {v:0, create:{...}} or {v:n, op:[...]}
  PRIMARY KEY (collection, doc_id, version)
);

CREATE TABLE IF NOT EXISTS snapshots (
  collection character varying(255) not null,
  doc_id character varying(255) not null,
  doc_type character varying(255) not null,
  version integer not null,
  data jsonb not null,
  PRIMARY KEY (collection, doc_id)
);
error: relation "snapshots" does not exist
    at Parser.parseErrorMessage (/Users/../workspace/colaboration-demos/sharedb/examples/rich-text-presence/node_modules/pg-protocol/dist/parser.js:283:98)
    at Parser.handlePacket (/Users/../workspace/colaboration-demos/sharedb/examples/rich-text-presence/node_modules/pg-protocol/dist/parser.js:122:29)
    at Parser.parse (/Users/../workspace/colaboration-demos/sharedb/examples/rich-text-presence/node_modules/pg-protocol/dist/parser.js:35:38)
    at Socket.<anonymous> (/Users/../workspace/colaboration-demos/sharedb/examples/rich-text-presence/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:520:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:191:23)
@git-manuel
Copy link
Author

git-manuel commented Jun 7, 2024

It seems sharedDB-postgres can't access no-public schema. I tried creating a table in a public scheme and it worked. I wonder what

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

No branches or pull requests

1 participant