You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/models/migrations/v1_21
Nate Levesque f891172ef4
handle repository.size column being NULL in migration v263 (#28336)
This resolves a problem I encountered while updating gitea from 1.20.4
to 1.21. For some reason (correct or otherwise) there are some values in
`repository.size` that are NULL in my gitea database which cause this
migration to fail due to the NOT NULL constraints.

Log snippet (excuse the escape characters)
```
ESC[36mgitea                |ESC[0m 2023-12-04T03:52:28.573122395Z 2023/12/04 03:52:28 ...ations/migrations.go:641:Migrate() [I] Migration[263]: Add git_size and lfs_size columns to repository table
ESC[36mgitea                |ESC[0m 2023-12-04T03:52:28.608705544Z 2023/12/04 03:52:28 routers/common/db.go:36:InitDBEngine() [E] ORM engine initialization attempt #3/10 failed. Error: migrate: migration[263]: Add git_size and lfs_size columns to repository table failed: NOT NULL constraint failed: repository.git_size
```

I assume this should be reasonably safe since `repository.git_size` has
a default value of 0 but I don't know if that value being 0 in the odd
situation where `repository.size == NULL` has any problematic
consequences.
6 months ago
..
main_test.go
v260.go Fix description of drop custom_labels migration (#25243) 12 months ago
v261.go Support configuration variables on Gitea Actions (#24724) 12 months ago
v262.go Support `pull_request_target` event (#25229) 11 months ago
v263.go handle repository.size column being NULL in migration v263 (#28336) 6 months ago
v264.go Drop the correct deleted branch table (#26028) 10 months ago
v265.go Actions Artifacts support uploading multiple files and directories (#24874) 11 months ago
v266.go Restore warning commit status (#27504) 8 months ago
v267.go Reduce unnecessary DB queries for Actions tasks (#25199) 10 months ago
v268.go Implement auto-cancellation of concurrent jobs if the event is push (#25716) 10 months ago
v269.go Drop the correct deleted branch table (#26028) 10 months ago
v270.go Fix typo in metadata (#26207) 10 months ago
v271.go Allow to archive labels (#26478) 10 months ago
v272.go Add optimistic lock to ActionRun table (#26563) 10 months ago
v273.go chore(actions): support cron schedule task (#26655) 9 months ago
v274.go Artifacts retention and auto clean up (#26131) 9 months ago
v275.go Add a new column schedule_id for action_run to track (#26975) 9 months ago
v276.go Fix wrong xorm get usage on migration (#27111) 9 months ago
v277.go Add index to `issue_user.issue_id` (#27154) 9 months ago
v278.go Add Index to `comment.dependent_issue_id` (#27325) 8 months ago
v279.go Add Index to `action.user_id` (#27403) 8 months ago