-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate 78 fail on MSSQL if bare index already dropped #5789
Comments
Looks like the mssql variant should have an if exists on its drop index too. |
As a quick workaround if you have access to the db you should be able to recreate the index (I think this is the correct syntax):
Tell me did you try to migrate earlier and fail or is this the first time you've tried to migrate? If you fancy fixing this and putting in a pr the command is in models/migration/v78.go The MSSQL drop index variant needs an if exists. |
@lsampaioweb could you change table |
The error message changed to: Running gitea migrate I get this: Running the SQL directly on the db I get this: The object 'DF__repositor__is_ba__4F7CD00D' is dependent on column 'is_bare'. |
I executed the SQL below and now everything is working fine!! Do you guys foresee any side effects? BEGIN TRANSACTION; 2019/01/21 18:48:45 [I] Beginning ORM engine initialization. |
@lsampaioweb you should be just fine |
I also had the second issue
while updating from 1.7.4 to 1.8.0rc2. This also solved my issue:
|
[x]
):2019/01/20 22:33:17 [I] Migration: rename repo is_bare to repo is_empty
2019/01/20 22:33:17 [...itea/routers/init.go:81 GlobalInit()] [E] ORM engine initialization failed: migrate: do migrate: Drop index failed: mssql: Cannot drop the index 'repository.IDX_repository_is_bare', because it does not exist or you do not have permission.
2019/01/20 22:33:17 [I] Beginning ORM engine initialization.
2019/01/20 22:33:17 [I] ORM engine initialization attempt Rename import paths: "github.com/gogits/gogs" -> "github.com/go-gitea/gitea" #1/10...
Description
Everything is working fine with the docker image gitea/gitea:1.7 (8006b1b), but when I try to run gitea/gitea:latest (f631702) I get a migration error (error message above).
I checked the table "repository" and the index "IDX_repository_is_bare" does not exist nor does the column "is_empty".
I know is something related with the issue ( #5759 )
The text was updated successfully, but these errors were encountered: