#
# Create a MySQL Referral Type Look-up Table.  
#
# 2007-05  http://kimbriggs.com/computers/
#
# Table can hold over 65,000 referral types
# Typically will track sources of entries in a Contacts table
# Add and/or subtract lines in insert statement to match requirements
#

drop table if exists referral_type;


create table referral_type 
(
referral_type_id      smallint      unsigned not null auto_increment comment 'PK: Unique referral type ID',
referral_type         varchar(32)   not null comment 'Referral type (website, newsletter, event, etc.)',
referral_type_abbr    varchar(8)    comment 'Optional abbreviation for referral type',

primary key (referral_type_id)
);


insert into referral_type
(referral_type_id, referral_type)
values
(NULL, 'OTHER'),
(NULL, 'event'),
(NULL, 'friend'),
(NULL, 'newsletter'),
(NULL, 'radio'),
(NULL, 'newspaper'),
(NULL, 'poster'),
(NULL, 'television'),
(NULL, 'church or club'),
(NULL, 'website'),
(NULL, 'internal')
;
