[CalendarServer-changes] [8786] CalendarServer/branches/users/glyph/case-insensitive-uid
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 29 10:15:45 PST 2012
Revision: 8786
http://trac.macosforge.org/projects/calendarserver/changeset/8786
Author: glyph at apple.com
Date: 2012-02-29 10:15:44 -0800 (Wed, 29 Feb 2012)
Log Message:
-----------
support for translating named check constraints
Modified Paths:
--------------
CalendarServer/branches/users/glyph/case-insensitive-uid/txdav/common/datastore/sql_tables.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/case-insensitive-uid/
Modified: CalendarServer/branches/users/glyph/case-insensitive-uid/txdav/common/datastore/sql_tables.py
===================================================================
--- CalendarServer/branches/users/glyph/case-insensitive-uid/txdav/common/datastore/sql_tables.py 2012-02-29 18:15:39 UTC (rev 8785)
+++ CalendarServer/branches/users/glyph/case-insensitive-uid/txdav/common/datastore/sql_tables.py 2012-02-29 18:15:44 UTC (rev 8786)
@@ -315,9 +315,10 @@
for checkConstraint in table.model.constraints:
if checkConstraint.type == 'CHECK':
- out.write(", \n")
-
- out.write(" check(%s)" %
+ out.write(", \n ")
+ if checkConstraint.name is not None:
+ out.write('constraint "%s" ' % (checkConstraint.name,))
+ out.write("check(%s)" %
(staticSQL(checkConstraint.expression, True)))
out.write('\n);\n\n')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120229/05dcb133/attachment.html>
More information about the calendarserver-changes
mailing list