mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
Addresses https://github.com/coder/nexus/issues/35. This PR: - Adds a `workspace_modules` table to track modules used by the Terraform provisioner in provisioner jobs. - Adds a `module_path` column to the `workspace_resources` table, allowing to identify which module a resource originates from. - Starts pushing this new information into telemetry. For the person reviewing this PR, do not fret about the 1,500 new lines - ~1,000 of them are auto-generated.
17 lines
458 B
SQL
17 lines
458 B
SQL
ALTER TABLE
|
|
workspace_resources
|
|
ADD
|
|
COLUMN module_path TEXT;
|
|
|
|
CREATE TABLE workspace_modules (
|
|
id uuid NOT NULL,
|
|
job_id uuid NOT NULL REFERENCES provisioner_jobs (id) ON DELETE CASCADE,
|
|
transition workspace_transition NOT NULL,
|
|
source TEXT NOT NULL,
|
|
version TEXT NOT NULL,
|
|
key TEXT NOT NULL,
|
|
created_at timestamp with time zone NOT NULL
|
|
);
|
|
|
|
CREATE INDEX workspace_modules_created_at_idx ON workspace_modules (created_at);
|