I'm new to prisma and as I understood it's only possible to work with unsupported (i.e. postgis geometry) data using raw queries. But is it possible to use prisma seed with unsupported types? Maybe there's some option to use raw queries there as well? I need to add some test data with coordinates to the database when building the project.
Yes, you can use Prisma seed with unsupported data types.
You can execute a Bash script seed.sh
to seed your database through plain SQL, and you can write the seeding SQL Queries in the .sql
file.
Example:
#!/bin/sh
# -e Exit immediately when a command returns a non-zero status.
# -x Print commands before they are executed
set -ex
# Seeding command
psql file.sql
In this example, you can write the SQL Queries for seeding which contain unsupported data types in file.sql
file.