mirror of https://github.com/coder/coder.git
fix(coderd/database): revert addition of v prefix to provisioner_daemons.api_version (#11403)
"Reverts" #11385 by adding an inverse migration.
This commit is contained in:
parent
f9ebe8c719
commit
4355894b2b
|
@ -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 'v1.0'::text NOT NULL
|
||||
api_version text DEFAULT '1.0'::text NOT NULL
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN provisioner_daemons.api_version IS 'The API version of the provisioner daemon';
|
||||
|
|
|
@ -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';
|
|
@ -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';
|
|
@ -3,6 +3,7 @@ package provisionersdk
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"os"
|
||||
|
@ -21,10 +22,16 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
CurrentMajor = 1
|
||||
CurrentMinor = 0
|
||||
)
|
||||
|
||||
var (
|
||||
SupportedMajors = []int{1}
|
||||
// APIVersionCurrent is the current provisionerd API version.
|
||||
// Breaking changes to the provisionerd API **MUST** increment
|
||||
// the major version below.
|
||||
APIVersionCurrent = "v1.0"
|
||||
// CurrentMajor above.
|
||||
APIVersionCurrent = fmt.Sprintf("%d.%d", CurrentMajor, CurrentMinor)
|
||||
)
|
||||
|
||||
// ServeOptions are configurations to serve a provisioner.
|
||||
|
|
Loading…
Reference in New Issue