Bug report ยท Feature request ยท Read Docs
I'm a GIS beginner, please let me know if you see anything problematic in the way this library is implemented. The library is also missing support for very many functions, and test coverage exists but is not complete.
pnpm add drizzle-postgis
NOTE Unfortunately drizzle-kit has a bug that causes custom types to be quoted. In order to use this with migrations, you need to apply a patch. This is the only solution until this issue is fixed! https://github.com/drizzle-team/drizzle-kit-mirror/issues/350
Due to a known issue with drizzle-kit
, you may need to apply a patch to ensure compatibility with drizzle-postgis
. Follow the steps below to patch the dependency:
The patch file is located in repository under the patches
directory: patches/[email protected]
You can copy the patch file content directly from the repository to you're local patches directory.
If you're using pnpm, you can apply the patch by adding the following lines to your package.json
file under the pnpm
section:
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
This configuration tells pnpm to apply the specified patch to the [email protected]
dependency.
Note that patches/[email protected]
is the path to the patch file
After updating your package.json
, run pnpm install
to install the patched dependency.
If you prefer not to modify your package.json
, you can manually apply the patch using the patch
command:
- Save the patch file content to a local file, e.g.,
drizzle-kit.patch
. - Navigate to the directory where
drizzle-kit
is installed (usuallynode_modules/drizzle-kit
). - Run the following command:
patch -p1 < /path/to/drizzle-kit.patch
This will apply the patch to the drizzle-kit
dependency.
If you're having trouble with Postgres complaining that the functions can't be found, try using config.setPostGISSchema("<schema>")
There's more information about how to use these functions here: https://postgis.net/docs/reference.html
The project is configured to auto-generate the documentation using typedoc. The documentation is generated in the docs
folder.
The documentation will get generated when the code is pushed to the main
branch. You can also generate the documentation locally by running the command pnpm run build:docs
.
Please make sure to follow the conventional commit messages format while making changes. This helps in generating changelogs and versioning the package.
- ๐ง @akashrajpurohit/ts-npm-template - an opinionated bootstrap template to create NPM packages.
- โจ๏ธ Typescript with tsup build tool.
- โก๏ธ Vitest - Unit Test Framework
- ๐ Semantic Release - Fully automated version management and package publishing.
- ๐ Typedoc - Generate documentation of your package.
- ๐ Github Actions - CI pipelines
- ๐ฆ PNPM - Package manager