
INSERT INTO `prefix_settings` (`name`, `value`) VALUES ('PreviousChatTranscripts', '-1');
INSERT INTO `prefix_settings` (`name`, `value`) VALUES ('InitiateChatAuto', '-1');

DROP TABLE IF EXISTS `prefix_countries`;
CREATE TABLE IF NOT EXISTS `prefix_countries` (
  `code` char(2) NOT NULL default '',
  `country` varchar(50) NOT NULL default '',
  `dial` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`code`)
) ENGINE=MyISAM /*!40101 CHARACTER SET=utf8 COLLATE utf8_unicode_ci */;

INSERT INTO `prefix_countries` (`code`,`country`,`dial`) VALUES
 ('AC','ASCENSION ISLAND','247'),
 ('AD','ANDORRA','376'),
 ('AE','UNITED ARAB EMIRATES','971'),
 ('AF','AFGHANISTAN','93'),
 ('AG','ANTIGUA AND BARBUDA','1-268'),
 ('AI','ANGUILLA','1-264'),
 ('AL','ALBANIA','355'),
 ('AM','ARMENIA','374'),
 ('AN','NETHERLANDS ANTILLES','599'),
 ('AO','ANGOLA','244'),
 ('AQ','ANTARCTICA','672'),
 ('AR','ARGENTINA','54'),
 ('AS','AMERICAN SAMOA','1-684'),
 ('AT','AUSTRIA','43'),
 ('AU','AUSTRALIA','61'),
 ('AW','ARUBA','297'),
 ('AX','ALAND ISLANDS','358 (18)'),
 ('AZ','AZERBAIJAN','994'),
 ('BA','BOSNIA AND HERZEGOVINA','387'),
 ('BB','BARBADOS','1-246'),
 ('BD','BANGLADESH','880'),
 ('BE','BELGIUM','32'),
 ('BF','BURKINA FASO','226'),
 ('BG','BULGARIA','359'),
 ('BH','BAHRAIN','973'),
 ('BI','BURUNDI','257'),
 ('BJ','BENIN','229'),
 ('BM','BERMUDA','1-441'),
 ('BN','BRUNEI DARUSSALAM','673'),
 ('BO','BOLIVIA','591'),
 ('BR','BRAZIL','55'),
 ('BS','BAHAMAS','1-242'),
 ('BT','BHUTAN','975'),
 ('BV','BOUVET ISLAND','47'),
 ('BW','BOTSWANA','267'),
 ('BY','BELARUS','375'),
 ('BZ','BELIZE','501'),
 ('CA','CANADA','1'),
 ('CC','COCOS (KEELING) ISLANDS','61-891'),
 ('CD','CONGO, THE DEMOCRATIC REPUBLIC OF THE','243'),
 ('CF','CENTRAL AFRICAN REPUBLIC','236'),
 ('CG','CONGO, REPUBLIC OF THE','242'),
 ('CH','SWITZERLAND','41'),
 ('CI','COTE D\'IVOIRE', '225');
