Skip to content

v56 migration fails on 1.9 (potential issue with "dropTableColumns" operation) #7694

Closed
@netvl

Description

@netvl

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions