Ramesh N has uploaded a new change for review.

Change subject: gluster: change varchar type to text in storage device table.
......................................................................

gluster: change varchar type to text in storage device table.

  Change all the varchar types with length >256 in storage_device
table to text type.

Change-Id: I3cf5555600846fe6ae29e604723f92c0b110eb0d
Signed-off-by: Ramesh Nachimuthu <[email protected]>
---
M packaging/dbscripts/storage_device_sp.sql
A 
packaging/dbscripts/upgrade/03_06_1220_change_lengthy_varchar_to_text_in_storage_device_table.sql
2 files changed, 12 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/67/39867/1

diff --git a/packaging/dbscripts/storage_device_sp.sql 
b/packaging/dbscripts/storage_device_sp.sql
index 4485bd8..b0cbe29 100644
--- a/packaging/dbscripts/storage_device_sp.sql
+++ b/packaging/dbscripts/storage_device_sp.sql
@@ -4,15 +4,15 @@
 ----------------------------------------------------------------*/
 
 Create or replace FUNCTION InsertStorageDevice(v_id UUID,
-                                               v_name VARCHAR(1000),
+                                               v_name text,
                                                v_device_uuid VARCHAR(38),
                                                v_filesystem_uuid VARCHAR(38),
                                                v_vds_id UUID,
-                                               v_description VARCHAR(2000),
+                                               v_description text,
                                                v_device_type VARCHAR(50),
-                                               v_device_path VARCHAR(4096),
+                                               v_device_path text,
                                                v_filesystem_type VARCHAR(50),
-                                               v_mount_point VARCHAR(4096),
+                                               v_mount_point text,
                                                v_size BIGINT,
                                                v_is_free BOOLEAN)
 RETURNS VOID
@@ -26,14 +26,14 @@
 LANGUAGE plpgsql;
 
 Create or replace FUNCTION UpdateStorageDevice(v_id UUID,
-                                               v_name VARCHAR(1000),
+                                               v_name text,
                                                v_device_uuid VARCHAR(38),
                                                v_filesystem_uuid VARCHAR(38),
-                                               v_description VARCHAR(2000),
+                                               v_description text,
                                                v_device_type VARCHAR(50),
-                                               v_device_path VARCHAR(4096),
+                                               v_device_path text,
                                                v_filesystem_type VARCHAR(50),
-                                               v_mount_point VARCHAR(4096),
+                                               v_mount_point text,
                                                v_size BIGINT,
                                                v_is_free BOOLEAN)
 RETURNS VOID
diff --git 
a/packaging/dbscripts/upgrade/03_06_1220_change_lengthy_varchar_to_text_in_storage_device_table.sql
 
b/packaging/dbscripts/upgrade/03_06_1220_change_lengthy_varchar_to_text_in_storage_device_table.sql
new file mode 100644
index 0000000..8672e8b
--- /dev/null
+++ 
b/packaging/dbscripts/upgrade/03_06_1220_change_lengthy_varchar_to_text_in_storage_device_table.sql
@@ -0,0 +1,4 @@
+SELECT fn_db_change_column_type('storage_device', 'name', 'varchar', 'text');
+SELECT fn_db_change_column_type('storage_device', 'description', 'varchar', 
'text');
+SELECT fn_db_change_column_type('storage_device', 'device_path', 'varchar', 
'text');
+SELECT fn_db_change_column_type('storage_device', 'mount_point', 'varchar', 
'text');
\ No newline at end of file


-- 
To view, visit https://gerrit.ovirt.org/39867
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cf5555600846fe6ae29e604723f92c0b110eb0d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5-gluster
Gerrit-Owner: Ramesh N <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to