0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 01:14:43 +01:00
gitea/models
Aravinth Manivannan 69a28299e2
migrations: a deadline at January 1st, 1970 is valid (#18237)
* migrations: a deadline at January 1st, 1970 is valid

Do not change the deadline value if it is set to January 1st, 1970.

Setting the deadline to year 9999 when it is zero (which is equal to
January 1st, 1970) modifies a deadline set to January 1st, 1970 which
is a valid date. In addition, setting a date in year 9999 will be
converted to a null date in some cases.

Signed-off-by: Loïc Dachary <loic@dachary.org>

* tests: set milestone.deadline_unix in fixtures

The value of deadline_unix must be set to 253370764800 (i.e. 9999-01-01) in
fixtures, otherwise it will be inserted as null which leads to
unexpected errors. For instance, DumpRepository will store a null
deadline_unix as 0 (i.e. 1970-01-01) and RestoreRepository will change
it to 9999-01-01.

Signed-off-by: Loïc Dachary <loic@dachary.org>

Co-authored-by: Loïc Dachary <loic@dachary.org>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-01-13 14:03:30 +08:00
..
admin
appstate
asymkey Fix various typos (#18219) 2022-01-10 17:32:37 +08:00
auth Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
avatars slight optimization for default avatar (#18187) 2022-01-05 07:00:32 +01:00
db Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
fixtures migrations: a deadline at January 1st, 1970 is valid (#18237) 2022-01-13 14:03:30 +08:00
issues Simplify parameter types (#18006) 2021-12-20 04:41:31 +00:00
migrations Remove ioutil (#18222) 2022-01-10 09:48:13 +08:00
perm Team permission allow different unit has different permission (#17811) 2022-01-05 11:37:00 +08:00
repo Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
unit Fix new team (#18212) 2022-01-08 15:19:36 +00:00
unittest tests: s/GITEA_UNIT_TESTS_VERBOSE/GITEA_UNIT_TESTS_LOG_SQL/ (#18142) 2022-01-01 04:31:24 +01:00
user Fix update user bug (#18250) 2022-01-12 21:58:09 +08:00
webhook Add replay of webhooks. (#18191) 2022-01-05 15:00:20 -06:00
access.go Team permission allow different unit has different permission (#17811) 2022-01-05 11:37:00 +08:00
access_test.go
action.go Prevent hang in git cat-file if repository is not a valid repository and other fixes (#17991) 2021-12-16 19:01:14 +00:00
action_list.go
action_test.go
branches.go
branches_test.go
commit.go
commit_status.go Add missing X-Total-Count and fix some related bugs (#17968) 2021-12-15 13:39:34 +08:00
commit_status_test.go
consistency.go
consistency_test.go
engine_test.go
error.go
fixture_generation.go
fixture_test.go
helper.go
helper_directory.go
helper_environment.go
issue.go Team permission allow different unit has different permission (#17811) 2022-01-05 11:37:00 +08:00
issue_assignees.go
issue_assignees_test.go
issue_comment.go Add API to get issue/pull comments and events (timeline) (#17403) 2022-01-01 22:12:25 +08:00
issue_comment_list.go
issue_comment_test.go
issue_dependency.go
issue_dependency_test.go
issue_label.go
issue_label_test.go
issue_list.go Use conditions but not repo ids as query condition (#16839) 2021-12-29 21:02:12 +08:00
issue_list_test.go
issue_lock.go
issue_milestone.go Simplify parameter types (#18006) 2021-12-20 04:41:31 +00:00
issue_milestone_test.go
issue_reaction.go Add missing X-Total-Count and fix some related bugs (#17968) 2021-12-15 13:39:34 +08:00
issue_reaction_test.go
issue_stopwatch.go
issue_stopwatch_test.go
issue_test.go Use conditions but not repo ids as query condition (#16839) 2021-12-29 21:02:12 +08:00
issue_tracked_time.go
issue_tracked_time_test.go
issue_user.go
issue_user_test.go
issue_watch.go Add missing X-Total-Count and fix some related bugs (#17968) 2021-12-15 13:39:34 +08:00
issue_watch_test.go
issue_xref.go
issue_xref_test.go Move repository model into models/repo (#17933) 2021-12-10 09:27:50 +08:00
lfs.go Allow admin to associate missing LFS objects for repositories (#18143) 2022-01-01 17:05:31 +08:00
lfs_lock.go
main_test.go
migrate.go tests: add coverage for models migration helpers (#18162) 2022-01-03 23:35:01 +08:00
migrate_test.go tests: add coverage for models migration helpers (#18162) 2022-01-03 23:35:01 +08:00
notification.go Fix various typos (#18219) 2022-01-10 17:32:37 +08:00
notification_test.go
org.go Team permission allow different unit has different permission (#17811) 2022-01-05 11:37:00 +08:00
org_team.go Team permission allow different unit has different permission (#17811) 2022-01-05 11:37:00 +08:00
org_team_test.go Team permission allow different unit has different permission (#17811) 2022-01-05 11:37:00 +08:00
org_test.go
project.go
project_board.go
project_issue.go
project_test.go
protected_tag.go
protected_tag_test.go
pull.go
pull_list.go Don't delete branch if other PRs with this branch are open (#18164) 2022-01-03 20:45:58 +01:00
pull_test.go Don't delete branch if other PRs with this branch are open (#18164) 2022-01-03 20:45:58 +01:00
release.go
repo.go Fix various typos (#18219) 2022-01-10 17:32:37 +08:00
repo_activity.go
repo_collaboration.go
repo_collaboration_test.go
repo_generate.go
repo_generate_test.go
repo_list.go Use conditions but not repo ids as query condition (#16839) 2021-12-29 21:02:12 +08:00
repo_list_test.go
repo_permission.go Team permission allow different unit has different permission (#17811) 2022-01-05 11:37:00 +08:00
repo_permission_test.go
repo_test.go
repo_transfer.go
repo_transfer_test.go
review.go Fix various typos (#18219) 2022-01-10 17:32:37 +08:00
review_test.go
statistic.go Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
task.go
token.go Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
token_test.go
upload.go
user.go Use conditions but not repo ids as query condition (#16839) 2021-12-29 21:02:12 +08:00
user_heatmap.go
user_heatmap_test.go
user_test.go Use conditions but not repo ids as query condition (#16839) 2021-12-29 21:02:12 +08:00
userlist.go
userlist_test.go