mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
Adds database migrations required for the Tasks feature. There's a slight difference between the migrations in this PR and the RFC: this PR adds `NOT NULL` constraints to the `has_ai_task` columns. It was an oversight on my part when I wrote the RFC - I assumed the `DEFAULT FALSE` value would make the columns implicitly NOT NULL, but that's not the case with Postgres. We have no use for the NULL value. The `DEFAULT FALSE` statement ensures that the migration will pass even when there are existing rows in the template version and workspace builds tables, so there's no danger in adding the `NOT NULL` constraints.