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

SF.net SVN: ledger-smb:[3803] branches/1.3



Revision: 3803
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3803&view=rev
Author:   einhverfr
Date:     2011-10-06 23:31:41 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Adding another discovered failure case to the pre-upgrade checks

Modified Paths:
--------------
    branches/1.3/scripts/setup.pl
    branches/1.3/sql/upgrade/1.2-pre-upgrade-checks.sql

Modified: branches/1.3/scripts/setup.pl
===================================================================
--- branches/1.3/scripts/setup.pl	2011-10-06 23:13:14 UTC (rev 3802)
+++ branches/1.3/scripts/setup.pl	2011-10-06 23:31:41 UTC (rev 3803)
@@ -184,6 +184,16 @@
          edit => 'employeenumber',
         table => 'employee'},
 
+       {query => 'SELECT * FROM employee 
+                   WHERE employeenumber IN 
+                         (SELECT employeenumber FROM employee 
+                        GROUP BY employeenumber
+                          HAVING count(*) > 1)',
+         name => $locale->text('Duplicte employee numbers'),
+         cols => ['login', 'name', 'employeenumber'],
+         edit => 'employeenumber',
+        table => 'employee'},
+
        {query => "select * from parts where obsolete is not true 
                   and partnumber in 
                   (select partnumber from parts 

Modified: branches/1.3/sql/upgrade/1.2-pre-upgrade-checks.sql
===================================================================
--- branches/1.3/sql/upgrade/1.2-pre-upgrade-checks.sql	2011-10-06 23:13:14 UTC (rev 3802)
+++ branches/1.3/sql/upgrade/1.2-pre-upgrade-checks.sql	2011-10-06 23:31:41 UTC (rev 3803)
@@ -10,6 +10,10 @@
 
 SELECT * FROM employee where employeenumber IS NULL;
 
+SELECT * FROM employee WHERE employeenumber IN 
+       (SELECT employeenumber FROM employee GROUP BY employeenumber
+        HAVING count(*) > 1);
+
 select partnumber, count(*) from parts 
  WHERE obsolete is not true
 group by partnumber having count(*) > 1;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.