From 0bb101674f1199bff2f43aa677cfc83a78cd84c0 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Thu, 6 Dec 2007 14:58:05 +0000 Subject: [PATCH] Define all possible SQL DateTime columns as DateTime Keys. This will make sure that if in a query we will render UTC value rather than locat datetime value. That way we will have consistent queries (by default all DateTime values are saved as UTC in ERP5). git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18060 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../datetime_key_list.xml | 33 +++++++++++++++++++ product/ERP5/bootstrap/erp5_core/bt/revision | 2 +- .../bt/template_catalog_datetime_key_list | 31 +++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 product/ERP5/bootstrap/erp5_core/CatalogDateTimeKeyTemplateItem/datetime_key_list.xml diff --git a/product/ERP5/bootstrap/erp5_core/CatalogDateTimeKeyTemplateItem/datetime_key_list.xml b/product/ERP5/bootstrap/erp5_core/CatalogDateTimeKeyTemplateItem/datetime_key_list.xml new file mode 100644 index 0000000000..81a9a24b80 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/CatalogDateTimeKeyTemplateItem/datetime_key_list.xml @@ -0,0 +1,33 @@ +<key_list> + <key>alarm.alarm_date</key> + <key>alarm_date</key> + <key>catalog.creation_date</key> + <key>catalog.modification_date</key> + <key>creation_date</key> + <key>date</key> + <key>delivery.start_date</key> + <key>delivery.start_date_range_max</key> + <key>delivery.start_date_range_min</key> + <key>delivery.stop_date</key> + <key>delivery.stop_date_range_max</key> + <key>delivery.stop_date_range_min</key> + <key>inventory.date</key> + <key>inventory_stock.date</key> + <key>inventory_stock.mirror_date</key> + <key>item.date</key> + <key>mirror_date</key> + <key>modification_date</key> + <key>movement.start_date</key> + <key>movement.stop_date</key> + <key>predicate.start_date</key> + <key>predicate.start_date_range_max</key> + <key>predicate.start_date_range_min</key> + <key>start_date</key> + <key>start_date_range_max</key> + <key>start_date_range_min</key> + <key>stock.date</key> + <key>stock.mirror_date</key> + <key>stop_date</key> + <key>stop_date_range_max</key> + <key>stop_date_range_min</key> +</key_list> \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index c5ba36b3c3..24c5507b23 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -632 \ No newline at end of file +633 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_core/bt/template_catalog_datetime_key_list b/product/ERP5/bootstrap/erp5_core/bt/template_catalog_datetime_key_list index e69de29bb2..c0aaf8e91e 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/template_catalog_datetime_key_list +++ b/product/ERP5/bootstrap/erp5_core/bt/template_catalog_datetime_key_list @@ -0,0 +1,31 @@ +alarm.alarm_date +alarm_date +catalog.creation_date +catalog.modification_date +creation_date +date +delivery.start_date +delivery.start_date_range_max +delivery.start_date_range_min +delivery.stop_date +delivery.stop_date_range_max +delivery.stop_date_range_min +inventory.date +inventory_stock.date +inventory_stock.mirror_date +item.date +mirror_date +modification_date +movement.start_date +movement.stop_date +predicate.start_date +predicate.start_date_range_max +predicate.start_date_range_min +start_date +start_date_range_max +start_date_range_min +stock.date +stock.mirror_date +stop_date +stop_date_range_max +stop_date_range_min \ No newline at end of file -- 2.30.9