-
Notifications
You must be signed in to change notification settings - Fork 40
Write last Gogs version with compatible db version #108
Conversation
And include db version info
The version of the database ist fixed with the gogs version. Nobody will really know what this database version means. |
@tboerger whoever wants to know if an upgrade will work can check the version.version table in their database, if not greater than the given number (15) then the upgrade will be smooth. Isn't that all ? |
I'm with @tboerger here, in most cases db-version will just confuse rather than help. |
On Thu, Mar 30, 2017 at 05:51:16AM -0700, bkcsoft wrote:
I'm with @tboerger here, in most cases db-version will just confuse rather than help.
Whenever someone wants to upgrade from Gogs I find myself
asking exactly that question: what version is your Gogs DB ?
Can you see a better way to tell if an upgrade can be performed ?
|
I think documenting both gogs version and db schema version is ideal |
Does not add the db schema version part as I'd need help with that (@lunny?)
It's quite simple. Which version has your Gogs? It's bigger than the mentioned version? Than it's up to you to try it, it's pretty sure that there are diffs. The migration number anyway only changes with new migrations, the database will be anyway on a different state if unknwon adds a new column anywhere |
@tboerger you mean adding columns does not require a migration ? In that case I don't know if the version referenced by this PR is really the same as the current version in tables composition. |
LGTM |
@strk migrations are only used to change data or to drop columns. Sync2 is always called to create new columns automatically and it doesn't change the migration number |
LGTM |
And include db version info
\cc @lunny, @bkcsoft, @tboerger