This repository has been archived by the owner on May 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.mysql
executable file
·709 lines (697 loc) · 20.4 KB
/
db.mysql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
/* Just some notes on the SQL queries used to generate the db
* A full creation and migration script can be built from these to make
* this a (somewhat) self-installing system
*/
/* first create the user */
CREATE USER IF NOT EXISTS 'kineotest'@'localhost' IDENTIFIED WITH mysql_native_password AS 'kineotest';GRANT SELECT, INSERT, UPDATE, DELETE, FILE ON *.* TO 'kineotest'@'localhost' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;CREATE DATABASE IF NOT EXISTS 'kineotest';GRANT ALL PRIVILEGES ON 'kineotest'.* TO 'kineotest'@'localhost';
/* change to kineo db */
use kineotest;
/* create table on db */
/* populate tables */
/* populate nations */
INSERT INTO 'nation' ('id', 'name') VALUES (NULL, 'England'), (NULL, 'Scotland'), (NULL, 'Wales'), (NULL, 'Northern Ireland');
/* populate constituency */
INSERT INTO 'constituency' ('id','name','nation_id')
VALUES
(NULL,'Aldershot',1),
(NULL,'Aldridge-Brownhills',1),
(NULL,'Altrincham and Sale West',1),
(NULL,'Amber Valley',1),
(NULL,'Arundel and South Downs',1),
(NULL,'Ashfield',1),
(NULL,'Ashford',1),
(NULL,'Ashton-under-Lyne',1),
(NULL,'Aylesbury',1),
(NULL,'Banbury',1),
(NULL,'Barking',1),
(NULL,'Barnsley Central',1),
(NULL,'Barnsley East',1),
(NULL,'Barrow and Furness',1),
(NULL,'Basildon and Billericay',1),
(NULL,'Basingstoke',1),
(NULL,'Bassetlaw',1),
(NULL,'Bath',1),
(NULL,'Batley and Spen',1),
(NULL,'Battersea',1),
(NULL,'Beaconsfield',1),
(NULL,'Beckenham',1),
(NULL,'Bedford',1),
(NULL,'Bermondsey and Old Southwark',1),
(NULL,'Berwick-upon-Tweed',1),
(NULL,'Bethnal Green and Bow',1),
(NULL,'Beverley and Holderness',1),
(NULL,'Bexhill and Battle',1),
(NULL,'Bexleyheath and Crayford',1),
(NULL,'Birkenhead',1),
(NULL,'Birmingham, Edgbaston',1),
(NULL,'Birmingham, Erdington',1),
(NULL,'Birmingham, Hall Green',1),
(NULL,'Birmingham, Hodge Hill',1),
(NULL,'Birmingham, Ladywood',1),
(NULL,'Birmingham, Northfield',1),
(NULL,'Birmingham, Perry Barr',1),
(NULL,'Birmingham, Selly Oak',1),
(NULL,'Birmingham, Yardley',1),
(NULL,'Bishop Auckland',1),
(NULL,'Blackburn',1),
(NULL,'Blackpool North and Cleveleys',1),
(NULL,'Blackpool South',1),
(NULL,'Blackley and Broughton',1),
(NULL,'Blaydon',1),
(NULL,'Blyth Valley',1),
(NULL,'Bognor Regis and Littlehampton',1),
(NULL,'Bolsover',1),
(NULL,'Bolton North East',1),
(NULL,'Bolton South East',1),
(NULL,'Bolton West',1),
(NULL,'Bootle',1),
(NULL,'Boston and Skegness',1),
(NULL,'Bosworth',1),
(NULL,'Bournemouth East',1),
(NULL,'Bournemouth West',1),
(NULL,'Bracknell',1),
(NULL,'Bradford East',1),
(NULL,'Bradford South',1),
(NULL,'Bradford West',1),
(NULL,'Braintree',1),
(NULL,'Brent Central',1),
(NULL,'Brent North',1),
(NULL,'Brentford and Isleworth',1),
(NULL,'Brentwood and Ongar',1),
(NULL,'Bridgwater and West Somerset',1),
(NULL,'Brigg and Goole',1),
(NULL,'Brighton, Kemptown',1),
(NULL,'Brighton, Pavilion',1),
(NULL,'Bristol East',1),
(NULL,'Bristol North West',1),
(NULL,'Bristol South',1),
(NULL,'Bristol West',1),
(NULL,'Broadland',1),
(NULL,'Bromley and Chislehurst',1),
(NULL,'Bromsgrove',1),
(NULL,'Broxbourne',1),
(NULL,'Broxtowe',1),
(NULL,'Buckingham',1),
(NULL,'Burnley',1),
(NULL,'Burton',1),
(NULL,'Bury North',1),
(NULL,'Bury South',1),
(NULL,'Bury St Edmunds',1),
(NULL,'Calder Valley',1),
(NULL,'Camberwell and Peckham',1),
(NULL,'Camborne and Redruth',1),
(NULL,'Cambridge',1),
(NULL,'Cannock Chase',1),
(NULL,'Canterbury',1),
(NULL,'Carlisle',1),
(NULL,'Carshalton and Wallington',1),
(NULL,'Castle Point',1),
(NULL,'Central Devon',1),
(NULL,'Central Suffolk and North Ipswich',1),
(NULL,'Charnwood',1),
(NULL,'Chatham and Aylesford',1),
(NULL,'Cheadle',1),
(NULL,'Chelmsford',1),
(NULL,'Chelsea and Fulham',1),
(NULL,'Cheltenham',1),
(NULL,'Chesham and Amersham',1),
(NULL,'Chesterfield',1),
(NULL,'Chichester',1),
(NULL,'Chingford and Woodford Green',1),
(NULL,'Chippenham',1),
(NULL,'Chipping Barnet',1),
(NULL,'Chorley',1),
(NULL,'Christchurch',1),
(NULL,'Cities of London and Westminster',1),
(NULL,'City of Chester',1),
(NULL,'City of Durham',1),
(NULL,'Clacton',1),
(NULL,'Cleethorpes',1),
(NULL,'Colchester',1),
(NULL,'Colne Valley',1),
(NULL,'Congleton',1),
(NULL,'Copeland',1),
(NULL,'Corby',1),
(NULL,'Coventry North East',1),
(NULL,'Coventry North West',1),
(NULL,'Coventry South',1),
(NULL,'Crawley',1),
(NULL,'Crewe and Nantwich',1),
(NULL,'Croydon Central',1),
(NULL,'Croydon North',1),
(NULL,'Croydon South',1),
(NULL,'Dagenham and Rainham',1),
(NULL,'Darlington',1),
(NULL,'Dartford',1),
(NULL,'Daventry',1),
(NULL,'Denton and Reddish',1),
(NULL,'Derby North',1),
(NULL,'Derby South',1),
(NULL,'Derbyshire Dales',1),
(NULL,'Devizes',1),
(NULL,'Dewsbury',1),
(NULL,'Don Valley',1),
(NULL,'Doncaster Central',1),
(NULL,'Doncaster North',1),
(NULL,'Dover',1),
(NULL,'Dudley North',1),
(NULL,'Dudley South',1),
(NULL,'Dulwich and West Norwood',1),
(NULL,'Ealing Central and Acton',1),
(NULL,'Ealing North',1),
(NULL,'Ealing, Southall',1),
(NULL,'Easington',1),
(NULL,'East Devon',1),
(NULL,'East Ham',1),
(NULL,'East Hampshire',1),
(NULL,'East Surrey',1),
(NULL,'East Worthing and Shoreham',1),
(NULL,'East Yorkshire',1),
(NULL,'Eastbourne',1),
(NULL,'Eastleigh',1),
(NULL,'Eddisbury',1),
(NULL,'Edmonton',1),
(NULL,'Ellesmere Port and Neston',1),
(NULL,'Elmet and Rothwell',1),
(NULL,'Eltham',1),
(NULL,'Enfield North',1),
(NULL,'Enfield, Southgate',1),
(NULL,'Epping Forest',1),
(NULL,'Epsom and Ewell',1),
(NULL,'Erewash',1),
(NULL,'Erith and Thamesmead',1),
(NULL,'Esher and Walton',1),
(NULL,'Exeter',1),
(NULL,'Fareham',1),
(NULL,'Faversham and Mid Kent',1),
(NULL,'Feltham and Heston',1),
(NULL,'Filton and Bradley Stoke',1),
(NULL,'Finchley and Golders Green',1),
(NULL,'Folkestone and Hythe',1),
(NULL,'Forest of Dean',1),
(NULL,'Fylde',1),
(NULL,'Gainsborough',1),
(NULL,'Garston and Halewood',1),
(NULL,'Gateshead',1),
(NULL,'Gedling',1),
(NULL,'Gillingham and Rainham',1),
(NULL,'Gloucester',1),
(NULL,'Gosport',1),
(NULL,'Grantham and Stamford',1),
(NULL,'Gravesham',1),
(NULL,'Great Grimsby',1),
(NULL,'Great Yarmouth',1),
(NULL,'Greenwich and Woolwich',1),
(NULL,'Guildford',1),
(NULL,'Hackney North and Stoke Newington',1),
(NULL,'Hackney South and Shoreditch',1),
(NULL,'Halesowen and Rowley Regis',1),
(NULL,'Halifax',1),
(NULL,'Haltemprice and Howden',1),
(NULL,'Halton',1),
(NULL,'Hammersmith',1),
(NULL,'Hampstead and Kilburn',1),
(NULL,'Harborough',1),
(NULL,'Harlow',1),
(NULL,'Harrogate and Knaresborough',1),
(NULL,'Harrow East',1),
(NULL,'Harrow West',1),
(NULL,'Hartlepool',1),
(NULL,'Harwich and North Essex',1),
(NULL,'Hastings and Rye',1),
(NULL,'Havant',1),
(NULL,'Hayes and Harlington',1),
(NULL,'Hazel Grove',1),
(NULL,'Hemel Hempstead',1),
(NULL,'Hemsworth',1),
(NULL,'Hendon',1),
(NULL,'Henley',1),
(NULL,'Hereford and South Herefordshire',1),
(NULL,'Hertford and Stortford',1),
(NULL,'Hertsmere',1),
(NULL,'Hexham',1),
(NULL,'Heywood and Middleton',1),
(NULL,'High Peak',1),
(NULL,'Hitchin and Harpenden',1),
(NULL,'Holborn and St Pancras',1),
(NULL,'Hornchurch and Upminster',1),
(NULL,'Hornsey and Wood Green',1),
(NULL,'Horsham',1),
(NULL,'Houghton and Sunderland South',1),
(NULL,'Hove',1),
(NULL,'Huddersfield',1),
(NULL,'Huntingdon',1),
(NULL,'Hyndburn',1),
(NULL,'Ilford North',1),
(NULL,'Ilford South',1),
(NULL,'Ipswich',1),
(NULL,'Isle of Wight',1),
(NULL,'Islington North',1),
(NULL,'Islington South and Finsbury',1),
(NULL,'Jarrow',1),
(NULL,'Keighley',1),
(NULL,'Kenilworth and Southam',1),
(NULL,'Kensington',1),
(NULL,'Kettering',1),
(NULL,'Kingston and Surbiton',1),
(NULL,'Kingston upon Hull East',1),
(NULL,'Kingston upon Hull North',1),
(NULL,'Kingston upon Hull West and Hessle',1),
(NULL,'Kingswood',1),
(NULL,'Knowsley',1),
(NULL,'Lancaster and Fleetwood',1),
(NULL,'Leeds Central',1),
(NULL,'Leeds East',1),
(NULL,'Leeds North East',1),
(NULL,'Leeds North West',1),
(NULL,'Leeds West',1),
(NULL,'Leicester East',1),
(NULL,'Leicester South',1),
(NULL,'Leicester West',1),
(NULL,'Leigh',1),
(NULL,'Lewes',1),
(NULL,'Lewisham, Deptford',1),
(NULL,'Lewisham East',1),
(NULL,'Lewisham West and Penge',1),
(NULL,'Leyton and Wanstead',1),
(NULL,'Lichfield',1),
(NULL,'Lincoln',1),
(NULL,'Liverpool, Riverside',1),
(NULL,'Liverpool, Walton',1),
(NULL,'Liverpool, Wavertree',1),
(NULL,'Liverpool, West Derby',1),
(NULL,'Loughborough',1),
(NULL,'Louth and Horncastle',1),
(NULL,'Ludlow',1),
(NULL,'Luton North',1),
(NULL,'Luton South',1),
(NULL,'Macclesfield',1),
(NULL,'Maidenhead',1),
(NULL,'Maidstone and The Weald',1),
(NULL,'Makerfield',1),
(NULL,'Maldon',1),
(NULL,'Manchester Central',1),
(NULL,'Manchester, Gorton',1),
(NULL,'Manchester, Withington',1),
(NULL,'Mansfield',1),
(NULL,'Meon Valley',1),
(NULL,'Meriden',1),
(NULL,'Mid Bedfordshire',1),
(NULL,'Mid Derbyshire',1),
(NULL,'Mid Dorset and North Poole',1),
(NULL,'Mid Norfolk',1),
(NULL,'Mid Sussex',1),
(NULL,'Mid Worcestershire',1),
(NULL,'Middlesbrough',1),
(NULL,'Middlesbrough South and East Cleveland',1),
(NULL,'Milton Keynes North',1),
(NULL,'Milton Keynes South',1),
(NULL,'Mitcham and Morden',1),
(NULL,'Mole Valley',1),
(NULL,'Morecambe and Lunesdale',1),
(NULL,'Morley and Outwood',1),
(NULL,'New Forest East',1),
(NULL,'New Forest West',1),
(NULL,'Newark',1),
(NULL,'Newbury',1),
(NULL,'Newcastle-under-Lyme',1),
(NULL,'Newcastle upon Tyne Central',1),
(NULL,'Newcastle upon Tyne East',1),
(NULL,'Newcastle upon Tyne North',1),
(NULL,'Newton Abbot',1),
(NULL,'Normanton, Pontefract and Castleford',1),
(NULL,'North Cornwall',1),
(NULL,'North Devon',1),
(NULL,'North Dorset',1),
(NULL,'North Durham',1),
(NULL,'North East Bedfordshire',1),
(NULL,'North East Cambridgeshire',1),
(NULL,'North East Derbyshire',1),
(NULL,'North East Hampshire',1),
(NULL,'North East Hertfordshire',1),
(NULL,'North East Somerset',1),
(NULL,'North Herefordshire',1),
(NULL,'North Norfolk',1),
(NULL,'North Shropshire',1),
(NULL,'North Somerset',1),
(NULL,'North Swindon',1),
(NULL,'North Thanet',1),
(NULL,'North Tyneside',1),
(NULL,'North Warwickshire',1),
(NULL,'North West Cambridgeshire',1),
(NULL,'North West Durham',1),
(NULL,'North West Hampshire',1),
(NULL,'North West Leicestershire',1),
(NULL,'North West Norfolk',1),
(NULL,'North Wiltshire',1),
(NULL,'Northampton North',1),
(NULL,'Northampton South',1),
(NULL,'Norwich North',1),
(NULL,'Norwich South',1),
(NULL,'Nottingham East',1),
(NULL,'Nottingham North',1),
(NULL,'Nottingham South',1),
(NULL,'Nuneaton',1),
(NULL,'Old Bexley and Sidcup',1),
(NULL,'Oldham East and Saddleworth',1),
(NULL,'Oldham West and Royton',1),
(NULL,'Orpington',1),
(NULL,'Oxford East',1),
(NULL,'Oxford West and Abingdon',1),
(NULL,'Pendle',1),
(NULL,'Penistone and Stocksbridge',1),
(NULL,'Penrith and The Border',1),
(NULL,'Peterborough',1),
(NULL,'Plymouth, Moor View',1),
(NULL,'Plymouth, Sutton and Devonport',1),
(NULL,'Poole',1),
(NULL,'Poplar and Limehouse',1),
(NULL,'Portsmouth North',1),
(NULL,'Portsmouth South',1),
(NULL,'Preston',1),
(NULL,'Pudsey',1),
(NULL,'Putney',1),
(NULL,'Rayleigh and Wickford',1),
(NULL,'Reading East',1),
(NULL,'Reading West',1),
(NULL,'Redcar',1),
(NULL,'Redditch',1),
(NULL,'Reigate',1),
(NULL,'Ribble Valley',1),
(NULL,'Richmond (Yorks)',1),
(NULL,'Richmond Park',1),
(NULL,'Rochdale',1),
(NULL,'Rochester and Strood',1),
(NULL,'Rochford and Southend East',1),
(NULL,'Romford',1),
(NULL,'Romsey and Southampton North',1),
(NULL,'Rossendale and Darwen',1),
(NULL,'Rother Valley',1),
(NULL,'Rotherham',1),
(NULL,'Rugby',1),
(NULL,'Ruislip, Northwood and Pinner',1),
(NULL,'Runnymede and Weybridge',1),
(NULL,'Rushcliffe',1),
(NULL,'Rutland and Melton',1),
(NULL,'Saffron Walden',1),
(NULL,'Salisbury',1),
(NULL,'Salford and Eccles',1),
(NULL,'Scarborough and Whitby',1),
(NULL,'Scunthorpe',1),
(NULL,'Sedgefield',1),
(NULL,'Sefton Central',1),
(NULL,'Selby and Ainsty',1),
(NULL,'Sevenoaks',1),
(NULL,'Sheffield, Brightside and Hillsborough',1),
(NULL,'Sheffield Central',1),
(NULL,'Sheffield, Hallam',1),
(NULL,'Sheffield, Heeley',1),
(NULL,'Sheffield South East',1),
(NULL,'Sherwood',1),
(NULL,'Shipley',1),
(NULL,'Shrewsbury and Atcham',1),
(NULL,'Sittingbourne and Sheppey',1),
(NULL,'Skipton and Ripon',1),
(NULL,'Sleaford and North Hykeham',1),
(NULL,'Slough',1),
(NULL,'Solihull',1),
(NULL,'Somerton and Frome',1),
(NULL,'South Basildon and East Thurrock',1),
(NULL,'South Cambridgeshire',1),
(NULL,'South Derbyshire',1),
(NULL,'South Dorset',1),
(NULL,'South East Cambridgeshire',1),
(NULL,'South East Cornwall',1),
(NULL,'South Holland and The Deepings',1),
(NULL,'South Leicestershire',1),
(NULL,'South Norfolk',1),
(NULL,'South Northamptonshire',1),
(NULL,'South Ribble',1),
(NULL,'South Shields',1),
(NULL,'South Staffordshire',1),
(NULL,'South Suffolk',1),
(NULL,'South Swindon',1),
(NULL,'South Thanet',1),
(NULL,'South West Bedfordshire',1),
(NULL,'South West Devon',1),
(NULL,'South West Hertfordshire',1),
(NULL,'South West Norfolk',1),
(NULL,'South West Surrey',1),
(NULL,'South West Wiltshire',1),
(NULL,'Southampton, Itchen',1),
(NULL,'Southampton, Test',1),
(NULL,'Southend West',1),
(NULL,'Southport',1),
(NULL,'Spelthorne',1),
(NULL,'St Albans',1),
(NULL,'St Austell and Newquay',1),
(NULL,'St Helens North',1),
(NULL,'St Helens South and Whiston',1),
(NULL,'St Ives',1),
(NULL,'Stafford',1),
(NULL,'Staffordshire Moorlands',1),
(NULL,'Stalybridge and Hyde',1),
(NULL,'Stevenage',1),
(NULL,'Stockport',1),
(NULL,'Stockton North',1),
(NULL,'Stockton South',1),
(NULL,'Stoke-on-Trent Central',1),
(NULL,'Stoke-on-Trent North',1),
(NULL,'Stoke-on-Trent South',1),
(NULL,'Stone',1),
(NULL,'Stourbridge',1),
(NULL,'Stratford-on-Avon',1),
(NULL,'Streatham',1),
(NULL,'Stretford and Urmston',1),
(NULL,'Stroud',1),
(NULL,'Suffolk Coastal',1),
(NULL,'Sunderland Central',1),
(NULL,'Surrey Heath',1),
(NULL,'Sutton and Cheam',1),
(NULL,'Sutton Coldfield',1),
(NULL,'Tamworth',1),
(NULL,'Tatton',1),
(NULL,'Taunton Deane',1),
(NULL,'Telford',1),
(NULL,'Tewkesbury',1),
(NULL,'The Cotswolds',1),
(NULL,'The Wrekin',1),
(NULL,'Thirsk and Malton',1),
(NULL,'Thornbury and Yate',1),
(NULL,'Thurrock',1),
(NULL,'Tiverton and Honiton',1),
(NULL,'Tonbridge and Malling',1),
(NULL,'Tooting',1),
(NULL,'Torbay',1),
(NULL,'Torridge and West Devon',1),
(NULL,'Totnes',1),
(NULL,'Tottenham',1),
(NULL,'Truro and Falmouth',1),
(NULL,'Tunbridge Wells',1),
(NULL,'Twickenham',1),
(NULL,'Tynemouth',1),
(NULL,'Uxbridge and South Ruislip',1),
(NULL,'Vauxhall',1),
(NULL,'Wakefield',1),
(NULL,'Wallasey',1),
(NULL,'Walsall North',1),
(NULL,'Walsall South',1),
(NULL,'Walthamstow',1),
(NULL,'Wansbeck',1),
(NULL,'Wantage',1),
(NULL,'Warley',1),
(NULL,'Warrington North',1),
(NULL,'Warrington South',1),
(NULL,'Warwick and Leamington',1),
(NULL,'Washington and Sunderland West',1),
(NULL,'Watford',1),
(NULL,'Waveney',1),
(NULL,'Wealden',1),
(NULL,'Weaver Vale',1),
(NULL,'Wellingborough',1),
(NULL,'Wells',1),
(NULL,'Welwyn Hatfield',1),
(NULL,'Wentworth and Dearne',1),
(NULL,'West Bromwich East',1),
(NULL,'West Bromwich West',1),
(NULL,'West Dorset',1),
(NULL,'West Ham',1),
(NULL,'West Lancashire',1),
(NULL,'West Suffolk',1),
(NULL,'West Worcestershire',1),
(NULL,'Westminster North',1),
(NULL,'Westmorland and Lonsdale',1),
(NULL,'Weston-Super-Mare',1),
(NULL,'Wigan',1),
(NULL,'Wimbledon',1),
(NULL,'Winchester',1),
(NULL,'Windsor',1),
(NULL,'Wirral South',1),
(NULL,'Wirral West',1),
(NULL,'Witham',1),
(NULL,'Witney',1),
(NULL,'Woking',1),
(NULL,'Wokingham',1),
(NULL,'Wolverhampton North East',1),
(NULL,'Wolverhampton South East',1),
(NULL,'Wolverhampton South West',1),
(NULL,'Worcester',1),
(NULL,'Workington',1),
(NULL,'Worsley and Eccles South',1),
(NULL,'Worthing West',1),
(NULL,'Wycombe',1),
(NULL,'Wyre and Preston North',1),
(NULL,'Wyre Forest',1),
(NULL,'Wythenshawe and Sale East',1),
(NULL,'Yeovil',1),
(NULL,'York Central',1),
(NULL,'York Outer',1),
# Scotland
(NULL,'Aberdeen North',2),
(NULL,'Aberdeen South',2),
(NULL,'Airdrie and Shotts',2),
(NULL,'Angus',2),
(NULL,'Argyll and Bute',2),
(NULL,'Ayr, Carrick and Cumnock',2),
(NULL,'Banff and Buchan',2),
(NULL,'Berwickshire, Roxburgh and Selkirk',2),
(NULL,'Caithness, Sutherland and Easter Ross',2),
(NULL,'Central Ayrshire',2),
(NULL,'Coatbridge, Chryston and Bellshill',2),
(NULL,'Cumbernauld, Kilsyth and Kirkintilloch East',2),
(NULL,'Dumfries and Galloway',2),
(NULL,'Dumfriesshire, Clydesdale and Tweeddale',2),
(NULL,'Dundee East',2),
(NULL,'Dundee West',2),
(NULL,'Dunfermline and West Fife',2),
(NULL,'East Dunbartonshire',2),
(NULL,'East Kilbride, Strathaven and Lesmahagow',2),
(NULL,'East Lothian',2),
(NULL,'East Renfrewshire',2),
(NULL,'Edinburgh East',2),
(NULL,'Edinburgh North and Leith',2),
(NULL,'Edinburgh South',2),
(NULL,'Edinburgh South West',2),
(NULL,'Edinburgh West',2),
(NULL,'Falkirk',2),
(NULL,'Glasgow Central',2),
(NULL,'Glasgow East',2),
(NULL,'Glasgow North',2),
(NULL,'Glasgow North East',2),
(NULL,'Glasgow North West',2),
(NULL,'Glasgow South',2),
(NULL,'Glasgow South West',2),
(NULL,'Glenrothes',2),
(NULL,'Gordon',2),
(NULL,'Inverclyde',2),
(NULL,'Inverness, Nairn, Badenoch and Strathspey',2),
(NULL,'Kilmarnock and Loudoun',2),
(NULL,'Kirkcaldy and Cowdenbeath',2),
(NULL,'Lanark and Hamilton East',2),
(NULL,'Linlithgow and East Falkirk',2),
(NULL,'Livingston',2),
(NULL,'Midlothian',2),
(NULL,'Moray',2),
(NULL,'Motherwell and Wishaw',2),
(NULL,'Na h-Eileanan an Iar',2),
(NULL,'North Ayrshire and Arran',2),
(NULL,'North East Fife',2),
(NULL,'Ochil and South Perthshire',2),
(NULL,'Orkney and Shetland',2),
(NULL,'Paisley and Renfrewshire North',2),
(NULL,'Paisley and Renfrewshire South',2),
(NULL,'Perth and North Perthshire',2),
(NULL,'Ross, Skye and Lochaber',2),
(NULL,'Rutherglen and Hamilton West',2),
(NULL,'Stirling',2),
(NULL,'West Aberdeenshire and Kincardine',2),
(NULL,'West Dunbartonshire',2),
# Wales
(NULL,'Aberavon',3),
(NULL,'Aberconwy',3),
(NULL,'Alyn and Deeside',3),
(NULL,'Arfon',3),
(NULL,'Blaenau Gwent',3),
(NULL,'Brecon and Radnorshire',3),
(NULL,'Bridgend',3),
(NULL,'Caerphilly',3),
(NULL,'Cardiff Central',3),
(NULL,'Cardiff North',3),
(NULL,'Cardiff South and Penarth',3),
(NULL,'Cardiff West',3),
(NULL,'Carmarthen East and Dinefwr',3),
(NULL,'Carmarthen West and South Pembrokeshire',3),
(NULL,'Ceredigion',3),
(NULL,'Clwyd South',3),
(NULL,'Clwyd West',3),
(NULL,'Cynon Valley',3),
(NULL,'Delyn',3),
(NULL,'Dwyfor Meirionnydd',3),
(NULL,'Gower',3),
(NULL,'Islwyn',3),
(NULL,'Llanelli',3),
(NULL,'Merthyr Tydfil and Rhymney',3),
(NULL,'Monmouth',3),
(NULL,'Montgomeryshire',3),
(NULL,'Neath',3),
(NULL,'Newport East',3),
(NULL,'Newport West',3),
(NULL,'Ogmore',3),
(NULL,'Pontypridd',3),
(NULL,'Preseli Pembrokeshire',3),
(NULL,'Rhondda',3),
(NULL,'Swansea East',3),
(NULL,'Swansea West',3),
(NULL,'Torfaen',3),
(NULL,'Vale of Clwyd',3),
(NULL,'Vale of Glamorgan',3),
(NULL,'Wrexham',3),
(NULL,'Ynys Môn',3),
# Northern Ireland
(NULL,'Belfast East',4),
(NULL,'Belfast North',4),
(NULL,'Belfast South',4),
(NULL,'Belfast West',4),
(NULL,'East Antrim',4),
(NULL,'East Londonderry',4),
(NULL,'Fermanagh and South Tyrone',4),
(NULL,'Foyle',4),
(NULL,'Lagan Valley',4),
(NULL,'Mid Ulster',4),
(NULL,'Newry and Armagh',4),
(NULL,'North Antrim',4),
(NULL,'North Down',4),
(NULL,'South Antrim',4),
(NULL,'South Down',4),
(NULL,'Strangford',4),
(NULL,'Upper Bann',4),
(NULL,'West Tyrone',4);
/* populate parties table */
INSERT INTO 'party' ('id', 'name')
VALUES
(NULL, 'The Conservative Party'),
(NULL, 'The Labour Party'),
(NULL, 'The Liberal Democrat Party'),
(NULL, 'The Green Party'),
(NULL, 'The Monster Raving Loony Party'),
(NULL, 'The BlackAdder Party'),
(NULL, 'The Social Communist Party');
/* populate candidates table */
/* Rather than populating the db with a huge number of random candidate data
* we'll use PHP to create a random number of candidates
* whenever a constituency is chosen that does not have any candidates.
*/
/* populate election table */
INSERT INTO `election` (`id`,`name`,`description`,`date`,`active`)
VALUES
(NULL,'Past Election','An election that happened in the past','2016-08-03 00:00:00',1),
(NULL,'Present Election','An election that should be happening soon','2017-08-09 00:00:00',1),
(NULL,'Future Election','An election that will happen in the future but which is not yet available to vote on','2020-08-09 00:00:00',0);
/* populate dummy data into user table for testing */
INSERT INTO `user` (`id`,`name`,`email`,`password`,`created`,`modified`,`confirmed`,`conf_hash`,`constituency_id`)
VALUES
(NULL,'User1','[email protected]','user1','2016-08-03 00:00:00','2016-08-03 00:00:00',1,'',32),
(NULL,'User2','[email protected]','user2','2016-08-03 00:00:00','2016-08-03 00:00:00',1,'',45),
(NULL,'User3','[email protected]','user3','2016-08-03 00:00:00','2016-08-03 00:00:00',1,'',87),
(NULL,'User4','[email protected]','user4','2016-08-03 00:00:00','2016-08-03 00:00:00',0,'9aslds8htqhe7ff7uajwn4dfe',234),
(NULL,'User5','[email protected]','user5','2016-08-03 00:00:00','2016-08-03 00:00:00',1,'',654);