Description
GORM Playground Link
Description
Trying to create a Postgres index concurrently. Followed the directions from the docs https://gorm.io/docs/indexes.html by adding ,options:CONCURRENTLY
. This resulted in an error creating the table.
#288 causes CONCURRENTLY
to be appended to the end of the create index command. This is clearly invalid. That change did not test the case for CONCURRENTLY
and thus didn't find that it is now broken.
So I reproduced it the playground to only run Postgres. I added an index to one of the fields in the model. As you can see from the results the same error was received.
2024/12/09 15:39:33 /home/runner/go/pkg/mod/gorm.io/driver/[email protected]/migrator.go:153 ERROR: syntax error at or near "CONCURRENTLY" (SQLSTATE 42601)
[0.342ms] [rows:0] CREATE INDEX CONCURRENTLY IF NOT EXISTS "owner_id" ON "toys" USING btree("owner_id") CONCURRENTLY
2024/12/09 15:39:33 Failed to auto migrate, but got error ERROR: syntax error at or near "CONCURRENTLY" (SQLSTATE 42601)