Skip to content

Allow for pglite extensions, sort migrations, and add default postgres user#40

Open
salim-runsafe wants to merge 6 commits into
JQuezada0:mainfrom
runsafesecurity:main
Open

Allow for pglite extensions, sort migrations, and add default postgres user#40
salim-runsafe wants to merge 6 commits into
JQuezada0:mainfrom
runsafesecurity:main

Conversation

@salim-runsafe

Copy link
Copy Markdown

Your fork is a promising substitute for prismock, thanks for all of your work on it.

We ran into a few small things worth expanding, which this MR does:

  1. Allows a user to specify a pgLiteExtensions anywhere they could already specify usePgLite and provide an array of extension names like ['citext', 'pg_trgm'] which will be imported from @electric-sql/pglite/contrib/<name>.
  2. Sort migrations in the same order that prisma will apply them (alphanumerically) before applying them to pglite. When there are migrations which depend on that ordering this change will keep them deterministic.
  3. Adds the default postgres user to make the default pglite DB look more like a default postgres DB.

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