--- a/__pkginfo__.py Tue Nov 22 11:26:06 2011 +0100
+++ b/__pkginfo__.py Mon Nov 21 17:58:18 2011 +0100
@@ -52,7 +52,7 @@
'Twisted': '',
# XXX graphviz
# server dependencies
- 'logilab-database': '>= 1.5.0',
+ 'logilab-database': '>= 1.8.1',
'pysqlite': '>= 2.5.5', # XXX install pysqlite2
}
--- a/debian/control Tue Nov 22 11:26:06 2011 +0100
+++ b/debian/control Mon Nov 21 17:58:18 2011 +0100
@@ -35,7 +35,7 @@
Conflicts: cubicweb-multisources
Replaces: cubicweb-multisources
Provides: cubicweb-multisources
-Depends: ${misc:Depends}, ${python:Depends}, cubicweb-common (= ${source:Version}), cubicweb-ctl (= ${source:Version}), python-logilab-database (>= 1.5.0), cubicweb-postgresql-support | cubicweb-mysql-support | python-pysqlite2
+Depends: ${misc:Depends}, ${python:Depends}, cubicweb-common (= ${source:Version}), cubicweb-ctl (= ${source:Version}), python-logilab-database (>= 1.8.1), cubicweb-postgresql-support | cubicweb-mysql-support | python-pysqlite2
Recommends: pyro (<< 4.0.0), cubicweb-documentation (= ${source:Version})
Description: server part of the CubicWeb framework
CubicWeb is a semantic web application framework.
--- a/hooks/syncschema.py Tue Nov 22 11:26:06 2011 +0100
+++ b/hooks/syncschema.py Mon Nov 21 17:58:18 2011 +0100
@@ -484,6 +484,11 @@
# set default value, using sql for performance and to avoid
# modification_date update
if default:
+ if rdefdef.object in ('Date', 'Datetime'):
+ if default == 'TODAY':
+ default = syssource.dbhelper.sql_current_date()
+ elif default == 'NOW':
+ default = syssource.dbhelper.sql_current_timestamp()
session.system_sql('UPDATE %s SET %s=%%(default)s' % (table, column),
{'default': default})