Skip to content

On Update to 1.4.0-rc2: Error on ALTER TABLE DROP COLUMN is_ownerย #3624

@w3p706

Description

@w3p706

Description

Hi

I update with the following procedure:

sudo systemctl stop gitea
sudo su git
cd /home/git/gitea
mv gitea gitea.old
wget https://github.com/go-gitea/gitea/releases/download/v1.4.0-rc2/gitea-1.4.0-rc2-linux-amd64
mv gitea-1.4.0-rc2-linux-amd64 gitea
chmod +x gitea
./gitea web

The following logs are genereated, gitea does not start up.

./log/gitea.log:

2018/03/05 08:11:49 [I] Migration: remove is_owner, num_teams columns from org_user
2018/03/05 08:11:49 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: DROP COLUMN org_user.is_owner, org_user.num_teams: mssql: Fehler bei ALTER TABLE DROP COLUMN is_owner, da mindestens ein Objekt auf diese Spalte zugreift.

Translation of the error (4922): ALTER TABLE ALTER COLUMN is_owner failed because one or more objects access this column.

./log/xorm.log: 2018/03/05 08:03:58 [I] [SQL] ALTER TABLE org_user DROP COLUMN is_owner, num_teams

I see there is a default value on this column. If I generate a DROP COLUMN script in sql-server it gernerates:

ALTER TABLE dbo.org_user
	DROP CONSTRAINT DF__org_user__is_own__797309D9
GO
ALTER TABLE dbo.org_user
	DROP COLUMN is_owner
GO

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions