/*Export of the extension countries.node*/

DELETE FROM `#__translation_en` WHERE `auto` = 1 AND `imac` IN ('1206961922ESPA','1206732392OZUS','1298350943JNMO','1225317223AXHH','1298350895GOOH','1398436917DTKC','1206732392OZVB','1298350895GOOG','1206732372QTKN','1357697370EVGV','1298350896NUAG','1398536102QVLB','1298350896NUAI','1298350896NUAJ','1304525968YBL','1298350943JNMK','1398536102QVLC','1298350943JNMM','1298350943JNMN','1206732361LXFE','1206732391QBUR','1206732399EINF','1206732372QTKL','1206732361LXFD','1206732393CXVV','1242282449PIPC','1206732399EINB','1228820287MBVC','1206732392OZUP','1206732400OWXG','1302767547EOHF','1302767547EOHG','1302767548FHJQ','1206732392OZVA','1206964391FHVS','1206961869IGND','1207306697RNMA','1207411373HFUG','1241769455CJUR','1206961869IGNP','1242178310INRJ','1206961922ESOZ','1206732346KLSC','1298350896NUAK','1298350943JNMP','1298350943JNMR','1298350943JNMS','1298350943JNMT','1298350943JNMU','1298350943JNMV','1298350943JNMW','1298350943JNMX','1298350943JNMZ','1298350896NUAN','1298350896NUAO','1359546778AIBN','1359546778AIBO','1428415779LUNN' );
DELETE `#__dataset_constraints`.* FROM `#__dataset_tables` LEFT JOIN `#__dataset_constraints` ON `#__dataset_constraints`.`dbtid` = `#__dataset_tables`.`dbtid` WHERE `#__dataset_tables`.`namekey` IN ('joobi.countries','country.language','joobi.states') ;
DELETE `#__dataset_columns`.* FROM `#__dataset_tables` LEFT JOIN `#__dataset_columns` ON `#__dataset_columns`.`dbtid` = `#__dataset_tables`.`dbtid` WHERE `#__dataset_tables`.`namekey` IN ('joobi.countries','country.language','joobi.states','joobi.languages','model.trans','layout.multiformstrans','layout.mlinkstrans','layout.listingstrans','layout.trans','eguillage.trans') AND `#__dataset_columns`.`namekey` NOT IN ('199lgid','199code','199premium','200ctyid','200isocod2','200isocod3','200name','200namekey','200numcode','199name','199main','199publish','199real','481yid','481lgid','481name','481description','482fid','482lgid','482name','482description','484lid','484lgid','484name','485mid','485lgid','485name','484description','199rtl','481wname','481wdescription','199availadmin','199availsite','618sid','618lgid','618name','199locale','199localeconv','714ctrid','714lgid','name714','description714','description485','auto481','fromlgid481','auto482','fromlgid482','auto484','fromlgid484','auto485','fromlgid485','auto618','fromlgid618','auto714','fromlgid714','734ctyid','734lgid','ordering734','timezone200','publish200','882stateid','name882','namekey882','code2882','code3882','publish882','ctyid882','core882','core200','ordering200','ordering882','modified200','core199','automatic199','message485') AND `#__dataset_columns`.`core` = 1  ;
DELETE `#__dataset_foreign`.* FROM `#__dataset_columns` LEFT JOIN `#__dataset_foreign` ON `#__dataset_foreign`.`feid` = `#__dataset_columns`.`dbcid` WHERE `#__dataset_columns`.`namekey` IN ('734ctyid','734lgid','namekey882','ctyid882') AND `#__dataset_foreign`.`namekey` NOT IN ('FK_country.language_ctyid','FK_country.language_lgid','882_ctyid_200','882_namekey_198') ;
DELETE `#__translation_reference`.* FROM `#__extension_node` LEFT JOIN `#__translation_reference` ON `#__translation_reference`.`wid` = `#__extension_node`.`wid` WHERE `#__extension_node`.`namekey` IN ('countries.node') ;
SET @rolid_0 = (1);
SET @pk_549_200 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='joobi.countries' LIMIT 1 );
SET @pk_549_734 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='country.language' LIMIT 1 );
SET @pk_549_882 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='joobi.states' LIMIT 1 );
SET @pk_549_199 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='joobi.languages' LIMIT 1 );
SET @pk_549_618 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='model.trans' LIMIT 1 );
SET @pk_549_482 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.multiformstrans' LIMIT 1 );
SET @pk_549_485 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.mlinkstrans' LIMIT 1 );
SET @pk_549_484 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.listingstrans' LIMIT 1 );
SET @pk_549_313 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='zones.countries' LIMIT 1 );
SET @pk_549_481 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.trans' LIMIT 1 );
SET @pk_549_714 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='eguillage.trans' LIMIT 1 );
REPLACE INTO `#__dataset_tables` (`name`,`namekey`,`dbtid`,`prefix`,`version`,`rolid`,`level`,`type`,`pkey`,`suffix`,`group`,`domain`,`export`,`exportdelete`,`noaudit`,`engine`) VALUES ('joobi_countries','joobi.countries',@pk_549_200,'','1.0.0',@rolid_0,'0','1','ctyid','countries','joobi','51','2','0','0','7');
REPLACE INTO `#__dataset_tables` (`name`,`namekey`,`dbtid`,`prefix`,`version`,`rolid`,`level`,`type`,`pkey`,`suffix`,`group`,`domain`,`export`,`exportdelete`,`noaudit`,`engine`) VALUES ('country_language','country.language',@pk_549_734,'','',@rolid_0,'0','30','ctyid,lgid','language','country','51','2','0','0','7'),('joobi_states','joobi.states',@pk_549_882,'','',@rolid_0,'0','1','stateid','states','joobi','51','2','0','0','7'),('joobi_languages','joobi.languages',@pk_549_199,'','1.0.0',@rolid_0,'0','1','lgid','languages','joobi','51','2','0','0','7'),('model_trans','model.trans',@pk_549_618,'','1.0.0',@rolid_0,'0','20','sid,lgid','trans','model','9','0','0','1','7'),('layout_multiformstrans','layout.multiformstrans',@pk_549_482,'','1.0.0',@rolid_0,'0','20','fid,lgid','multiformstrans','layout','9','0','0','1','7'),('layout_mlinkstrans','layout.mlinkstrans',@pk_549_485,'','1.0.0',@rolid_0,'0','20','mid,lgid','mlinkstrans','layout','9','0','0','1','7'),('layout_listingstrans','layout.listingstrans',@pk_549_484,'','1.0.0',@rolid_0,'0','20','lid,lgid','listingstrans','layout','9','0','0','1','7'),('zones_countries','zones.countries',@pk_549_313,'','1.0.0',@rolid_0,'0','1','ctyid,zoneid,stateid','countries','zones','51','2','0','0','7'),('layout_trans','layout.trans',@pk_549_481,'','1.0.0',@rolid_0,'0','20','yid,lgid','trans','layout','9','0','0','1','7'),('eguillage_trans','eguillage.trans',@pk_549_714,'','',@rolid_0,'0','20','ctrid,lgid','trans','eguillage','9','0','0','1','7');
SET @dbtid_1 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='joobi.countries' LIMIT 1);
SET @dbtid_2 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='country.language' LIMIT 1);
SET @dbtid_3 = ( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='joobi.states' LIMIT 1);
SET @pk_454_48166 = ( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='UK_200_namekey' LIMIT 1 );
SET @pk_454_65562 = ( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='PK_joobi_countries' LIMIT 1 );
SET @pk_454_65663 = ( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='PK_country_language' LIMIT 1 );
SET @pk_454_65793 = ( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='PK_joobi_states' LIMIT 1 );
SET @pk_454_65936 = ( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='UK_code3_ctryid' LIMIT 1 );
REPLACE INTO `#__dataset_constraints` (`ctid`,`type`,`namekey`,`dbtid`) VALUES (@pk_454_48166,'1','UK_200_namekey',@dbtid_1);
REPLACE INTO `#__dataset_constraints` (`ctid`,`type`,`namekey`,`dbtid`) VALUES (@pk_454_65562,'3','PK_joobi_countries',@dbtid_1),(@pk_454_65663,'3','PK_country_language',@dbtid_2),(@pk_454_65793,'3','PK_joobi_states',@dbtid_3),(@pk_454_65936,'1','UK_code3_ctryid',@dbtid_3);
SET @pk_616_1929 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200ctyid' LIMIT 1 );
SET @pk_616_1933 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200namekey' LIMIT 1 );
SET @pk_616_7030 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='734ctyid' LIMIT 1 );
SET @pk_616_7031 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='734lgid' LIMIT 1 );
SET @pk_616_8026 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='882stateid' LIMIT 1 );
SET @pk_616_8030 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='code3882' LIMIT 1 );
SET @pk_616_8032 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='ctyid882' LIMIT 1 );
SET @pk_616_1698 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='199lgid' LIMIT 1 );
SET @pk_616_1897 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='198namekey' LIMIT 1 );
SET @pk_616_8028 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='namekey882' LIMIT 1 );
SET @pk_616_1930 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200isocod2' LIMIT 1 );
SET @pk_616_1931 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200isocod3' LIMIT 1 );
SET @pk_616_1932 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200name' LIMIT 1 );
SET @pk_616_1934 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200numcode' LIMIT 1 );
SET @pk_616_7032 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='ordering734' LIMIT 1 );
SET @pk_616_7048 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='timezone200' LIMIT 1 );
SET @pk_616_8025 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='publish200' LIMIT 1 );
SET @pk_616_8027 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='name882' LIMIT 1 );
SET @pk_616_8029 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='code2882' LIMIT 1 );
SET @pk_616_8031 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='publish882' LIMIT 1 );
SET @pk_616_8760 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='core882' LIMIT 1 );
SET @pk_616_8761 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='core200' LIMIT 1 );
SET @pk_616_8922 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='ordering200' LIMIT 1 );
SET @pk_616_8923 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='ordering882' LIMIT 1 );
SET @pk_616_8945 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='modified200' LIMIT 1 );
SET @pk_616_6039 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='618name' LIMIT 1 );
SET @pk_616_3412 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='482name' LIMIT 1 );
SET @pk_616_3413 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='482description' LIMIT 1 );
SET @pk_616_3419 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='485name' LIMIT 1 );
SET @pk_616_6797 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='description485' LIMIT 1 );
SET @pk_616_10823 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='message485' LIMIT 1 );
SET @pk_616_3416 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='484name' LIMIT 1 );
SET @pk_616_3507 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='484description' LIMIT 1 );
SET @pk_616_3408 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='481name' LIMIT 1 );
SET @pk_616_5579 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='481wname' LIMIT 1 );
SET @pk_616_5580 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='481wdescription' LIMIT 1 );
SET @pk_616_6794 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='name714' LIMIT 1 );
SET @pk_616_6795 = ( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='description714' LIMIT 1 );
REPLACE INTO `#__dataset_columns` (`dbcid`,`dbtid`,`name`,`pkey`,`checkval`,`type`,`attributes`,`mandatory`,`default`,`ordering`,`level`,`rolid`,`extra`,`size`,`export`,`namekey`,`core`,`columntype`,`noaudit`) VALUES (@pk_616_1929,@dbtid_1,'ctyid','1','0','2','1','1','','1','1',@rolid_0,'1','0','1','200ctyid','1','0','0');
REPLACE INTO `#__dataset_columns` (`dbcid`,`dbtid`,`name`,`pkey`,`checkval`,`type`,`attributes`,`mandatory`,`default`,`ordering`,`level`,`rolid`,`extra`,`size`,`export`,`namekey`,`core`,`columntype`,`noaudit`) VALUES (@pk_616_1933,@dbtid_1,'namekey','0','1','14','0','1','','4','1',@rolid_0,'0','80','1','200namekey','1','0','0'),(@pk_616_7030,@dbtid_2,'ctyid','1','0','4','1','1','','1','0','0','0','0','1','734ctyid','1','0','0'),(@pk_616_7031,@dbtid_2,'lgid','1','0','1','1','1','','2','0','0','0','4','1','734lgid','1','0','0'),(@pk_616_8026,@dbtid_3,'stateid','1','0','2','1','1','','1','0','0','1','5','1','882stateid','1','0','0'),(@pk_616_8030,@dbtid_3,'code3','0','1','15','0','1','','5','0','0','0','3','1','code3882','1','0','0'),(@pk_616_8032,@dbtid_3,'ctyid','0','1','2','1','1','0','7','0','0','0','5','1','ctyid882','1','0','0'),(@pk_616_1698,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='joobi.languages' LIMIT 1),'lgid','1','0','1','1','1','','1','1',@rolid_0,'1','0','1','199lgid','1','0','0'),(@pk_616_1897,(198),'namekey','1','1','14','0','1','','2','1',@rolid_0,'1','50','1','198namekey','1','0','0'),(@pk_616_8028,@dbtid_3,'namekey','0','1','14','0','1','','3','0','0','0','64','1','namekey882','1','0','0'),(@pk_616_1930,@dbtid_1,'isocode2','0','0','15','0','1','','2','1',@rolid_0,'0','2','1','200isocod2','1','0','0'),(@pk_616_1931,@dbtid_1,'isocode3','0','0','15','0','1','','3','1',@rolid_0,'0','3','1','200isocod3','1','0','0'),(@pk_616_1932,@dbtid_1,'name','0','0','14','0','1','','5','1',@rolid_0,'0','80','1','200name','1','0','0'),(@pk_616_1934,@dbtid_1,'numcode','0','0','2','0','1','0','6','1',@rolid_0,'0','0','1','200numcode','1','0','0'),(@pk_616_7032,@dbtid_2,'ordering','0','1','1','1','1','0','3','0','0','0','0','1','ordering734','1','0','0'),(@pk_616_7048,@dbtid_1,'timezone','0','1','2','0','1','0','7','0','0','0','0','1','timezone200','1','0','0'),(@pk_616_8025,@dbtid_1,'publish','0','0','1','0','1','1','8','0','0','0','0','1','publish200','1','0','0'),(@pk_616_8027,@dbtid_3,'name','0','1','14','0','1','','2','0','0','0','64','1','name882','1','0','0'),(@pk_616_8029,@dbtid_3,'code2','0','1','15','0','1','','4','0','0','0','2','1','code2882','1','0','0'),(@pk_616_8031,@dbtid_3,'publish','0','1','1','1','1','1','6','0','0','0','2','1','publish882','1','0','0'),(@pk_616_8760,@dbtid_3,'core','0','1','25','0','1','0','8','0','0','0','0','1','core882','1','0','0'),(@pk_616_8761,@dbtid_1,'core','0','1','25','0','1','0','9','0','0','0','0','1','core200','1','0','0'),(@pk_616_8922,@dbtid_1,'ordering','0','1','2','1','1','1','10','0','0','0','0','1','ordering200','1','0','0'),(@pk_616_8923,@dbtid_3,'ordering','0','1','2','1','1','1','9','0','0','0','0','1','ordering882','1','0','0'),(@pk_616_8945,@dbtid_1,'modified','0','1','4','1','1','0','11','0','0','0','0','1','modified200','1','1','0'),(@pk_616_6039,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='model.trans' LIMIT 1),'name','0','0','14','0','1','','3','1',@rolid_0,'0','0','1','618name','1','0','0'),(@pk_616_3412,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.multiformstrans' LIMIT 1),'name','0','0','14','0','1','','3','1',@rolid_0,'0','255','1','482name','1','0','0'),(@pk_616_3413,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.multiformstrans' LIMIT 1),'description','0','0','16','0','1','','4','1',@rolid_0,'0','0','1','482description','1','0','0'),(@pk_616_3419,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.mlinkstrans' LIMIT 1),'name','0','0','14','0','1','','3','1',@rolid_0,'0','255','1','485name','1','0','0'),(@pk_616_6797,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.mlinkstrans' LIMIT 1),'description','0','1','16','0','1','','4','0','0','0','0','1','description485','1','0','0'),(@pk_616_10823,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.mlinkstrans' LIMIT 1),'message','0','1','16','0','1','','5','0','0','0','0','1','message485','1','0','0'),(@pk_616_3416,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.listingstrans' LIMIT 1),'name','0','0','14','0','1','','3','1',@rolid_0,'0','255','1','484name','1','0','0'),(@pk_616_3507,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.listingstrans' LIMIT 1),'description','0','0','16','0','1','','99','1',@rolid_0,'0','0','1','484description','1','0','0'),(@pk_616_3408,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.trans' LIMIT 1),'name','0','0','14','0','1','','3','1',@rolid_0,'0','255','1','481name','1','0','0'),(@pk_616_5579,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.trans' LIMIT 1),'wname','0','0','14','0','1','','5','1',@rolid_0,'0','255','1','481wname','1','0','0'),(@pk_616_5580,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='layout.trans' LIMIT 1),'wdescription','0','0','16','0','1','','6','1',@rolid_0,'0','0','1','481wdescription','1','0','0'),(@pk_616_6794,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='eguillage.trans' LIMIT 1),'name','0','1','14','0','1','','3','0','0','0','255','1','name714','1','0','0'),(@pk_616_6795,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='eguillage.trans' LIMIT 1),'description','0','1','16','0','1','','4','0','0','0','0','1','description714','1','0','0');
SET @pk_5_65 = ( SELECT `wid` FROM `#__extension_node`  WHERE `namekey`='countries.node' LIMIT 1 );
UPDATE `#__extension_node`  SET `publish`='1',`folder`='countries',`wid`=@pk_5_65,`params`='',`status`='1',`type`='150',`name`='countries',`destination`='node',`parent`='0',`trans`='1',`certify`='1',`namekey`='countries.node',`version`='2652',`lversion`='2652',`pref`='0',`install`='',`core`='1',`showconfig`='1',`framework`='0' WHERE  `namekey`='countries.node';
INSERT IGNORE INTO `#__extension_node` (`publish`,`folder`,`wid`,`params`,`status`,`type`,`name`,`destination`,`parent`,`trans`,`certify`,`namekey`,`version`,`lversion`,`pref`,`install`,`core`,`showconfig`,`framework`) VALUES ('1','countries',@pk_5_65,'','1','150','countries','node','0','1','1','countries.node','2652','2652','0','','1','1','0');

SET @pk_621_200 = ( SELECT `sid` FROM `#__model_node`  WHERE `namekey`='countries' LIMIT 1 );
SET @pk_621_770 = ( SELECT `sid` FROM `#__model_node`  WHERE `namekey`='countries.language' LIMIT 1 );
SET @pk_621_946 = ( SELECT `sid` FROM `#__model_node`  WHERE `namekey`='countries.states' LIMIT 1 );
SET @pk_621_313 = ( SELECT `sid` FROM `#__model_node`  WHERE `namekey`='zones.countries' LIMIT 1 );
UPDATE `#__model_node`  SET `sid`=@pk_621_200,`dbtid`=@dbtid_1,`path`='1',`namekey`='countries',`folder`='countries',`rolid`=@rolid_0,`level`='0',`publish`='1',`extended`='0',`checkval`='0',`params`='ordrg=1\ngrpmap=publish\ncachedata=1\nvalidtoggle=1',`alias`='',`prefix`='joobi',`fields`='0',`trash`='0',`core`='1',`faicon`='fa-globe',`pnamekey`='' WHERE  `namekey`='countries';
INSERT IGNORE INTO `#__model_node` (`sid`,`dbtid`,`path`,`namekey`,`folder`,`rolid`,`level`,`publish`,`extended`,`checkval`,`params`,`alias`,`prefix`,`fields`,`trash`,`core`,`faicon`,`pnamekey`) VALUES (@pk_621_200,@dbtid_1,'1','countries','countries',@rolid_0,'0','1','0','0','ordrg=1\ngrpmap=publish\ncachedata=1\nvalidtoggle=1','','joobi','0','0','1','fa-globe','');
UPDATE `#__model_node`  SET `sid`=@pk_621_770,`dbtid`=@dbtid_2,`path`='0',`namekey`='countries.language',`folder`='countries.language',`rolid`=@rolid_0,`level`='0',`publish`='1',`extended`='0',`checkval`='0',`params`='autofld=1',`alias`='',`prefix`='country',`fields`='0',`trash`='0',`core`='1',`faicon`='',`pnamekey`='' WHERE  `namekey`='countries.language';
INSERT IGNORE INTO `#__model_node` (`sid`,`dbtid`,`path`,`namekey`,`folder`,`rolid`,`level`,`publish`,`extended`,`checkval`,`params`,`alias`,`prefix`,`fields`,`trash`,`core`,`faicon`,`pnamekey`) VALUES (@pk_621_770,@dbtid_2,'0','countries.language','countries.language',@rolid_0,'0','1','0','0','autofld=1','','country','0','0','1','','');
UPDATE `#__model_node`  SET `sid`=@pk_621_946,`dbtid`=@dbtid_3,`path`='0',`namekey`='countries.states',`folder`='countries.states',`rolid`=@rolid_0,`level`='0',`publish`='1',`extended`='0',`checkval`='0',`params`='ordrg=1\ngrpmap=ctyid\ngrptable=countries\nautofld=1',`alias`='',`prefix`='states',`fields`='0',`trash`='0',`core`='1',`faicon`='',`pnamekey`='' WHERE  `namekey`='countries.states';
INSERT IGNORE INTO `#__model_node` (`sid`,`dbtid`,`path`,`namekey`,`folder`,`rolid`,`level`,`publish`,`extended`,`checkval`,`params`,`alias`,`prefix`,`fields`,`trash`,`core`,`faicon`,`pnamekey`) VALUES (@pk_621_946,@dbtid_3,'0','countries.states','countries.states',@rolid_0,'0','1','0','0','ordrg=1\ngrpmap=ctyid\ngrptable=countries\nautofld=1','','states','0','0','1','','');
UPDATE `#__model_node`  SET `sid`=@pk_621_313,`dbtid`=( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='zones.countries' LIMIT 1),`path`='0',`namekey`='zones.countries',`folder`='zones.countries',`rolid`=@rolid_0,`level`='0',`publish`='1',`extended`='0',`checkval`='0',`params`='',`alias`='',`prefix`='zones',`fields`='0',`trash`='0',`core`='1',`faicon`='fa-globe',`pnamekey`='' WHERE  `namekey`='zones.countries';
INSERT IGNORE INTO `#__model_node` (`sid`,`dbtid`,`path`,`namekey`,`folder`,`rolid`,`level`,`publish`,`extended`,`checkval`,`params`,`alias`,`prefix`,`fields`,`trash`,`core`,`faicon`,`pnamekey`) VALUES (@pk_621_313,( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='zones.countries' LIMIT 1),'0','zones.countries','zones.countries',@rolid_0,'0','1','0','0','','','zones','0','0','1','fa-globe','');

SET @wid_4 = ( SELECT `wid` FROM `#__extension_node`  WHERE `namekey`='countries.node' LIMIT 1);
SET @sid_5 = ( SELECT `sid` FROM `#__model_node`  WHERE `namekey`='countries' LIMIT 1);
SET @sid_6 = ( SELECT `sid` FROM `#__model_node`  WHERE `namekey`='countries.states' LIMIT 1);
SET @rolid_7 = (21);
SET @rolid_8 = (13);
SET @yid_9 = ( SELECT `yid` FROM `#__layout_node`  WHERE `namekey`='countries_form_backend' LIMIT 1);
SET @yid_10 = ( SELECT `yid` FROM `#__layout_node`  WHERE `namekey`='countries_states_form' LIMIT 1);
SET @yid_11 = ( SELECT `yid` FROM `#__layout_node`  WHERE `namekey`='countries_listing_backend' LIMIT 1);
SET @yid_12 = ( SELECT `yid` FROM `#__layout_node`  WHERE `namekey`='states_listing_be' LIMIT 1);
SET @yid_13 = ( SELECT `yid` FROM `#__layout_node`  WHERE `namekey`='states_assign_be' LIMIT 1);
SET @yid_14 = ( SELECT `yid` FROM `#__layout_node`  WHERE `namekey`='countries_assignlisting_be' LIMIT 1);
INSERT IGNORE INTO `#__translation_en` (`text`,`auto`,`imac`) VALUES ('Tips','1','1206732346KLSC');
INSERT IGNORE INTO `#__translation_en` (`text`,`auto`,`imac`) VALUES ('New','1','1206732361LXFD'),('Edit','1','1206732361LXFE'),('Delete','1','1206732372QTKL'),('Publish','1','1206732372QTKN'),('Wizard','1','1206732391QBUR'),('Help','1','1206732392OZUP'),('Languages','1','1206732392OZUS'),('#','1','1206732392OZVA'),('Name','1','1206732392OZVB'),('Cancel','1','1206732393CXVV'),('Save','1','1206732399EINB'),('Divider','1','1206732399EINF'),('ID','1','1206732400OWXG'),('hidden','1','1206961869IGND'),('Order','1','1206961869IGNP'),('State','1','1206961922ESOZ'),('Country','1','1206961922ESPA'),('checkbox','1','1206964391FHVS'),('Published','1','1207306697RNMA'),('Assigned','1','1207411373HFUG'),('Number','1','1225317223AXHH'),('Close','1','1228820287MBVC'),('ISO Code','1','1241769455CJUR'),('Countries','1','1242178310INRJ'),('Done','1','1242282449PIPC'),('Code 2','1','1298350895GOOG'),('Code 3','1','1298350895GOOH'),('Enter here the country\'s iso code 3<br>','1','1298350896NUAG'),('Enter here the country\'s name<br>','1','1298350896NUAI'),('Enter here the country\'s iso code 2<br>','1','1298350896NUAJ'),('Here\'s the listing of countries.<br><ul><li><span style=\"font-weight: bold;\">Name</span> - country name.</li><li><span style=\"font-weight: bold;\">Code</span> - ISO code of the country.</li><li><span style=\"font-weight: bold;\">Assigned</span> - pop-up that contains the list of states assigned/set to the country.</li></ul><ul><li>You can create/add a new country by clicking on the \"<span style=\"font-weight: bold;\">New</span>\" button.</li><li>You can edit a country by clicking it on its name under the \"<span style=\"font-weight: bold;\">Name</span>\" column or by clicking on the \"<span style=\"font-weight: bold;\">Edit</span>\" button.</li><li>You can delete a country by clicking on the \"<span style=\"font-weight: bold;\">Delete</span>\" button.</li><li>You can show/remove this wizard/tips by clicking the \"<span style=\"font-weight: bold;\">Wizard</span>\" button.</li></ul>','1','1298350896NUAK'),('Back to Country Listing','1','1298350896NUAN'),('Country States Listing','1','1298350896NUAO'),('Enter here the state\'s name<br>','1','1298350943JNMK'),('Enter here the state\'s code 2<br>','1','1298350943JNMM'),('Enter here the state\'s code 3<br>','1','1298350943JNMN'),('States','1','1298350943JNMO'),('Here shows the listing of states.<br><ul><li><span style=\"font-weight: bold;\">Name</span> - State name</li><li><span style=\"font-weight: bold;\">Code</span> - ISO code of the state</li><li><span style=\"font-weight: bold;\">Country</span> - the country where the state belongs/set/assigned.</li></ul><ul><li>You can create/add a new state by clicking on the \"<span style=\"font-weight: bold;\">New</span>\" button.</li><li>You can edit a state by clicking it on its name under the \"Name\" column or by clicking on the \"<span style=\"font-weight: bold;\">Edit</span>\" button.</li><li>You can delete a state by clicking on the \"<span style=\"font-weight: bold;\">Delete</span>\" button.</li><li>You can show/remove this wizard/tips by clicking the \"<span style=\"font-weight: bold;\">Wizard</span>\" button.</li></ul>','1','1298350943JNMP'),('States Listing','1','1298350943JNMR'),('Add New States','1','1298350943JNMS'),('Saving States','1','1298350943JNMT'),('Applying State','1','1298350943JNMU'),('Cancel State','1','1298350943JNMV'),('Editing States','1','1298350943JNMW'),('Deleting States','1','1298350943JNMX'),('Toggle States','1','1298350943JNMZ'),('ISO2 Code','1','1302767547EOHF'),('ISO3 Code','1','1302767547EOHG'),('ISO 3166-1','1','1302767548FHJQ'),('','1','1304525968YBL'),('Enter here the country\'s number code, based on ISO 3166 Codes.<br>','1','1357697370EVGV'),('No country','1','1359546778AIBN'),('Select a Language','1','1359546778AIBO'),('Identifier','1','1398436917DTKC'),('Enter here the country\'s identifier/identifier<br>','1','1398536102QVLB'),('Enter here the state\'s identifier to avoid duplication<br>','1','1398536102QVLC'),('All Countries','1','1428415779LUNN');
REPLACE INTO `#__dataset_constraintsitems` (`ctid`,`ordering`,`sort`,`dbcid`) VALUES (( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='PK_joobi_countries' LIMIT 1),'1','0',( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200ctyid' LIMIT 1));
REPLACE INTO `#__dataset_constraintsitems` (`ctid`,`ordering`,`sort`,`dbcid`) VALUES (( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='UK_200_namekey' LIMIT 1),'1','0',( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200namekey' LIMIT 1)),(( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='PK_country_language' LIMIT 1),'1','0',( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='734ctyid' LIMIT 1)),(( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='PK_country_language' LIMIT 1),'2','0',( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='734lgid' LIMIT 1)),(( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='PK_joobi_states' LIMIT 1),'1','0',( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='882stateid' LIMIT 1)),(( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='UK_code3_ctryid' LIMIT 1),'1','0',( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='code3882' LIMIT 1)),(( SELECT `ctid` FROM `#__dataset_constraints`  WHERE `namekey`='UK_code3_ctryid' LIMIT 1),'1','0',( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='ctyid882' LIMIT 1));
SET @pk_77_10756 = ( SELECT `fkid` FROM `#__dataset_foreign`  WHERE `dbtid`=@dbtid_2 AND `ref_dbtid`=@dbtid_1 AND `feid`=' SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`=\'734ctyid\' LIMIT 1' LIMIT 1 );
SET @pk_77_10757 = ( SELECT `fkid` FROM `#__dataset_foreign`  WHERE `dbtid`=@dbtid_2 AND `ref_dbtid`=' SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`=\'joobi.languages\' LIMIT 1' AND `feid`=' SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`=\'734lgid\' LIMIT 1' LIMIT 1 );
SET @pk_77_10947 = ( SELECT `fkid` FROM `#__dataset_foreign`  WHERE `dbtid`=@dbtid_3 AND `ref_dbtid`='198' AND `feid`=' SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`=\'namekey882\' LIMIT 1' LIMIT 1 );
SET @pk_77_10948 = ( SELECT `fkid` FROM `#__dataset_foreign`  WHERE `dbtid`=@dbtid_3 AND `ref_dbtid`=@dbtid_1 AND `feid`=' SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`=\'ctyid882\' LIMIT 1' LIMIT 1 );
REPLACE INTO `#__dataset_foreign` (`map`,`publish`,`namekey`,`fkid`,`feid`,`ref_feid`,`onupdate`,`ondelete`,`map2`,`ref_dbtid`,`dbtid`,`ordering`) VALUES ('ctyid','1','FK_country.language_ctyid',@pk_77_10756,( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='734ctyid' LIMIT 1),( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200ctyid' LIMIT 1),'1','3','ctyid',@dbtid_1,@dbtid_2,'1');
REPLACE INTO `#__dataset_foreign` (`map`,`publish`,`namekey`,`fkid`,`feid`,`ref_feid`,`onupdate`,`ondelete`,`map2`,`ref_dbtid`,`dbtid`,`ordering`) VALUES ('lgid','1','FK_country.language_lgid',@pk_77_10757,( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='734lgid' LIMIT 1),( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='199lgid' LIMIT 1),'1','3','lgid',( SELECT `dbtid` FROM `#__dataset_tables`  WHERE `namekey`='joobi.languages' LIMIT 1),@dbtid_2,'2'),('namekey','1','882_namekey_198',@pk_77_10947,( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='namekey882' LIMIT 1),( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='198namekey' LIMIT 1),'1','1','namekey',(198),@dbtid_3,'99'),('ctyid','1','882_ctyid_200',@pk_77_10948,( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='ctyid882' LIMIT 1),( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='200ctyid' LIMIT 1),'1','1','ctyid',@dbtid_1,@dbtid_3,'99');
INSERT IGNORE INTO `#__translation_reference` (`wid`,`load`,`imac`) VALUES (@wid_4,'1','1359546778AIBN');
INSERT IGNORE INTO `#__translation_reference` (`wid`,`load`,`imac`) VALUES (@wid_4,'1','1359546778AIBO'),(@wid_4,'1','1428415779LUNN');
INSERT IGNORE INTO `#__translation_populate` (`dbcid`,`eid`,`imac`,`wid`) VALUES (( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='618name' LIMIT 1),( SELECT `sid` FROM `#__model_node`  WHERE `namekey`='countries' LIMIT 1),'1206961922ESPA',@wid_4);
INSERT IGNORE INTO `#__translation_populate` (`dbcid`,`eid`,`imac`,`wid`) VALUES (( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='618name' LIMIT 1),( SELECT `sid` FROM `#__model_node`  WHERE `namekey`='countries.language' LIMIT 1),'1206732392OZUS',@wid_4),(( SELECT `dbcid` FROM `#__dataset_columns`  WHERE `namekey`='618name' LIMIT 1),( SELECT `sid` FROM `#__model_node`  WHERE `namekey`='countries.states' LIMIT 1),'1298350943JNMO',@wid_4);