Gitea: Upgrade path from gogs 0.10

Created on 2 Mar 2017  路  8Comments  路  Source: go-gitea/gitea

Could you provide a transition path from the latest version of gogs (0.10) to gitea please?

kinquestion

All 8 comments

Gogs 0.10 has serval difference with Gitea master. We didn't test to upgrade from Gogs 0.10.
As I know the main differences are the hooks directory structure and protected branch table.

I pushed it over anyway by following your upgrade guide. No issues so far. Except it did not create the scripts folder; I just copied the gogs folder.

Martin migration is based on the value found in the version field
of the version database table. The same version could mean different
thing if the database is from Gogs or Gitea. That's the main problem.

Only up to Version 14 (I think) they are compatible.

If you are at a later version, switching to Gitea would fail to apply
any migration meant to go from version 14 to whatever version of Gogs
database you started from.

Maybe you can work around this by re-setting the database version
to 14, but anything done in the Gogs migrations to higher Gogs database
versions would probably not be undone and remain there dangling forever
(in the best scenario) or prevent application of Gitea migrations or
trigger weird malfunctioning (in the worst).

It might be possible (or not) to deal with that somehow via software,
but could be very complex.

MariaDB [gogs]> select * from version; +----+---------+ | id | version | +----+---------+ | 1 | 15 | +----+---------+
But that may have been done by gitea. I don't suppose you know any way I could check? I have added my attempt to check.

You might want to update the documentation to include what you wrote above, and perhaps to warn against future cut-overs from gogs to gitea. (Or someone could write a conversion utility).

Looking at https://github.com/gogits/gogs/blob/master/models/migrations/v15.go - there do not appear to be any database changes in gogs version 15, just some rewrites to some git hooks.

https://github.com/go-gitea/gitea/blob/master/models/migrations/v15.go seems to update some columns in a permissions table. So perhaps I can just reset the version to 14.

I see that gitea has changes through to 21. Do I need to do something to make the migrations happen?

No way to tell if it was Gogs or Gitea, that's what I was saying
(ie: it could be useful to add a "flavor" column).

But then I guess you could look the v14.go files in Gogs and Gitea
and see what they do, and check if what you have is what one or the
other requests...

switching from gogs(v0.10.1) to gitea is really easy.
install gitea at different path and new migration from gogs repo.

for example:
click new migration button right top.
Clone Address: /work/repo/sailfish009/sample.git // local server path (gogs repo)
Repository Name: sample

I started my gitea off of a gogs-database with version 14. Everytime when gitea starts, I get these warnings:

[W] Table user Column allow_create_organization db default is , struct default is 1
[W] Table user Column diff_view_style db default is '''', struct default is ''
[W] Table user has column created but struct has not related field
[W] Table user has column updated but struct has not related field
[W] Table user has column num_followings but struct has not related field
[W] Table public_key has column created but struct has not related field
[W] Table public_key has column updated but struct has not related field
[W] Table access_token has column created but struct has not related field
[W] Table access_token has column updated but struct has not related field
[W] Table repository has column created but struct has not related field
[W] Table repository has column updated but struct has not related field
[W] Table repository has column enable_wiki but struct has not related field
[W] Table repository has column enable_issues but struct has not related field
[W] Table repository has column enable_external_tracker but struct has not related field
[W] Table repository has column external_tracker_format but struct has not related field
[W] Table repository has column enable_pulls but struct has not related field
[W] Table repository has column enable_external_wiki but struct has not related field
[W] Table repository has column external_wiki_url but struct has not related field
[W] Table repository has column external_tracker_style but struct has not related field
[W] Table deploy_key has column created but struct has not related field
[W] Table deploy_key has column updated but struct has not related field
[W] Table collaboration has column created but struct has not related field
[W] Table action has column act_email but struct has not related field
[W] Table action has column created but struct has not related field
[W] Table issue has column deadline but struct has not related field
[W] Table issue has column created but struct has not related field
[W] Table issue has column updated but struct has not related field
[W] Table pull_request has column pull_id but struct has not related field
[W] Table pull_request has column pull_index but struct has not related field
[W] Table pull_request has column head_barcnh but struct has not related field
[W] Table pull_request has column can_auto_merge but struct has not related field
[W] Table pull_request has column merged but struct has not related field
[W] Table comment has column created but struct has not related field
[W] Table attachment has column created but struct has not related field
[W] Table issue_user has column repo_id but struct has not related field
[W] Table issue_user has column milestone_id but struct has not related field
[W] Table issue_user has column is_poster but struct has not related field
[W] Table issue_user has column is_closed but struct has not related field
[W] Table milestone has column deadline but struct has not related field
[W] Table milestone has column closed_date but struct has not related field
[W] Table mirror has column updated but struct has not related field
[W] Table mirror has column next_update but struct has not related field
[W] Table release has column created but struct has not related field
[W] Table login_source has column created but struct has not related field
[W] Table login_source has column updated but struct has not related field
[W] Table webhook has column created but struct has not related field
[W] Table webhook has column updated but struct has not related field
[W] Table notice has column created but struct has not related field

Is it safe to ignore them?

Yes, that only warning that you tables has some no meaning columns.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tuxfanou picture tuxfanou  路  3Comments

haytona picture haytona  路  3Comments

jorise7 picture jorise7  路  3Comments

internalfx picture internalfx  路  3Comments

thehowl picture thehowl  路  3Comments