g1t/services/repos/migrations/0012_deleted_with_workspace.sql
Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member | 1 | -- deleted_with: the workspace (its id) a repository was deleted with, when |
| 2 | -- its owner deleted the whole workspace rather than the repository alone. | |
| 3 | -- A restore of the workspace by g1t's staff brings back exactly the | |
| 4 | -- repositories marked with it; one deleted on its own before stays in | |
| 5 | -- Recently deleted, as it was. Null otherwise. See src/lifecycle.rs. | |
| 6 | ALTER TABLE repos ADD COLUMN deleted_with TEXT; | |
| 7 | CREATE INDEX IF NOT EXISTS repos_deleted_with ON repos (deleted_with) WHERE deleted_with IS NOT NULL; |