js-ceramic icon indicating copy to clipboard operation
js-ceramic copied to clipboard

feat(core): add postgres schema support to indexer

Open skylar745 opened this issue 3 years ago • 2 comments

Description

When using CERAMIC_ENABLE_EXPERIMENTAL_COMPOSE_DB='true' it is possible to specify a postgres database uri instead of the default leveldb. When using this configuration, attempting to pass a different schema result has no effect. This PR add support for postgres schema being specified in configuration for the indexer.

How Has This Been Tested?

  • Set the ceramic configuration for indexer to postgres URI with schema postgres://postgres:password@localhost:5432/ceramic?schema=composedb
  • Load a composeDB setup. You will notice the datas are registered in the public schema instead of the one specified
  • Test with the current PR properly write datas under the specified schema

PR checklist

Before submitting this PR, please make sure:

  • [ ] I have tagged the relevant reviewers and interested parties Please advise
  • [ ] I have updated the READMEs of affected packages No updates needed
  • [ ] I have made corresponding changes to the documentation No updates needed

References:

knex postgres configuration exemple:

const pg = require('knex')({
  client: 'pg',
  connection: process.env.PG_CONNECTION_STRING,
  searchPath: ['knex', 'public'],
});

https://knexjs.org/guide/#configuration-options

skylar745 avatar Dec 18 '22 12:12 skylar745

Sorry @skylar745, I don't really understand what this PR is trying to do. Can you describe a bit more what problem you are seeing and how this PR changes the behavior of the system to help?

stbrody avatar Dec 19 '22 18:12 stbrody

Updated

skylar745 avatar Dec 29 '22 14:12 skylar745

js-cearmic is deprecated: https://blog.ceramic.network/the-future-of-ceramic-focusing-on-recall/

stbrody avatar May 21 '25 18:05 stbrody