[CalendarServer-changes] [15717] CalendarServer/trunk/txdav/common/datastore/sql_tables.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Jun 29 11:36:02 PDT 2016


Revision: 15717
          http://trac.calendarserver.org//changeset/15717
Author:   cdaboo at apple.com
Date:     2016-06-29 11:36:01 -0700 (Wed, 29 Jun 2016)
Log Message:
-----------
Improve formatting of schema file by adding blank lines in various places.

Modified Paths:
--------------
    CalendarServer/trunk/txdav/common/datastore/sql_tables.py

Modified: CalendarServer/trunk/txdav/common/datastore/sql_tables.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_tables.py	2016-06-29 17:31:29 UTC (rev 15716)
+++ CalendarServer/trunk/txdav/common/datastore/sql_tables.py	2016-06-29 18:36:01 UTC (rev 15717)
@@ -335,6 +335,8 @@
     """
     for sequence in schema.model.sequences:
         out.write('create sequence %s;\n' % (sequence.name,))
+    out.write("\n\n")
+
     for table in schema:
         # The only table name which actually exceeds the length limit right now
         # is CALENDAR_OBJECT_ATTACHMENTS_MODE, which isn't actually _used_
@@ -421,7 +423,9 @@
                         for (cmodel, val) in row.items()])
             out.write(_staticSQL(Insert(cmap)))
             out.write(";\n")
+        out.write("\n\n" if len(table.model.schemaRows) else "\n")
 
+
     for index in schema.model.indexes:
         # Index names combine and repeat multiple table names and column names,
         # so several of them conflict once oracle's length limit is applied.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160629/c9a80d39/attachment-0001.html>


More information about the calendarserver-changes mailing list