<?php
$yp_create_tables = array(
	"yp_businesses" => 'CREATE TABLE IF NOT EXISTS `yp_businesses` (
		`id` int(11) NOT NULL AUTO_INCREMENT,
		`uid` varchar(16) NOT NULL,
		`yp_name` varchar(255) NOT NULL,
		`name` varchar(255) NOT NULL,
		`description` text NOT NULL,
		`website` varchar(255) NOT NULL,
		`friendly_name` varchar(255) NOT NULL,
		PRIMARY KEY (`id`),
		KEY `uid` (`uid`),
		KEY `name` (`name`),
		KEY `friendly_name` (`friendly_name`)
		) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;',
		
	"yp_businesses_categories"	=> 'CREATE TABLE IF NOT EXISTS `yp_businesses_categories` (
		`id` int(11) NOT NULL AUTO_INCREMENT,
		`business_uid` varchar(16) NOT NULL,
		`category_uid` varchar(16) NOT NULL,
		PRIMARY KEY (`id`),
		UNIQUE KEY `business_uid` (`business_uid`,`category_uid`)
		) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;',
	
	"yp_businesses_locations"	=> 'CREATE TABLE IF NOT EXISTS `yp_businesses_locations` (
		`id` int(11) NOT NULL AUTO_INCREMENT,
		`business_uid` varchar(16) NOT NULL,
		`yp_code` varchar(16) NOT NULL,
		`trade_name` varchar(255) NOT NULL,
		`trade_name_label` varchar(255) NOT NULL,
		`description` text NOT NULL,
		`address` varchar(255) NOT NULL,
		`pobox` varchar(16) NOT NULL,
		`pobox_postal_code` varchar(16) NOT NULL,
		`postal_code` varchar(16) NOT NULL,
		`location` varchar(32) NOT NULL,
		`district` varchar(32) NOT NULL,
		`district_id` int(11) NOT NULL,
		`tel1` varchar(64) NOT NULL,
		`tel2` varchar(64) NOT NULL,
		`fax1` varchar(64) NOT NULL,
		`fax2` varchar(64) NOT NULL,
		`mobile1` varchar(64) NOT NULL,
		`mobile2` varchar(64) NOT NULL,
		`emal1` varchar(64) NOT NULL,
		`email2` varchar(64) NOT NULL,
		`website` varchar(255) NOT NULL,
		`extra_lnk` text NOT NULL,
		PRIMARY KEY (`id`),
		UNIQUE KEY `business_uid` (`business_uid`,`address`,`district`),
		KEY `business_uid_2` (`business_uid`),
		KEY `district` (`district`),
		KEY `district_id` (`district_id`)
		) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;',
	
	"yp_categories"	=> 'CREATE TABLE IF NOT EXISTS `yp_categories` (
		`id` int(11) NOT NULL AUTO_INCREMENT,
		`uid` varchar(16) NOT NULL,
		`code` varchar(16) NOT NULL,
		`yp_title_en` varchar(255) NOT NULL,
		`yp_title_el` varchar(255) NOT NULL,
		`cy_admin_title_en` varchar(255) NOT NULL,
		`cy_title_en` varchar(255) NOT NULL,
		`cy_friendly_name_en` varchar(255) NOT NULL,
		`cy_admin_title_el` varchar(255) NOT NULL,
		`cy_title_el` varchar(255) NOT NULL,
		`cy_friendly_name_el` varchar(255) NOT NULL,
		PRIMARY KEY (`id`),
		KEY `uid` (`uid`),
		KEY `cy_admin_title_en` (`cy_admin_title_en`),
		KEY `cy_title_en` (`cy_title_en`)
		) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;',
	
	"yp_categories_links"	=> 'CREATE TABLE IF NOT EXISTS `yp_categories_links` (
		`id` int(11) NOT NULL AUTO_INCREMENT,
		`uid` varchar(16) NOT NULL,
		`title` varchar(255) NOT NULL,
		`friendly_name` varchar(255) NOT NULL,
		`lang` varchar(3) NOT NULL,
		`word` varchar(32) NOT NULL,
		`district` varchar(64) NOT NULL,
		`location` varchar(64) NOT NULL,
		PRIMARY KEY (`id`),
		KEY `uid` (`uid`),
		KEY `title` (`title`)
		) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
);
?>