INSERT INTO `prefix_countries` (`code`,`country`,`dial`) VALUES
 ('CK','COOK ISLANDS','682'),
 ('CL','CHILE','56'),
 ('CM','CAMEROON','237'),
 ('CN','CHINA','86'),
 ('CO','COLOMBIA','57'),
 ('CR','COSTA RICA','506'),
 ('CU','CUBA','53'),
 ('CV','CAPE VERDE','238'),
 ('CX','CHRISTMAS ISLAND','61'),
 ('CY','CYPRUS','357'),
 ('CZ','CZECH REPUBLIC','420'),
 ('DE','GERMANY','49'),
 ('DJ','DJIBOUTI','253'),
 ('DK','DENMARK','45'),
 ('DM','DOMINICA','1-767'),
 ('DO','DOMINICAN REPUBLIC','1'),
 ('DZ','ALGERIA','213'),
 ('EC','ECUADOR','593'),
 ('EE','ESTONIA','372'),
 ('EG','EGYPT','20'),
 ('EH','WESTERN SAHARA','212'),
 ('ER','ERITREA','291'),
 ('ES','SPAIN','34'),
 ('ET','ETHIOPIA','251'),
 ('FI','FINLAND','358'),
 ('FJ','FIJI','679'),
 ('FK','FALKLAND ISLANDS ( MALVINAS )','500'),
 ('FM','MICRONESIA, FEDERATED STATES OF','691'),
 ('FO','FAROE ISLANDS','298'),
 ('FR','FRANCE','33'),
 ('GA','GABON','241'),
 ('GB','UNITED KINGDOM','44'),
 ('GD','GRENADA','1-473'),
 ('GE','GEORGIA','995'),
 ('GF','FRENCH GUIANA','594'),
 ('GH','GHANA','233'),
 ('GI','GIBRALTAR','350'),
 ('GL','GREENLAND','299'),
 ('GM','GAMBIA','220'),
 ('GN','GUINEA','224'),
 ('GP','GUADELOUPE','590'),
 ('GQ','EQUATORIAL GUINEA','240'),
 ('GR','GREECE','30'),
 ('GS','SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS','');
INSERT INTO `prefix_countries` (`code`,`country`,`dial`) VALUES
 ('GT','GUATEMALA','502'),
 ('GU','GUAM','1-671'),
 ('GW','GUINEA-BISSAU','245'),
 ('GY','GUYANA','592'),
 ('HK','HONG KONG','852'),
 ('HM','HEARD ISLAND AND MCDONALD ISLANDS','61'),
 ('HN','HONDURAS','504'),
 ('HR','CROATIA','385'),
 ('HT','HAITI','509'),
 ('HU','HUNGARY','36'),
 ('ID','INDONESIA','62'),
 ('IE','IRELAND, REPUBLIC OF','353'),
 ('IL','ISRAEL','972'),
 ('IN','INDIA','91'),
 ('IO','BRITISH INDIAN OCEAN TERRITORY','246'),
 ('IQ','IRAQ','964'),
 ('IR','IRAN, ISLAMIC REPUBLIC OF','98'),
 ('IS','ICELAND','354'),
 ('IT','ITALY','39'),
 ('JM','JAMAICA','1-876'),
 ('JO','JORDAN','962'),
 ('JP','JAPAN','81'),
 ('KE','KENYA','254'),
 ('KG','KYRGYZSTAN','996'),
 ('KH','CAMBODIA','855'),
 ('KI','KIRIBATI','686'),
 ('KM','COMOROS','269'),
 ('KN','SAINT KITTS AND NEVIS','1-869'),
 ('KP','KOREA, DEMOCRATIC PEOPLE\'S REPUBLIC OF','850'),
 ('KR','KOREA, REPUBLIC OF','82'),
 ('KW','KUWAIT','965'),
 ('KY','CAYMAN ISLANDS','1-345'),
 ('KZ','KAZAKHSTAN','7'),
 ('LA','LAO PEOPLE\'S DEMOCRATIC REPUBLIC','856'),
 ('LB','LEBANON','961'),
 ('LC','SAINT LUCIA','1-758'),
 ('LI','LIECHTENSTEIN','423'),
 ('LK','SRI LANKA','94'),
 ('LR','LIBERIA','231'),
 ('LS','LESOTHO','266'),
 ('LT','LITHUANIA','370'),
 ('LU','LUXEMBOURG','352');
