Skip to content

Commit 4fbfd07

Browse files
JasperB-TeamBluedupondje
authored andcommitted
db: update type of cpu_flags field
Cluster has a column cpu_flags with type text while a host has the same column but with type varchar(4000). Making these two columns the same solves issues regarding cpu flags longer then 4000 characters. Signed-off-by: Jasper Berton <[email protected]>
1 parent cb2d844 commit 4fbfd07

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT fn_db_change_column_type('vds_dynamic','cpu_flags','VARCHAR','TEXT');

packaging/dbscripts/vds_sp.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ CREATE OR REPLACE FUNCTION InsertVdsDynamic (
223223
v_version_name VARCHAR(40),
224224
v_build_name VARCHAR(40),
225225
v_previous_status INT,
226-
v_cpu_flags VARCHAR(4000),
226+
v_cpu_flags TEXT,
227227
v_pending_vcpus_count INT,
228228
v_pending_vmem_size INT,
229229
v_cpu_sockets INT,
@@ -488,7 +488,7 @@ CREATE OR REPLACE FUNCTION UpdateVdsDynamic (
488488
v_version_name VARCHAR(40),
489489
v_build_name VARCHAR(40),
490490
v_previous_status INT,
491-
v_cpu_flags VARCHAR(4000),
491+
v_cpu_flags TEXT,
492492
v_pending_vcpus_count INT,
493493
v_pending_vmem_size INT,
494494
v_cpu_sockets INT,
@@ -1530,7 +1530,7 @@ LANGUAGE plpgsql;
15301530

15311531
CREATE OR REPLACE FUNCTION UpdateCpuFlags (
15321532
v_vds_id UUID,
1533-
v_cpu_flags VARCHAR(4000)
1533+
v_cpu_flags TEXT
15341534
)
15351535
RETURNS VOID AS $FUNCTION$
15361536
BEGIN

0 commit comments

Comments
 (0)