Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Feature Request: include syntax in Snaplet config #148

Answered by peterp
pwingo asked this question in Issues
Discussion options

You must be logged in to vote

We spoke on Discord, but I wanted to close the loop here. We're working on a feature that we're calling "partial restores." It'll allow you to only restore data, and related data, for certain tables.

But, more to this configuration. It's currently possible to do this programmatically because the transform export can also be a function which receives your current databases structure.

// .snaplet/transform.ts
export const transform = (database) => {
  console.log(database)  
  // ꜜꜜꜜ
  //  {
  //   structure: {
  //     '$schemas': [ 'public', 'pgboss' ],
  //     public: {
  //       '$tables': [Array],
  //       Organization: [Object],
  //       User: [Object]
  //     },
  //     pgbos…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by peterp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Issues
Labels
None yet
2 participants