You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
GORM Playground Link
go-gorm/playground#778
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 forCONCURRENTLY
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)
The text was updated successfully, but these errors were encountered: