diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-04-28 23:51:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-28 17:51:36 -0400 |
commit | bf77e2163b670797d5bf7199da88789968e47c61 (patch) | |
tree | 9cd8d0af2d05df59aa2169abeaa99ea7f6be45e3 /models/migrations | |
parent | bc4e06109dae33edc0a9a918f244563f05a1a353 (diff) | |
download | gitea-bf77e2163b670797d5bf7199da88789968e47c61.tar.gz gitea-bf77e2163b670797d5bf7199da88789968e47c61.zip |
Add Debian package registry (#22854)
Co-authored-by: @awkwardbunny
This PR adds a Debian package registry. You can follow [this
tutorial](https://www.baeldung.com/linux/create-debian-package) to build
a *.deb package for testing. Source packages are not supported at the
moment and I did not find documentation of the architecture "all" and
how these packages should be treated.
---------
Co-authored-by: Brian Hong <brian@hongs.me>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'models/migrations')
-rw-r--r-- | models/migrations/migrations.go | 2 | ||||
-rw-r--r-- | models/migrations/v1_20/v256.go | 23 |
2 files changed, 25 insertions, 0 deletions
diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 1f1f43796c..0e84ae9f0e 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -489,6 +489,8 @@ var migrations = []Migration{ NewMigration("Add ActionTaskOutput table", v1_20.AddActionTaskOutputTable), // v255 -> v256 NewMigration("Add ArchivedUnix Column", v1_20.AddArchivedUnixToRepository), + // v256 -> v257 + NewMigration("Add is_internal column to package", v1_20.AddIsInternalColumnToPackage), } // GetCurrentDBVersion returns the current db version diff --git a/models/migrations/v1_20/v256.go b/models/migrations/v1_20/v256.go new file mode 100644 index 0000000000..ddb487f684 --- /dev/null +++ b/models/migrations/v1_20/v256.go @@ -0,0 +1,23 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package v1_20 //nolint + +import ( + "xorm.io/xorm" +) + +func AddIsInternalColumnToPackage(x *xorm.Engine) error { + type Package struct { + ID int64 `xorm:"pk autoincr"` + OwnerID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"` + RepoID int64 `xorm:"INDEX"` + Type string `xorm:"UNIQUE(s) INDEX NOT NULL"` + Name string `xorm:"NOT NULL"` + LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` + SemverCompatible bool `xorm:"NOT NULL DEFAULT false"` + IsInternal bool `xorm:"INDEX NOT NULL DEFAULT false"` + } + + return x.Sync2(new(Package)) +} |