Open rubenelshof opened 4 days ago
Please reopen this issue. The fix applied also fails with the same error.
See below the table structure after Woodpecker has started and fails.
+------------+-------------+------------------+----------------+-------------+-----------+--------------------------+
| TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH |
+------------+-------------+------------------+----------------+-------------+-----------+--------------------------+
| registries | id | 1 | NULL | NO | bigint | NULL |
| registries | repo_id | 2 | 0 | YES | bigint | NULL |
| registries | address | 3 | NULL | YES | varchar | 255 |
| registries | username | 4 | NULL | YES | varchar | 2000 |
| registries | password | 5 | NULL | YES | text | 65535 |
+------------+-------------+------------------+----------------+-------------+-----------+--------------------------+
I have also setup a new Woodpecker instance and new database on a different machine but with the same database version. This creates the following structure.
+------------+-------------+------------------+----------------+-------------+-----------+--------------------------+
| TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH |
+------------+-------------+------------------+----------------+-------------+-----------+--------------------------+
| registries | id | 1 | NULL | NO | bigint | NULL |
| registries | org_id | 2 | 0 | NO | bigint | NULL |
| registries | repo_id | 3 | 0 | NO | bigint | NULL |
| registries | address | 4 | NULL | NO | varchar | 255 |
| registries | username | 5 | NULL | YES | varchar | 2000 |
| registries | password | 6 | NULL | YES | text | 65535 |
+------------+-------------+------------------+----------------+-------------+-----------+--------------------------+
I think problem is in invalid mysql query in common migration helper: https://github.com/woodpecker-ci/woodpecker/blob/b23fdaa6dc30fcfa862e5d855404fe0bb8108dea/server/store/datastore/migration/common.go#L207
Component
server
Describe the bug
A migration fails in the latest version of Woodpecker.
The server wouldn't startup and crashes while attempting to finish the migration.
Last working version is
next-2fa9432ef8
Steps to reproduce
Expected behavior
No response
System Info
Additional context
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]