Drop the legacy `X` suffix from `GetMasterX` and `GetReplicaX`. The
presence of the suffix suggests there's a `non-X` version: but in fact
we migrated these away a long time ago, so remove the cognitive
overhead.

As an aside, this additionally helps avoid trip up LLMs that interpret
this as "something to fix".
Этот коммит содержится в:
Jesse Hallam
2024-12-10 09:57:19 -04:00
коммит произвёл GitHub
родитель 8b86e1276e
Коммит 5369f8b36b
77 изменённых файлов: 892 добавлений и 892 удалений

Просмотреть файл

@@ -141,7 +141,7 @@ func (ss *SqlStore) initMorph(dryRun bool) (*morph.Morph, error) {
}
defer db.Close()
case model.DatabaseDriverPostgres:
driver, err = ps.WithInstance(ss.GetMasterX().DB.DB)
driver, err = ps.WithInstance(ss.GetMaster().DB.DB)
default:
err = fmt.Errorf("unsupported database type %s for migration", ss.DriverName())
}