| 1 | -- A pull request opened from a branch of someone's fork of the repository |
| 2 | -- (a repository whose parent_id chain reaches it): which fork. Its branch |
| 3 | -- is source_branch, as for a branch of the repository itself. Unlike |
| 4 | -- fork_repo_id (a working copy made for one pull request, so unique), a |
| 5 | -- fork holds many pull requests' branches. |
| 6 | ALTER TABLE pulls ADD COLUMN head_repo_id TEXT; |
| 7 | ALTER TABLE pulls ADD COLUMN head_namespace TEXT; |
| 8 | ALTER TABLE pulls ADD COLUMN head_name TEXT; |
| 9 | -- A push to a fork's branch moves the pull requests opened from it. |
| 10 | CREATE INDEX pulls_by_head_repo ON pulls (head_repo_id, source_branch); |
| 11 | |
| 12 | -- Whether issues can be opened in a repository: NULL for the default, on |
| 13 | -- for a repository and off for a fork of one. |
| 14 | ALTER TABLE repo_settings ADD COLUMN has_issues INTEGER; |