From 947b78e0a10bf3b16569695de3f517ea6690c525 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 15 May 2009 07:18:47 +0000 Subject: [PATCH] "allow to use now() beside current_timestamp, as Postgres backups contain it and it's easier to remember anyway" --- phpgwapi/inc/class.schema_proc.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.schema_proc.inc.php b/phpgwapi/inc/class.schema_proc.inc.php index efb768033e..56d29a4aa9 100644 --- a/phpgwapi/inc/class.schema_proc.inc.php +++ b/phpgwapi/inc/class.schema_proc.inc.php @@ -1030,7 +1030,8 @@ class schema_proc break; case 'date': $ado_col = 'D'; - if ($col_data['default'] == 'current_date') + // allow to use now() beside current_date, as Postgres backups contain it and it's easier to remember anyway + if (in_array($col_data['default'],array('current_date','now()'))) { $ado_col .= ' DEFDATE'; unset($col_data['default']); @@ -1064,7 +1065,8 @@ class schema_proc break; case 'timestamp': $ado_col = 'T'; - if ($col_data['default'] == 'current_timestamp') + // allow to use now() beside current_timestamp, as Postgres backups contain it and it's easier to remember anyway + if (in_array($col_data['default'],array('current_timestamp','now()'))) { $ado_col .= ' DEFTIMESTAMP'; unset($col_data['default']);