Index: trunk/extensions/Wikimania/sql/tables.sql |
— | — | @@ -0,0 +1,75 @@ |
| 2 | +-- Schema for Wikimania extension |
| 3 | +-- TODO/FIXME: Get rid of the icky icky enums and sets. |
| 4 | + |
| 5 | +-- Primary registration table |
| 6 | +CREATE TABLE /*_*/registration ( |
| 7 | + -- Unique row id, for sorting and such |
| 8 | + reg_id unsigned int not null primary key auto_increment, |
| 9 | + |
| 10 | + -- A unique registration identifier, probably something md5()'d |
| 11 | + reg_code varchar(255) not null, |
| 12 | + |
| 13 | + -- Timestamp registration was submitted |
| 14 | + reg_timestamp varbinary(16), |
| 15 | + |
| 16 | + -- Current status of the registration, see WikimaniaRegistration::getPossibleStatuses() |
| 17 | + reg_status varchar(12) not null, |
| 18 | + |
| 19 | + reg_fname varchar(255) not null, |
| 20 | + reg_lname varchar(255) not null, |
| 21 | + reg_sex varchar(1) not null, |
| 22 | + reg_country varchar(4) not null, |
| 23 | + reg_langn varchar(4) not null, |
| 24 | + reg_lang1 varchar(4), |
| 25 | + reg_lang1_level enum('1','2','3','4'), |
| 26 | + reg_lang2 varchar(4), |
| 27 | + reg_lang2_level enum('1','2','3','4'), |
| 28 | + reg_lang2 varchar(4), |
| 29 | + reg_lang2_level enum('1','2','3','4'), |
| 30 | + reg_wiki_id varchar(255) not null, |
| 31 | + reg_wiki_language varchar(12) not null, |
| 32 | + reg_wiki_project varchar(12) not null, |
| 33 | + reg_email varchar(255) not null, |
| 34 | + reg_showname set('1','2','3') not null, |
| 35 | + reg_custom_showname varchar(255), |
| 36 | + reg_shirt_size enum('XXS','XS','S','M','L','XL','XXL','XXXL') not null, |
| 37 | + reg_shirt_color enum('W','B') not null, |
| 38 | + reg_food_preference enum('','1','2','3') not null, |
| 39 | + reg_food_other varchar(255), |
| 40 | + reg_visa_assistance tinyint(1) not null, |
| 41 | + reg_nationality varchar(4), |
| 42 | + reg_passport varchar(30), |
| 43 | + reg_passport_valid varbinary(16), |
| 44 | + reg_passport_issued varchar(255), |
| 45 | + reg_birthday varbinary(16), |
| 46 | + reg_countryofbirth varchar(4), |
| 47 | + reg_homeaddress blob, |
| 48 | + reg_visa_description blob, |
| 49 | + reg_discount_code varchar(16), |
| 50 | + reg_attendance_cost decimal(10,2) not null, |
| 51 | + reg_accommodation_cost decimal(10,2) not null, |
| 52 | + reg_vat_cost decimal(10,2) not null, |
| 53 | + reg_cost_total decimal(10,2) not null, |
| 54 | + reg_currency varchar(4) not null, |
| 55 | + reg_paypal tinyint(1) not null, |
| 56 | + reg_cost_paid decimal(10,2) not null |
| 57 | +) /**$wgDBTableOptions*/; |
| 58 | +CREATE UNIQUE INDEX /*i*/reg_code ON /*_*/registrations (reg_code); |
| 59 | + |
| 60 | +-- Table to handle date(s) people register for |
| 61 | +CREATE TABLE registration_dates ( |
| 62 | + rd_id unsigned int not null primary key auto_increment, |
| 63 | + rd_reg_id unsigned int not null, |
| 64 | + rd_date varbinary(16) not null |
| 65 | +) /**$wgDBTableOptions*/; |
| 66 | + |
| 67 | +-- Table to handle hotel reservations |
| 68 | +CREATE TABLE /*_*/registration_hotels ( |
| 69 | + rh_id unsigned int not null primary key auto_increment, |
| 70 | + rh_reg_id unsigned int not null, |
| 71 | + rh_hotel varchar(255) not null, |
| 72 | + rh_date varbinary(16) not null, |
| 73 | + rh_occupancy int(1) not null, |
| 74 | + rh_partner varchar(255), |
| 75 | + rh_notes blob |
| 76 | +) /**$wgDBTableOptions*/; |
Property changes on: trunk/extensions/Wikimania/sql/tables.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 77 | + native |