Maât wrote:
2) When adding a file - the database complains about a Not null
violation in column 'url'  for the table 'ged_versions'
url cand be null for files or directories...

Ok - then I would propose this tiny patch (see attachment).

Regards

Sigurd
diff -aburN --exclude='SVN*' --exclude=.svn ged.old/setup/setup.inc.php ged/setup/setup.inc.php
--- ged.old/setup/setup.inc.php	2010-01-10 12:40:19.894468763 +0100
+++ ged/setup/setup.inc.php	2010-01-10 12:41:20.125966559 +0100
@@ -26,7 +26,7 @@
 
 	$setup_info['ged']['name']='ged';
 	$setup_info['ged']['title']='Document Management System';
-	$setup_info['ged']['version']='0.9.18.009';
+	$setup_info['ged']['version']='0.9.18.010';
 	$setup_info['ged']['app_order']=17;
 	$setup_info['ged']['enable']=1;
 	$setup_info['calendar']['app_group']    = 'office';
diff -aburN --exclude='SVN*' --exclude=.svn ged.old/setup/tables_current.inc.php ged/setup/tables_current.inc.php
--- ged.old/setup/tables_current.inc.php	2010-01-10 12:40:19.894468763 +0100
+++ ged/setup/tables_current.inc.php	2010-01-10 12:40:50.946466222 +0100
@@ -107,7 +107,7 @@
 		),
 		'ged_versions' => array(
 			'fd' => array(
-				'url' => array('type' => 'varchar', 'precision' => 100,'nullable' => False),
+				'url' => array('type' => 'varchar', 'precision' => 100,'nullable' => True),
 				'size' => array('type' => 'int', 'precision' => 4,'nullable' => False,'default' => '0'),
 				'status' => array('type' => 'varchar', 'precision' => 100,'nullable' => False),
 				'creator_id' => array('type' => 'int', 'precision' => 4,'nullable' => False,'default' => '0'),
diff -aburN --exclude='SVN*' --exclude=.svn ged.old/setup/tables_update.inc.php ged/setup/tables_update.inc.php
--- ged.old/setup/tables_update.inc.php	2010-01-10 12:40:19.894468763 +0100
+++ ged/setup/tables_update.inc.php	2010-01-10 12:48:21.053972709 +0100
@@ -34,6 +34,7 @@
 	$test[]='0.9.18.006';
 	$test[]='0.9.18.007';
 	$test[]='0.9.18.008';	
+	$test[]='0.9.18.009';
 					
 	function ged_upgrade0_9_16_000()
 	{
@@ -525,3 +526,14 @@
 		
 	}	
 	
+	function ged_upgrade0_9_18_009()
+	{
+		$GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+		$GLOBALS['phpgw_setup']->oProc->AlterColumn('ged_versions','url',array('type' => 'varchar', 'precision' => 100,'nullable' => True));
+
+		if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+		{
+			$GLOBALS['setup_info']['ged']['currentver']='0.9.18.010';
+			return $GLOBALS['setup_info']['ged']['currentver'];			
+		}
+	}
_______________________________________________
phpGroupWare-developers mailing list
phpGroupWare-developers@gnu.org
http://lists.gnu.org/mailman/listinfo/phpgroupware-developers

Reply via email to