Open tallowen opened 10 months ago
It looks like I can't use prisma studio to create the first row in a database since it's trying to query for existing rows but doesn't find any.
Start Database: Create a new database: docker run -d --name my_postgis_container -e POSTGRES_USER=$DBUSER -e POSTGRES_PASSWORD=$DBPASSWORD -p 5432:5432 postgis/postgis:15-3.4
docker run -d --name my_postgis_container -e POSTGRES_USER=$DBUSER -e POSTGRES_PASSWORD=$DBPASSWORD -p 5432:5432 postgis/postgis:15-3.4
Use this schema:
generator client { provider = "prisma-client-js" previewFeatures = ["postgresqlExtensions"] } datasource db { provider = "postgresql" url = env("DATABASE_URL") extensions = [postgis] } model Gauge { name String gaugeProvider GaugeProvider gaugeIdentifier String location Unsupported("geography(Point, 4326)") @@unique([gaugeProvider, gaugeIdentifier]) } /// This table contains check constraints and requires additional setup for migrations. Visit https://pris.ly/d/check-constraints for more info. model spatial_ref_sys { srid Int @id auth_name String? @db.VarChar(256) auth_srid Int? srtext String? @db.VarChar(2048) proj4text String? @db.VarChar(2048) } enum GaugeProvider { USGS CDEC }
When I open prisma studio and add the first row, that data saves. Instead I get an error.
None in console where I ran npx prisma studio
npx prisma studio
I use Prisma Studio for that use case, to create initial data, all the time. Are you sure this was the reason for this error? Can you scroll further down in the "Show Detail" view so we can see the actual error?
Bug description
It looks like I can't use prisma studio to create the first row in a database since it's trying to query for existing rows but doesn't find any.
How to reproduce
Start Database: Create a new database:
docker run -d --name my_postgis_container -e POSTGRES_USER=$DBUSER -e POSTGRES_PASSWORD=$DBPASSWORD -p 5432:5432 postgis/postgis:15-3.4
Use this schema:
Expected behavior
When I open prisma studio and add the first row, that data saves. Instead I get an error.
Prisma information
Environment & setup
Screenshot of page where the problem happened (if applicable)
Prisma logs
None in console where I ran
npx prisma studio