forked from ALHP/ALHP.GO
Add database with background information for each pkgbase, for possible future use. A static status page is generated from the db. Currently includes: * sub-packages * build-time * build-duration * status (failed, latest, skipped, queued, building, build) * version (both from PKGBUILD and repo) * last checked Database is currently only used for informational purposes. Goal is to refactor many (expensive) methods to use the db instead of searching/parsing files. Reviewed-on: https://git.harting.dev/anonfunc/ALHP.GO/pulls/26 Co-authored-by: Giovanni Harting <539@idlegandalf.com> Co-committed-by: Giovanni Harting <539@idlegandalf.com>
41 lines
1.3 KiB
Go
41 lines
1.3 KiB
Go
// Code generated by entc, DO NOT EDIT.
|
|
|
|
package migrate
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql/schema"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
var (
|
|
// DbPackagesColumns holds the columns for the "db_packages" table.
|
|
DbPackagesColumns = []*schema.Column{
|
|
{Name: "id", Type: field.TypeInt, Increment: true},
|
|
{Name: "pkgbase", Type: field.TypeString, Unique: true},
|
|
{Name: "packages", Type: field.TypeJSON, Nullable: true},
|
|
{Name: "status", Type: field.TypeInt, Nullable: true},
|
|
{Name: "skip_reason", Type: field.TypeString, Nullable: true},
|
|
{Name: "repository", Type: field.TypeString},
|
|
{Name: "march", Type: field.TypeString},
|
|
{Name: "version", Type: field.TypeString, Nullable: true},
|
|
{Name: "repo_version", Type: field.TypeString, Nullable: true},
|
|
{Name: "build_time", Type: field.TypeTime, Nullable: true},
|
|
{Name: "build_duration", Type: field.TypeUint64, Nullable: true},
|
|
{Name: "updated", Type: field.TypeTime, Nullable: true},
|
|
}
|
|
// DbPackagesTable holds the schema information for the "db_packages" table.
|
|
DbPackagesTable = &schema.Table{
|
|
Name: "db_packages",
|
|
Columns: DbPackagesColumns,
|
|
PrimaryKey: []*schema.Column{DbPackagesColumns[0]},
|
|
ForeignKeys: []*schema.ForeignKey{},
|
|
}
|
|
// Tables holds all the tables in the schema.
|
|
Tables = []*schema.Table{
|
|
DbPackagesTable,
|
|
}
|
|
)
|
|
|
|
func init() {
|
|
}
|