Index: trunk/extensions/CongressLookup/SpecialCongressLookup.php |
— | — | @@ -1,9 +1,4 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "CongressLookup extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | | - |
8 | 3 | /** |
9 | 4 | * This class creates a page which asks the user for their zip code. It then uses the zip code to |
10 | 5 | * look up information about the user's congressional representatives and presents that information |
Index: trunk/extensions/CongressLookup/patches/CongressLookup.sql |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/cl_senate ( |
3 | | - `ss_id` int(10) unsigned NOT NULL, |
| 3 | + `ss_id` int(10) unsigned NOT NULL PRIMARY KEY, |
4 | 4 | `ss_bioguideid` varchar(32) NOT NULL, |
5 | 5 | `ss_gender` varchar(1) NOT NULL, |
6 | 6 | `ss_name` varchar(255) NOT NULL, |
— | — | @@ -7,13 +7,12 @@ |
8 | 8 | `ss_state` varchar(2) NOT NULL, |
9 | 9 | `ss_phone` varchar(32) NOT NULL, |
10 | 10 | `ss_fax` varchar(32) NOT NULL, |
11 | | - `ss_contactform` varchar(255) NOT NULL, |
12 | | -PRIMARY KEY (`ss_id`) |
| 11 | + `ss_contactform` varchar(255) NOT NULL |
13 | 12 | ) /*$wgDBTableOptions*/; |
14 | 13 | CREATE INDEX /*i*/ss_state ON /*$wgDBprefix*/sopa_senate (ss_state); |
15 | 14 | |
16 | 15 | CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/cl_house ( |
17 | | - `sh_id` int(10) unsigned NOT NULL, |
| 16 | + `sh_id` int(10) unsigned NOT NULL PRIMARY KEY, |
18 | 17 | `sh_bioguideid` varchar(32) NOT NULL, |
19 | 18 | `sh_gender` varchar(1) NOT NULL, |
20 | 19 | `sh_name` varchar(255) NOT NULL, |
— | — | @@ -22,18 +21,15 @@ |
23 | 22 | `sh_district` varchar(32) NOT NULL, |
24 | 23 | `sh_phone` varchar(32) NOT NULL, |
25 | 24 | `sh_fax` varchar(32) NOT NULL, |
26 | | - `sh_contactform` varchar(255) NOT NULL, |
27 | | - PRIMARY KEY (`sh_id`) |
| 25 | + `sh_contactform` varchar(255) NOT NULL |
28 | 26 | ) /*$wgDBTableOptions*/; |
29 | 27 | |
30 | 28 | CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/cl_zip3 ( |
31 | | - `sz3_zip` int(3) unsigned DEFAULT NULL, |
32 | | - `sz3_state` varchar(2) DEFAULT NULL, |
33 | | - PRIMARY KEY (`sz3_zip`) |
| 29 | + `sz3_zip` int(3) unsigned DEFAULT NULL PRIMARY KEY, |
| 30 | + `sz3_state` varchar(2) DEFAULT NULL |
34 | 31 | ) /*$wgDBTableOptions*/; |
35 | 32 | |
36 | 33 | CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/cl_zip5 ( |
37 | | - `sz5_zip` int(5) unsigned NOT NULL, |
38 | | - `sz5_rep_id` int(10) unsigned DEFAULT NULL, |
39 | | - PRIMARY KEY (`sz5_zip`) |
| 34 | + `sz5_zip` int(5) unsigned NOT NULL PRIMARY KEY, |
| 35 | + `sz5_rep_id` int(10) unsigned DEFAULT NULL |
40 | 36 | ) /*$wgDBTableOptions*/; |