woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.07k stars 352 forks source link

Migration task 'add-orgs' failes with error: `pq: could not create unique index "UQE_secrets_s"` #2096

Closed lafriks closed 1 year ago

lafriks commented 1 year ago

Component

server

Describe the bug

Migration introduced in #1873 fails with error:

2023-08-02T12:43:03Z fatal could not migrate datastore | error=run tasks failed: migration task 'add-orgs' failed: sync old secrets models failed: pq: could not create unique index "UQE_secrets_s"

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-aec20510"}

Additional context

2023-08-02T12:43:03Z LogLevel = info 
2023-08-02T12:43:03Z ERR migration task 'migrate-logs-to-log_entries' failed but is not required | error=Migrating logs to log_entries is skipped, as we have 108866 entries to convert. Set 'WOODPECKER_MIGRATIONS_ALLOW_LONG' to 'true' to migrate anyway
2023-08-02T12:43:03Z fatal could not migrate datastore | error=run tasks failed: migration task 'add-orgs' failed: sync old secrets models failed: pq: could not create unique index "UQE_secrets_s"

Validations

6543 commented 1 year ago

can you test if it was #2104 (backport: #2106)

@lafriks ?

lafriks commented 1 year ago

can you test if it was #2104 (backport: #2106)

@lafriks ?

No, I use Gitea as forge