[CalendarServer-changes] [7367] CalendarServer/branches/users/glyph/misc-portability-fixes/txdav/ common/datastore/sql_tables.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Apr 27 11:44:30 PDT 2011
Revision: 7367
http://trac.macosforge.org/projects/calendarserver/changeset/7367
Author: glyph at apple.com
Date: 2011-04-27 11:44:30 -0700 (Wed, 27 Apr 2011)
Log Message:
-----------
All text is text; use nvarchar2, nchar so that all fields may store unicode data.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/misc-portability-fixes/txdav/common/datastore/sql_tables.py
Modified: CalendarServer/branches/users/glyph/misc-portability-fixes/txdav/common/datastore/sql_tables.py
===================================================================
--- CalendarServer/branches/users/glyph/misc-portability-fixes/txdav/common/datastore/sql_tables.py 2011-04-27 18:44:08 UTC (rev 7366)
+++ CalendarServer/branches/users/glyph/misc-portability-fixes/txdav/common/datastore/sql_tables.py 2011-04-27 18:44:30 UTC (rev 7367)
@@ -224,6 +224,10 @@
typeName = 'nclob'
if typeName == 'boolean':
typeName = 'integer'
+ if typeName == 'varchar':
+ typeName = 'nvarchar2'
+ if typeName == 'char':
+ typeName = 'nchar'
out.write(' "%s" %s' % (column.model.name, typeName))
if column.model.type.length:
out.write("(%s)" % (column.model.type.length,))
@@ -250,7 +254,7 @@
# Oracle treats empty strings as NULLs, so we have to accept
# NULL values in columns of a string type. Other types should
# be okay though.
- and typeName not in ('text', 'varchar') ):
+ and typeName not in ('varchar', 'nclob', 'char', 'nchar', 'nvarchar', 'nvarchar2') ):
out.write(' not null')
if set([column.model]) in list(table.model.uniques()):
out.write(' unique')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110427/f85e6b0d/attachment.html>
More information about the calendarserver-changes
mailing list