go-gorm / postgres

GORM PostgreSQL driver
MIT License
225 stars 119 forks source link

DropIndex and RenameIndex don't prefix index name with TablePrefix #235

Closed GordonFremen closed 8 months ago

GordonFremen commented 8 months ago

GORM Playground Link

https://github.com/go-gorm/playground/pull/675

Description

Note: This is a duplicate of #226 but that does not contain a Playground link.

When using NamingStrategy.TablePrefix to specify a custom schema, said prefix should be taken into account when calling (Migrator).DropIndex and (Migrator).RenameIndex.

I already have a proposed fix ready for this, so it'd be great if you could assign this to me.