glom r1929 - in trunk: . glom/libglom/connectionpool_backends



Author: arminb
Date: Tue Feb 24 10:44:32 2009
New Revision: 1929
URL: http://svn.gnome.org/viewvc/glom?rev=1929&view=rev

Log:
2009-02-24  Armin Burgmeier  <armin openismus com>

	* glom/libglom/connectionpool_backends/sqlite.cc: Keep non-NULL
	constraint of columns when recreating table.


Modified:
   trunk/ChangeLog
   trunk/glom/libglom/connectionpool_backends/sqlite.cc

Modified: trunk/glom/libglom/connectionpool_backends/sqlite.cc
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/sqlite.cc	(original)
+++ trunk/glom/libglom/connectionpool_backends/sqlite.cc	Tue Feb 24 10:44:32 2009
@@ -127,12 +127,14 @@
   Glib::ustring name_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_NAME/%1", i);
   Glib::ustring type_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_TYPE/%1", i);
   Glib::ustring pkey_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_PKEY/%1", i);
+  Glib::ustring nnul_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_NNUL/%1", i);
   // TODO: Find out whether the column is unique.
   Glib::ustring default_path = Glib::ustring::compose("/FIELDS_A/@COLUMN_DEFAULT/%1", i);
 
   if(!set_server_operation_value(operation, name_path, column->column_name, error)) return false;
   if(!set_server_operation_value(operation, type_path, column->column_type, error)) return false;
   if(!set_server_operation_value(operation, pkey_path, column->pkey ? "TRUE" : "FALSE", error)) return false;
+  if(!set_server_operation_value(operation, nnul_path, !column->nullok ? "TRUE" : "FALSE", error)) return false;
 
   if(column->default_value)
     if(!set_server_operation_value(operation, default_path, column->default_value, error))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]