<?php
$yp_create_tables = array(
	"bl_businesses" => 'CREATE TABLE IF NOT EXISTS `bl_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,
  `website_error` varchar(32) DEFAULT NULL,
  `friendly_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`),
  KEY `name` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;',
		
	"bl_businesses_categories"	=> 'CREATE TABLE IF NOT EXISTS `bl_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_category` (`business_uid`,`category_uid`),
  KEY `business_uid` (`business_uid`),
  KEY `category_uid` (`category_uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1',
	
	"bl_businesses_locations"	=> 'CREATE TABLE IF NOT EXISTS `bl_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`),
  KEY `location` (`location`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1',
	
	"bl_businesses_locations_tr" => "CREATE TABLE IF NOT EXISTS `bl_businesses_locations_tr` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lang` varchar(6) NOT NULL,
  `location_id` int(11) NOT NULL,
  `business_uid` varchar(16) NOT NULL,
  `trade_name` varchar(255) NOT NULL,
  `trade_name_label` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  `location` varchar(32) NOT NULL,
  `district` varchar(32) NOT NULL,
  `district_id` int(11) NOT NULL,
  `manual_tr` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `district` (`district`),
  KEY `district_id` (`district_id`),
  KEY `location` (`location`),
  KEY `location_id` (`location_id`),
  KEY `lang` (`lang`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
	
	"bl_businesses_tr" => "CREATE TABLE IF NOT EXISTS `bl_businesses_tr` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` varchar(16) NOT NULL,
  `name` varchar(255) NOT NULL,
  `friendly_name` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `lang` varchar(6) NOT NULL,
  `manual_tr` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`),
  KEY `name` (`name`),
  KEY `lang` (`lang`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
	
	"bl_categories"	=> 'CREATE TABLE IF NOT EXISTS `bl_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,
  `cy_description_en` text NOT NULL,
  `cy_keywords_en` 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;',
	
	"bl_categories_links"	=> 'CREATE TABLE IF NOT EXISTS `bl_categories_links` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` varchar(16) NOT NULL,
  `district` varchar(64) NOT NULL,
  `location` varchar(64) NOT NULL,
  `title` varchar(255) NOT NULL,
  `friendly_name` varchar(255) NOT NULL,
  `lang` varchar(6) NOT NULL,
  `word` varchar(32) NOT NULL,
  `cy_description_en` text NOT NULL,
  `cy_keywords_en` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;',
	
	"bl_categories_links_tr" => "CREATE TABLE IF NOT EXISTS `bl_categories_links_tr` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `alias_id` int(11) NOT NULL,
  `uid` varchar(16) NOT NULL,
  `district` varchar(64) NOT NULL,
  `location` varchar(64) NOT NULL,
  `title` varchar(255) NOT NULL,
  `friendly_name` varchar(255) NOT NULL,
  `lang` varchar(6) NOT NULL,
  `word` varchar(32) NOT NULL,
  `cy_description` text NOT NULL,
  `cy_keywords` varchar(255) NOT NULL,
  `manual_tr` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;"
);
?>