g1t/services/repos/migrations/0012_deleted_with_workspace.sql
| 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; |