[freeside-commits] freeside/FS/bin freeside-upgrade,1.41,1.42
Mark Wells
mark at wavetail.420.am
Mon Mar 28 18:04:33 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv15041/FS/bin
Modified Files:
freeside-upgrade
Log Message:
primary key for areacode table
Index: freeside-upgrade
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-upgrade,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -w -d -r1.41 -r1.42
--- freeside-upgrade 2 Oct 2010 20:54:27 -0000 1.41
+++ freeside-upgrade 29 Mar 2011 01:04:31 -0000 1.42
@@ -71,6 +71,19 @@
}
+if ( dbdef->table('areacode') and
+ dbdef->table('areacode')->primary_key eq 'code' )
+{
+ if ( driver_name =~ /^mysql/i ) {
+ push @bugfix,
+ 'ALTER TABLE areacode DROP PRIMARY KEY',
+ 'ALTER TABLE areacode ADD COLUMN (areanum int auto_increment primary key)';
+ }
+ else {
+ push @bugfix, 'ALTER TABLE areacode DROP CONSTRAINT areacode_pkey';
+ }
+}
+
# RT required field flag
# for consistency with RT schema: mysql is in CamelCase,
# pg is in lowercase, and they use different data types.
More information about the freeside-commits
mailing list