mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 06:25:31 +00:00
ddc709ff7f
When create a new issue or comment and paste/upload an attachment/image, it will not assign an issue id before submit. So if user give up the creating, the attachments will lost key feature and become dirty content. We don't know if we need to delete the attachment even if the repository deleted. This PR add a repo_id in attachment table so that even if a new upload attachment with no issue_id or release_id but should have repo_id. When deleting a repository, they could also be deleted. Co-authored-by: 6543 <6543@obermui.de>
107 lines
1.7 KiB
YAML
107 lines
1.7 KiB
YAML
-
|
|
id: 1
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
|
|
repo_id: 1
|
|
issue_id: 1
|
|
comment_id: 0
|
|
name: attach1
|
|
download_count: 0
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 2
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12
|
|
repo_id: 2
|
|
issue_id: 4
|
|
comment_id: 0
|
|
name: attach2
|
|
download_count: 1
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 3
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a13
|
|
repo_id: 1
|
|
issue_id: 2
|
|
comment_id: 1
|
|
name: attach1
|
|
download_count: 0
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 4
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a14
|
|
repo_id: 1
|
|
issue_id: 3
|
|
comment_id: 1
|
|
name: attach2
|
|
download_count: 1
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 5
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a15
|
|
repo_id: 2
|
|
issue_id: 4
|
|
comment_id: 0
|
|
name: attach1
|
|
download_count: 0
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 6
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a16
|
|
repo_id: 1
|
|
issue_id: 5
|
|
comment_id: 2
|
|
name: attach1
|
|
download_count: 0
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 7
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a17
|
|
repo_id: 1
|
|
issue_id: 5
|
|
comment_id: 2
|
|
name: attach1
|
|
download_count: 0
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 8
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a18
|
|
repo_id: 3
|
|
issue_id: 6
|
|
comment_id: 0
|
|
name: attach1
|
|
download_count: 0
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 9
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a19
|
|
repo_id: 1
|
|
release_id: 1
|
|
name: attach1
|
|
download_count: 0
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 10
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a20
|
|
repo_id: 0 # TestGetAttachment/NotLinked
|
|
uploader_id: 8
|
|
name: attach1
|
|
download_count: 0
|
|
created_unix: 946684800
|
|
|
|
-
|
|
id: 11
|
|
uuid: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a21
|
|
repo_id: 40
|
|
release_id: 2
|
|
name: attach1
|
|
download_count: 0
|
|
created_unix: 946684800
|