But we're not doing this for Code Insight's TImescaleDB instance currently, so for now the migration files themselves serve as the documentation and have detailed comments in them:
This is OK for now because we also do not support squashing migrations for the TimescaleDB instance, so we won't lose the comments in those migration files for now: https://github.com/sourcegraph/sourcegraph/issues/19114
The reason we're not doing this: schemadoc/main.go launches a Postgres 9.6 instance via Docker, we would need to add an option that causes it to launch the code insights TimescaleDB instance instead.
internal/db/schemadoc/main.go
is used to generate DB schema documentation for all of our Postgres DBs:https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+file:schema%5C..*md&patternType=literal
But we're not doing this for Code Insight's TImescaleDB instance currently, so for now the migration files themselves serve as the documentation and have detailed comments in them:
https://github.com/sourcegraph/sourcegraph/tree/main/migrations/codeinsights
This is OK for now because we also do not support squashing migrations for the TimescaleDB instance, so we won't lose the comments in those migration files for now: https://github.com/sourcegraph/sourcegraph/issues/19114
The reason we're not doing this:
schemadoc/main.go
launches a Postgres 9.6 instance via Docker, we would need to add an option that causes it to launch the code insights TimescaleDB instance instead.