fix(coderd/database): add missing v prefix to provisioner_daemons.api_version (#11385)

This commit is contained in:
Cian Johnston 2024-01-03 14:11:02 +00:00 committed by GitHub
parent 068e730046
commit f80a1cf3c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 2 deletions

View File

@ -537,7 +537,7 @@ CREATE TABLE provisioner_daemons (
tags jsonb DEFAULT '{}'::jsonb NOT NULL,
last_seen_at timestamp with time zone,
version text DEFAULT ''::text NOT NULL,
api_version text DEFAULT '1.0'::text NOT NULL
api_version text DEFAULT 'v1.0'::text NOT NULL
);
COMMENT ON COLUMN provisioner_daemons.api_version IS 'The API version of the provisioner daemon';

View File

@ -0,0 +1,5 @@
ALTER TABLE ONLY provisioner_daemons
ALTER COLUMN api_version SET DEFAULT '1.0'::text;
UPDATE provisioner_daemons
SET api_version = '1.0'
WHERE api_version = 'v1.0';

View File

@ -0,0 +1,5 @@
ALTER TABLE ONLY provisioner_daemons
ALTER COLUMN api_version SET DEFAULT 'v1.0'::text;
UPDATE provisioner_daemons
SET api_version = 'v1.0'
WHERE api_version = '1.0';

View File

@ -24,7 +24,7 @@ const (
// APIVersionCurrent is the current provisionerd API version.
// Breaking changes to the provisionerd API **MUST** increment
// the major version below.
APIVersionCurrent = "1.0"
APIVersionCurrent = "v1.0"
)
// ServeOptions are configurations to serve a provisioner.