Audit of fe2a202
This commit is contained in:
@@ -102,7 +102,10 @@ func migratePrefixIDs(tx *sql.Tx, dataDir string) error {
|
||||
}
|
||||
|
||||
func idRenames(tx *sql.Tx) (map[string]string, error) {
|
||||
sources := []struct{ prefix, query string }{
|
||||
sources := []struct {
|
||||
prefix ids.Prefix
|
||||
query string
|
||||
}{
|
||||
{ids.Project, `SELECT id FROM projects`},
|
||||
{ids.Task, `SELECT id FROM tasks`},
|
||||
{ids.WorkflowRun, `SELECT DISTINCT workflow_run FROM tasks`},
|
||||
@@ -133,7 +136,7 @@ func idRenames(tx *sql.Tx) (map[string]string, error) {
|
||||
return nil, err
|
||||
}
|
||||
_, mapped := renames[old]
|
||||
if old == "" || mapped || strings.HasPrefix(old, src.prefix) {
|
||||
if old == "" || mapped || strings.HasPrefix(old, string(src.prefix)) {
|
||||
continue
|
||||
}
|
||||
renames[old] = ids.Derive(src.prefix, old)
|
||||
|
||||
Reference in New Issue
Block a user