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

chore: explicitly set "mode" opt for encryptionKeys column creation #186

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

achou11
Copy link
Member

@achou11 achou11 commented Aug 16, 2023

Drizzle's type inference/checking when using the table in queries is practically non-existent without specifying this (even though it defaults to this under the hood). Probably better to specify anyways.

Probably wasn't necessary to regenerate the drizzle files but did so anyways 🤷

@achou11 achou11 requested a review from gmaclennan August 16, 2023 18:02
@achou11
Copy link
Member Author

achou11 commented Aug 16, 2023

looks like the issue lies here:

https://github.com/drizzle-team/drizzle-orm/blob/515afb05df6b0ecc69dacf0e73239828dd727772/drizzle-orm/src/sqlite-core/columns/blob.ts#L138-L140

The TS type fallback is the JSON builder type, which doesn't match the actual implementation (where the fallback is the Buffer builder type)

@achou11 achou11 force-pushed the ac/encryption-keys-blob-mode branch from 1a0248c to 55f610f Compare August 17, 2023 12:15
@achou11
Copy link
Member Author

achou11 commented Aug 17, 2023

Reported bug in Drizzle: drizzle-team/drizzle-orm#1064

@achou11 achou11 merged commit 9b4f405 into main Aug 17, 2023
@achou11 achou11 deleted the ac/encryption-keys-blob-mode branch August 17, 2023 12:30
gmaclennan added a commit that referenced this pull request Sep 6, 2023
* main: (25 commits)
  add initial implementation of MemberApi (#232)
  feat: $blobs.getUrl and $blobs.create methods (#184)
  chore: update manager e2e tests (#237)
  feat: add capabilities (#231)
  feat: coreOwnership integration [3/3] (#230)
  feat: CoreOwnership class w getOwner & getCoreKey [2/3] (#229)
  feat: handle `coreOwnership` records in `IndexWriter` [1/3] (#214)
  fix: adjust storage options for MapeoManager and MapeoProject (#235)
  implement addProject method for MapeoManager class (#215)
  implement listProjects method for MapeoManager class (#208)
  feat: expose blobStore.writerDriveId (#219)
  implement wrapper client containing createProject and getProject methods (#199)
  add project settings functionality to MapeoProject (#187)
  feat: Add encode/decode for project keys [3/3] (#203)
  feat: update protobuf for RPC [2/3] (#202)
  chore: move protobuf messages into src/generated [1/3] (#201)
  feat: Add internal `dataType.createWithDocId()` (#192)
  chore: explicitly set "mode" opt for encryptionKeys column creation (#186)
  chore: fix linting and type checking (#183)
  chore: consolidate encryption key columns in projectKeys table (#181)
  ...
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

Successfully merging this pull request may close these issues.

2 participants