INSERT INTO `prefix_countries` (`code`,`country`,`dial`) VALUES
 ('LV','LATVIA','371'),
 ('LY','LIBYAN ARAB JAMAHIRIYA','218'),
 ('MA','MOROCCO','212'),
 ('MC','MONACO','377'),
 ('MD','MOLDOVA, REPUBLIC OF','373'),
 ('ME','MONTENEGRO, REPUBLIC OF','382'),
 ('MG','MADAGASCAR','261'),
 ('MH','MARSHALL ISLANDS','692'),
 ('MK','MACEDONIA, REPUBLIC OF','389'),
 ('ML','MALI','223'),
 ('MM','MYANMAR','95'),
 ('MN','MONGOLIA','976'),
 ('MO','MACAU','853'),
 ('MP','NORTHERN MARIANA ISLANDS','1-670'),
 ('MQ','MARTINIQUE','596'),
 ('MR','MAURITANIA','222'),
 ('MS','MONTSERRAT','1-664'),
 ('MT','MALTA','356'),
 ('MU','MAURITIUS','230'),
 ('MV','MALDIVES','960'),
 ('MW','MALAWI','265'),
 ('MX','MEXICO','52'),
 ('MY','MALAYSIA','60'),
 ('MZ','MOZAMBIQUE','258'),
 ('NA','NAMIBIA','264'),
 ('NC','NEW CALEDONIA','687'),
 ('NE','NIGER','227'),
 ('NF','NORFOLK ISLAND','672-3'),
 ('NG','NIGERIA','234'),
 ('NI','NICARAGUA','505'),
 ('NL','NETHERLANDS','31'),
 ('NO','NORWAY','47'),
 ('NP','NEPAL','977'),
 ('NR','NAURU','674'),
 ('NU','NIUE','683'),
 ('NZ','NEW ZEALAND','64'),
 ('OM','OMAN','968'),
 ('PA','PANAMA','507'),
 ('PE','PERU','51'),
 ('PF','FRENCH POLYNESIA','689'),
 ('PG','PAPUA NEW GUINEA','675'),
 ('PH','PHILIPPINES','63'),
 ('PK','PAKISTAN','92'),
 ('PL','POLAND','48'),
 ('PM','SAINT PIERRE AND MIQUELON','508');
INSERT INTO `prefix_countries` (`code`,`country`,`dial`) VALUES
 ('PN','PITCAIRN','64'),
 ('PR','PUERTO RICO','1'),
 ('PS','PALESTINIAN TERRITORY, OCCUPIED',''),
 ('PT','PORTUGAL','351'),
 ('PW','PALAU','680'),
 ('PY','PARAGUAY','595'),
 ('QA','QATAR','974'),
 ('RE','REUNION','262'),
 ('RO','ROMANIA','40'),
 ('RS','SERBIA, REPUBLIC OF','381'),
 ('RU','RUSSIAN FEDERATION','7'),
 ('RW','RWANDA','250'),
 ('SA','SAUDI ARABIA','966'),
 ('SB','SOLOMON ISLANDS','677'),
 ('SC','SEYCHELLES','248'),
 ('SD','SUDAN','249'),
 ('SE','SWEDEN','46'),
 ('SG','SINGAPORE','65'),
 ('SH','SAINT HELENA','290'),
 ('SI','SLOVENIA','386'),
 ('SJ','SVALBARD AND JAN MAYEN','47'),
 ('SK','SLOVAKIA','421'),
 ('SL','SIERRA LEONE','232'),
 ('SM','SAN MARINO','378'),
 ('SN','SENEGAL','221'),
 ('SO','SOMALIA','252'),
 ('SR','SURINAME','597'),
 ('ST','SAO TOME AND PRINCIPE','239'),
 ('SV','EL SALVADOR','503'),
 ('SY','SYRIAN ARAB REPUBLIC','963'),
 ('SZ','SWAZILAND','268'),
 ('TC','TURKS AND CAICOS ISLANDS','1-649'),
 ('TD','CHAD','235'),
 ('TF','FRENCH SOUTHERN TERRITORIES',''),
 ('TG','TOGO','228'),
 ('TH','THAILAND','66'),
 ('TJ','TAJIKISTAN','992'),
 ('TK','TOKELAU','690'),
 ('TL','TIMOR - LESTE ( EAST TIMOR )', '670'),
 ('TM','TURKMENISTAN','993'),
 ('TN','TUNISIA','216'),
 ('TO','TONGA','676'),
 ('TR','TURKEY','90'),
 ('TT','TRINIDAD AND TOBAGO','1-868');
