g1t/services/repos/migrations/0004_store_key.sql
| 1 | -- Where each repository is kept in the git store. It was always |
| 2 | -- "<namespace>--<name>", worked out from the path; a workspace can now be |
| 3 | -- renamed, which changes the path but cannot move what the store holds, so |
| 4 | -- the key is kept as it was given. New repositories get the same form, |
| 5 | -- unless another repository already holds that key (one whose workspace |
| 6 | -- used to have this name), when they get their id. |
| 7 | ALTER TABLE repos ADD COLUMN store TEXT; |
| 8 | UPDATE repos SET store = namespace || '--' || name; |
| 9 | CREATE UNIQUE INDEX repos_by_store ON repos (store); |