max / makenotwork
| 1 | -- Push-created repositories start private. |
| 2 | -- |
| 3 | -- Migration 023 set this column's default to 'public', so the first push to a |
| 4 | -- name that did not exist yet both created the repository and published it, |
| 5 | -- listed on the /git explore page, in one action that git itself reports as an |
| 6 | -- ordinary push. There was no confirmation and, until the CLI gained `repo |
| 7 | -- set-visibility`, no supported way back: the management verbs lived behind an |
| 8 | -- sshd path the live SSH front door does not use. |
| 9 | -- |
| 10 | -- Publishing should be something a person does on purpose. Creating a repo and |
| 11 | -- publishing it are now two acts rather than one, and the second is |
| 12 | -- `repo set-visibility <name> public`. |
| 13 | -- |
| 14 | -- Existing rows are deliberately untouched. A column default applies only to |
| 15 | -- inserts, so every repository already published stays published; flipping |
| 16 | -- those would silently unpublish work people have linked to. |
| 17 | git_repos ALTER COLUMN visibility SET DEFAULT 'private'; |
| 18 |