Closed
Description
- Gitea version (or commit ref):
latest
Docker image, which seems to be 1.9.0 at this moment - Git version: not relevant
- Operating system: Docker
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist: https://gist.github.com/netvl/7dbd5a862bff67de711466f2f1489da0
Description
Upgrading from a very old gitea version (unfortunately, I lost the exact version number) to the latest version (1.9.0 as of now) fails with the following error:
2019/08/01 00:24:50 routers/init.go:86:GlobalInit() [F] ORM engine initialization failed: migrate: do migrate: incomplete input
It seems that this is caused by an attempt to execute an incomplete SQL query:
2019/08/01 00:24:50 .../xorm/session_raw.go:226:Exec() [I] [SQL] CREATE TABLE `new_org_user_new` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `uid` INTEGER NULL, `org_id` INTEGER NULL, `is_public` INTEGER NULL,
which happens in this migration: https://github.com/go-gitea/gitea/blob/master/models/migrations/v56.go.
I may be wrong, but it seems to me that this behavior is caused by this PR: #6849.
When I used an older version (1.8.3
) in my docker setup, it got upgraded perfectly (and now I guess I can try upgrading to 1.9).