SET FOREIGN_KEY_CHECKS=0;




CREATE TABLE CONTACT
(
	CONTACT_ID MEDIUMINT NOT NULL AUTO_INCREMENT,
	EMAIL VARCHAR(50),
	FIRST_NAME VARCHAR(50),
	LAST_NAME VARCHAR(50),
	STREET_ADDR1 VARCHAR(50),
	STREET_ADDR2 VARCHAR(50),
	CITY VARCHAR(50),
	STATE VARCHAR(50),
	POSTAL_CODE VARCHAR(50),
	COUNTRY CHAR(2),
	PHONE VARCHAR(50),
	PRIMARY KEY (CONTACT_ID)
) 
;


CREATE TABLE CONTACT_URL
(
	CONTACT_URL_ID MEDIUMINT NOT NULL AUTO_INCREMENT,
	CONTACT_ID MEDIUMINT NOT NULL,
	URL_PATH VARCHAR(100),
	PRIMARY KEY (CONTACT_URL_ID)
) 
;


CREATE TABLE LEGACY_CONTACT
(
	CONTACT_ID MEDIUMINT NOT NULL AUTO_INCREMENT,
	EMAIL VARCHAR(50),
	FIRST_NAME VARCHAR(50),
	LAST_NAME VARCHAR(50),
	STREET_ADDR1 VARCHAR(50),
	STREET_ADDR2 VARCHAR(50),
	CITY VARCHAR(50),
	STATE VARCHAR(50),
	POSTAL_CODE VARCHAR(50),
	COUNTRY CHAR(2),
	PHONE VARCHAR(50),
	CUSTOM_FIELD VARCHAR(100),
	PRIMARY KEY (CONTACT_ID)
) 
;



SET FOREIGN_KEY_CHECKS=1;
