| 1 | -- How a repository's pull requests merge (RepoSettings in |
| 2 | -- crates/contracts/src/work.rs). NULL is the default for each, so rows |
| 3 | -- written before this read as the defaults: merge, squash and rebase on, |
| 4 | -- fast-forward off, merge by default, default messages, updates suggested, |
| 5 | -- auto-merge allowed, branches kept, no sign-off, commit comments on and |
| 6 | -- issues closed by the pull requests that name them. |
| 7 | ALTER TABLE repo_settings ADD COLUMN allow_merge_commit INTEGER; |
| 8 | ALTER TABLE repo_settings ADD COLUMN allow_squash_merge INTEGER; |
| 9 | ALTER TABLE repo_settings ADD COLUMN allow_rebase_merge INTEGER; |
| 10 | ALTER TABLE repo_settings ADD COLUMN allow_fast_forward INTEGER; |
| 11 | -- 'merge', 'squash', 'rebase' or 'fast_forward'. |
| 12 | ALTER TABLE repo_settings ADD COLUMN default_merge_method TEXT; |
| 13 | -- 'default', 'pull_title', 'pull_title_and_description', |
| 14 | -- 'pull_title_and_commits' (squash only) or 'custom'. |
| 15 | ALTER TABLE repo_settings ADD COLUMN merge_commit_message TEXT; |
| 16 | ALTER TABLE repo_settings ADD COLUMN squash_commit_message TEXT; |
| 17 | ALTER TABLE repo_settings ADD COLUMN merge_commit_template TEXT; |
| 18 | ALTER TABLE repo_settings ADD COLUMN squash_commit_template TEXT; |
| 19 | ALTER TABLE repo_settings ADD COLUMN suggest_updating_branches INTEGER; |
| 20 | ALTER TABLE repo_settings ADD COLUMN allow_auto_merge INTEGER; |
| 21 | ALTER TABLE repo_settings ADD COLUMN delete_branch_on_merge INTEGER; |
| 22 | ALTER TABLE repo_settings ADD COLUMN require_web_commit_sign_off INTEGER; |
| 23 | ALTER TABLE repo_settings ADD COLUMN allow_commit_comments INTEGER; |
| 24 | ALTER TABLE repo_settings ADD COLUMN auto_close_issues INTEGER; |
| 25 | |
| 26 | -- How a pull request merged, and the commit its merge left the base at. |
| 27 | ALTER TABLE pulls ADD COLUMN merge_method TEXT; |
| 28 | ALTER TABLE pulls ADD COLUMN merge_commit TEXT; |
| 29 | -- A person's request that it merge on its own once it may (JSON: the |
| 30 | -- contract's AutoMerge, with the enabler's account as stored to act as). |
| 31 | ALTER TABLE pulls ADD COLUMN auto_merge TEXT; |
| 32 | -- JSON array of the issue numbers it closes when it merges into the |
| 33 | -- default branch: its issue and those its title and description name. |
| 34 | ALTER TABLE pulls ADD COLUMN closes TEXT; |
| 35 | -- Its branch was deleted after it merged or closed (restorable). |
| 36 | ALTER TABLE pulls ADD COLUMN head_branch_deleted INTEGER NOT NULL DEFAULT 0; |
| 37 | -- The pull requests waiting to merge on their own, for the sweep. |
| 38 | CREATE INDEX pulls_with_auto_merge ON pulls (repo_id) WHERE auto_merge IS NOT NULL; |