https://www.mediawiki.org/wiki/Special:Code/MediaWiki/109213

Revision: 109213
Author:   awjrichards
Date:     2012-01-17 20:58:48 +0000 (Tue, 17 Jan 2012)
Log Message:
-----------
Added auto-increment id field for cl_zip3 table. clz3_zip cannot be a primary 
key as there is a 1:many relationship between clz3_zip and clz3_state.

Modified Paths:
--------------
    trunk/extensions/CongressLookup/patches/CongressLookup.sql

Modified: trunk/extensions/CongressLookup/patches/CongressLookup.sql
===================================================================
--- trunk/extensions/CongressLookup/patches/CongressLookup.sql  2012-01-17 
20:56:22 UTC (rev 109212)
+++ trunk/extensions/CongressLookup/patches/CongressLookup.sql  2012-01-17 
20:58:48 UTC (rev 109213)
@@ -27,9 +27,11 @@
 ) /*$wgDBTableOptions*/;
 
 CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/cl_zip3 (
-  `clz3_zip` int(3) unsigned NOT NULL PRIMARY KEY,
+  `clz3_id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment,
+  `clz3_zip` int(3) unsigned NOT NULL,
   `clz3_state` varchar(2) DEFAULT NULL
 ) /*$wgDBTableOptions*/;
+CREATE INDEX /*i*/clz3_zip ON /*$wgDBprefix*/cl_zip3 (clz3_zip);
 
 CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/cl_zip5 (
   `clz5_id` int(10) unsigned NOT NULL PRIMARY KEY auto_increment,


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to