Documentation
¶
Index ¶
- func AddActionRunAttemptModel(x db.EngineMigration) error
- func AddActionRunJobSummaryTable(x db.EngineMigration) error
- func AddBranchProtectionBypassAllowlist(x db.EngineMigration) error
- func AddCancellingSupportToActionRunner(x db.EngineMigration) error
- func AddContinueOnErrorToActionRunJob(x db.EngineMigration) error
- func AddCreatedUnixToActionUserIsDeletedIndex(x db.EngineMigration) error
- func AddDropsToActionRunJob(x db.EngineMigration) error
- func AddLastSyncUnixToMirror(x db.EngineMigration) error
- func AddReusableWorkflowFieldsToActionRunJob(x db.EngineMigration) error
- func AddScopedWorkflowsSchema(x db.EngineMigration) error
- func AddVisibilityToTeam(x db.EngineMigration) error
- func ExpandIssueAndCommentLongTextFieldsForMSSQL(x db.EngineMigration) error
- func FixLegacyMSSQLDateTimeColumns(x db.EngineMigration) error
- func MakePushMirrorLastUpdateNotNull(x db.EngineMigration) error
- func RenameGiteaThemesToHanzo(x db.EngineMigration) error
- type VisibleType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddActionRunAttemptModel ¶
func AddActionRunAttemptModel(x db.EngineMigration) error
AddActionRunAttemptModel adds the ActionRunAttempt table and the supporting ActionRun/ActionRunJob fields.
func AddActionRunJobSummaryTable ¶
func AddActionRunJobSummaryTable(x db.EngineMigration) error
func AddBranchProtectionBypassAllowlist ¶
func AddBranchProtectionBypassAllowlist(x db.EngineMigration) error
func AddCancellingSupportToActionRunner ¶
func AddCancellingSupportToActionRunner(x db.EngineMigration) error
func AddContinueOnErrorToActionRunJob ¶
func AddContinueOnErrorToActionRunJob(x db.EngineMigration) error
AddContinueOnErrorToActionRunJob adds the ContinueOnError column to ActionRunJob, storing the job-level continue-on-error value from the workflow YAML.
func AddCreatedUnixToActionUserIsDeletedIndex ¶
func AddCreatedUnixToActionUserIsDeletedIndex(x db.EngineMigration) error
AddCreatedUnixToActionUserIsDeletedIndex extends the c_u composite index on the action table to include created_unix, enabling efficient ORDER BY on the dashboard feed query without a full sort of all matching rows.
func AddDropsToActionRunJob ¶ added in v1.26.30
func AddDropsToActionRunJob(x db.EngineMigration) error
AddDropsToActionRunJob adds the Drops column to ActionRunJob, counting the times a runner took the job and gave it back having run none of its steps.
func AddLastSyncUnixToMirror ¶
func AddLastSyncUnixToMirror(x db.EngineMigration) error
func AddReusableWorkflowFieldsToActionRunJob ¶
func AddReusableWorkflowFieldsToActionRunJob(x db.EngineMigration) error
AddReusableWorkflowFieldsToActionRunJob adds the ActionRunJob columns that describe the reusable workflow caller hierarchy, and the ActionRunAttemptJobIDIndex table backing run-wide AttemptJobID allocation.
func AddScopedWorkflowsSchema ¶
func AddScopedWorkflowsSchema(x db.EngineMigration) error
func AddVisibilityToTeam ¶
func AddVisibilityToTeam(x db.EngineMigration) error
func ExpandIssueAndCommentLongTextFieldsForMSSQL ¶
func ExpandIssueAndCommentLongTextFieldsForMSSQL(x db.EngineMigration) error
ExpandIssueAndCommentLongTextFieldsForMSSQL expands legacy MSSQL nvarchar(4000) columns to nvarchar(max) so PR push comments and long issue content are not truncated.
func FixLegacyMSSQLDateTimeColumns ¶
func FixLegacyMSSQLDateTimeColumns(x db.EngineMigration) error
FixLegacyMSSQLDateTimeColumns converts legacy locale-dependent DATETIME columns to DATETIME2. Databases created by old Gitea versions stored these columns as DATETIME, which fails to parse ISO datetime strings ('YYYY-MM-DD HH:MM:SS') when the MSSQL session language is not English, breaking external account linking and LFS lock creation. New installs already use DATETIME2, so only legacy MSSQL columns need converting.
func MakePushMirrorLastUpdateNotNull ¶ added in v1.26.30
func MakePushMirrorLastUpdateNotNull(x db.EngineMigration) error
Databases that gained last_update by ALTER carry it as nullable, and a push mirror is inserted without one: only a sync writes that column, so a mirror that has never synced holds NULL. The scheduler selects on last_update + interval <= now, which answers unknown for a NULL rather than true, so such a row is never selected and never gets the first sync that would give it a value.
Zero says what a mirror that has never run means, in the terms the scheduler already reads: last synced at the epoch, therefore due now.
func RenameGiteaThemesToHanzo ¶ added in v1.26.17
func RenameGiteaThemesToHanzo(x db.EngineMigration) error
RenameGiteaThemesToHanzo maps stored user theme selections onto the renamed built-in themes (theme-gitea-* → theme-hanzo-*). Without this, every user who explicitly picked a theme would silently fall back to the default when the old theme name stops resolving.
Types ¶
type VisibleType ¶
type VisibleType int