1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00
forgejo/models/fixtures/milestone.yml
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

49 lines
794 B
YAML

-
id: 1
repo_id: 1
name: milestone1
content: content1
is_closed: false
num_issues: 1
num_closed_issues: 0
deadline_unix: 253370764800
-
id: 2
repo_id: 1
name: milestone2
content: content2
is_closed: false
num_issues: 0
num_closed_issues: 0
deadline_unix: 253370764800
-
id: 3
repo_id: 1
name: milestone3
content: content3
is_closed: true
num_issues: 1
num_closed_issues: 0
deadline_unix: 253370764800
-
id: 4
repo_id: 42
name: milestone of repo42
content: content random
is_closed: false
num_issues: 0
num_closed_issues: 0
deadline_unix: 253370764800
-
id: 5
repo_id: 10
name: milestone of repo 10
content: for testing with PRs
is_closed: false
num_issues: 0
num_closed_issues: 0
deadline_unix: 253370764800