From 45233e4e74903a23a7651570335319bd709955ca Mon Sep 17 00:00:00 2001 From: Russell Michell Date: Wed, 26 Jul 2017 08:04:48 +1200 Subject: [PATCH] FIX: Fixes #64 by the addition on of the USING clause. --- code/PostgreSQLSchemaManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/PostgreSQLSchemaManager.php b/code/PostgreSQLSchemaManager.php index 6e962bc..60f40f6 100644 --- a/code/PostgreSQLSchemaManager.php +++ b/code/PostgreSQLSchemaManager.php @@ -497,7 +497,7 @@ class PostgreSQLSchemaManager extends DBSchemaManager } if (isset($matches[1])) { - $alterCol = "ALTER COLUMN \"$colName\" TYPE $matches[1]\n"; + $alterCol = "ALTER COLUMN \"$colName\" TYPE $matches[1] USING \"$colName\"::$matches[1]\n"; // SET null / not null if (!empty($matches[2])) {