INSERT INTO `prefix_countries` (`code`,`country`,`dial`) VALUES
 ('TV','TUVALU','688'),
 ('TW','TAIWAN, PROVINCE OF CHINA','886'),
 ('TZ','TANZANIA, UNITED REPUBLIC OF','255'),
 ('UA','UKRAINE','380'),
 ('UG','UGANDA','256'),
 ('UK','UNITED KINGDOM','44'),
 ('UM','UNITED STATES MINOR OUTLYING ISLANDS','1'),
 ('US','UNITED STATES','1'),
 ('UY','URUGUAY','598'),
 ('UZ','UZBEKISTAN','998'),
 ('VA','HOLY SEE ( ATICAN CITY STATE )','39'),
 ('VC','SAINT VINCENT AND THE GRENADINES','1-784'),
 ('VE','VENEZUELA','58'),
 ('VG','VIRGIN ISLANDS, BRITISH','1-284'),
 ('VI','VIRGIN ISLANDS, UNITED STATES','1-340'),
 ('VN','VIETNAM','84'),
 ('VU','VANUATU','678'),
 ('WF','WALLIS AND FUTUNA','681'),
 ('WS','SAMOA','685'),
 ('YE','YEMEN','967'),
 ('YT','MAYOTTE','262'),
 ('ZA','SOUTH AFRICA','27'),
 ('ZM','ZAMBIA','260'),
 ('ZW','ZIMBABWE','263');


DROP TABLE IF EXISTS `prefix_callback`;
CREATE TABLE IF NOT EXISTS `prefix_callback` (
  `id` bigint(20) NOT NULL auto_increment,
  `datetime` datetime,
  `name` varchar(50) NOT NULL default '',
  `email` varchar(100) NOT NULL default '',
  `country` varchar(150) NOT NULL default '',
  `timezone` varchar(5) NOT NULL default '',
  `dial` varchar(5) NOT NULL default '',
  `telephone` varchar(20) NOT NULL default '',
  `message` text NOT NULL,
  `operator` bigint(20) NOT NULL default '0',
  `status` int(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM /*!40101 CHARACTER SET=utf8 COLLATE utf8_unicode_ci */;


DROP TABLE IF EXISTS `prefix_orderproducts`;
CREATE TABLE IF NOT EXISTS `prefix_orderproducts` (
  `id` bigint(20) NOT NULL auto_increment,
  `order` varchar(50) NOT NULL default '',
  `product` varchar(50) NOT NULL default '',
  `category` varchar(100) NOT NULL default '',
  `price` double NOT NULL default '0',
  `quantity` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM /*!40101 CHARACTER SET=utf8 COLLATE utf8_unicode_ci */;

DROP TABLE IF EXISTS `prefix_orders`;
CREATE TABLE IF NOT EXISTS `prefix_orders` (
  `id` bigint(20) NOT NULL auto_increment,
  `order` varchar(50) NOT NULL default '',
  `request` bigint(20) NOT NULL default '0',
  `datetime` datetime,
  `affiliation` varchar(100) NOT NULL default '',
  `total` double NOT NULL default '0',
  `tax` double NOT NULL default '0',
  `shipping` double NOT NULL default '0',
  `city` varchar(100) NOT NULL default '',
  `state` varchar(100) NOT NULL default '',
  `country` varchar(150) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `order` (`order`)
) ENGINE=MyISAM /*!40101 CHARACTER SET=utf8 COLLATE utf8_unicode_ci */;

DROP TABLE IF EXISTS `prefix_products`;
CREATE TABLE IF NOT EXISTS `prefix_products` (
  `id` bigint(20) NOT NULL auto_increment,
  `code` varchar(50) NOT NULL default '',
  `name` varchar(150) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=MyISAM /*!40101 CHARACTER SET=utf8 COLLATE utf8_unicode_ci */;

ALTER TABLE `prefix_users` ADD `image` TEXT NOT NULL AFTER `department`;
ALTER TABLE `prefix_users` ADD `updated` DATETIME NOT NULL AFTER `refresh`;

# Post v3.0 Beta Release
# ALTER TABLE `prefix_users` CHANGE `password` VARCHAR(128) NOT NULL
