Commit db050e1c authored by sreg's avatar sreg
Browse files

- Mise en open source (oss)

parents
Pipeline #1392 failed with stages
<?php
function displayErrors($errors)
{
$cnt=count($errors);
printf("failed - %ld error%s\n",$cnt,$cnt>1?'s':'');
foreach($errors as $error)
echo "$error\n";
}
function checkingName($dir,$authorized,$path='',$mode='EXACT')
{
$errors=array();
if($mode=='EXACT')
foreach($dir as $name=>$value)
if(!in_array($name,$authorized))
$errors[]=sprintf(" WTF: %s%s ???",$path,$name);
if($mode=='EXACT' || $mode=='EXISTS')
foreach($authorized as $k=>$name)
if(!array_key_exists($name,$dir))
$errors[]=sprintf(" Where is: %s%s ???",$path,$name);
return $errors;
}
function checkingPattern(&$array,$pattern,$recurse='')
{
$errors=array();
foreach($array as $name=>$value)
{
$isRep=preg_match('#^.*/$#',$name);
if($recurse!==false && $isRep)
$errors=array_merge($errors,checkingPattern($array[$name],$pattern,"$recurse$name"));
if(!$isRep && !preg_match($pattern,$name))
$errors[]=sprintf(" %s%s ???",$recurse,$name);
}
return $errors;
}
function checkingContent(&$array,$patternFiles,$callback,$recurse='')
{
$errors=array();
foreach($array as $name=>$value)
{
$isRep=preg_match('#^.*/$#',$name);
if($recurse!==false && $isRep)
$errors=array_merge($errors,checkingContent($array[$name],$patternFiles,$callback,"$recurse$name"));
if(!$isRep && preg_match($patternFiles,$name))
if($error=$callback($recurse,$name)) //sprintf(" %s%s ???",$recurse,$name);
$errors[]=$error;
}
return $errors;
}
function recalcIntegrity()
{
$array=array();
showDir('../',true,0,$array);
//print_r($array); die;
checkingContent($array['sys/']['quark/'],'#^.*\.php$#',
function($path,$name)
{
$fileName=__DIR__."/../$path$name";
if($content=file_get_contents($fileName))
if($content=preg_replace('#//Integrity:.*$#mi','//Integrity:',$content))
{
$content=preg_replace('#//Integrity:.*$#mi','//Integrity: '.sha1($content),$content);
file_put_contents($fileName,$content);
}
},'sys/quark/');
}
//print_r(scandir('../../')); die;
function showDir($path,$recurs=false,$level=0,&$array)
{
if($dir=@opendir($path))
{
if(($oldPath=getcwd())!==false)
if(chdir($path))
{
while(($f=@readdir($dir))!==false)
{
if(preg_match('#^\..*$#',$f)) continue;
$p=is_dir("$f")?'/':'';
//echo str_repeat(' ',$level*4)."$f$p\n";
if($p=='/') $array["$f$p"]=array();
else $array[$f]=$f;
if($recurs && $p) showDir($f,$recurs,$level+1,$array["$f$p"]);
}
chdir($oldPath);
}
closedir($dir);
}
}
function checkQuarky()
{
$array=array();
showDir('../',true,0,$array);
printf("Checking base directory structure: ");
if($errors=checkingName($array,array('batch/','cache/','config/','logs/','sys/','view/','web/'),'./'))
{
displayErrors($errors);
} else echo "ok\n";
printf("Checking sys/ directory structure: ");
if($errors=checkingName($array['sys/'],array('class/','quark/','param.php'),'sys/','EXISTS'))
{
displayErrors($errors);
} else echo "ok\n";
if(empty($errors))
{
printf("Checking framework integrity : ");
//excel.php mysqli.php mysql.php odbc.php oracle.php postgresql.php sqlserver.php
$errors=checkingName($array['sys/']['quark/'],array('db/','qasset.php','qcache.php','qcontentparser.php','qdb.php','qform.php','qmail.php','qsmtp.php','qstring.php','quark.php','quarky.php'),'sys/quark/');
if(empty($errors))
{
if($errors=checkingName($array['sys/']['quark/']['db/'],array('excel.php','mysqli.php','mysql.php','odbc.php','oracle.php','postgresql.php','sqlserver.php'),'sys/quark/db/'))
{
displayErrors($errors);
}
if(empty($errors))
if($errors=checkingContent($array['sys/']['quark/'],'#^.*\.php$#',
function($path,$name)
{
$fileName=__DIR__."/../$path$name";
if(!($content=file_get_contents($fileName)))
return sprintf(" %s%s: empty file ???",$path,$name);
if(!preg_match('#//Integrity: (.*)$#mi',$content,$m))
return sprintf(" %s%s: unable to find integrity check ???",$path,$name);
if($content=preg_replace('#//Integrity:.*$#mi','//Integrity:',$content))
{
if($m[1]!=sha1($content))
return sprintf(" %s%s: integrity failure ???",$path,$name);
} else
return sprintf(" %s%s: integrity failure ???",$path,$name);
return false;
},'sys/quark/'))
{
displayErrors($errors);
} else echo "ok\n";
} else displayErrors($errors);
if($errors) printf(" -> Don't touch my framework !\n");
}
printf("Checking view tree (all files names should be ended by _view.php): ");
if($errors=checkingPattern($array['view/'],'#[a-z0-9_]+_view\.php#','view/'))
{
displayErrors($errors);
} else echo "ok\n";
printf("Checking view contents (shoudn't contain echo): ");
if($errors=checkingContent($array['view/'],'#[a-z0-9_]+_view\.php#',
function($path,$name)
{
$content=file_get_contents(__DIR__."/../$path$name");
if(preg_match('#<\?php echo #si',$content,$m))
return sprintf(" -> echo found in $path$name. Use <?php _T(...);?> or <?php _H();?> instead !");
return false;
},'view/'))
{
displayErrors($errors);
} else echo "ok\n";
}
function qWeb()
{
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
ini_set('display_errors',1);
chdir(__DIR__.'/../web');
$php=true;
$type='text/html';
if(preg_match('#^(.*?)(\?(.*))?$#si',$_SERVER['REQUEST_URI'],$m))
{
@list($dummy,$path,$dummy,$query)=$m;
if(preg_match('#.*\.(jpg|jpeg|png|gif|ico)$#i',$path,$m))
{
$type=sprintf('image/%s',strtolower($m[1]));
$php=false;
} else
if(preg_match('#.*\.(css|js)$#',$path,$m))
{
$m[1]=strtolower($m[1]);
if($m[1]=='js') $m[1]='javascript';
$type=sprintf('text/%s',$m[1]);
}
header("Content-Type: $type; charset=UTF-8");
if($php)
require_once('../web/route.php');
else
@readfile(__DIR__.'/../web/www'.$path);//readfile($_SERVER['REQUEST_URI']);
}
/* Serveur Web PHP */
if(0)
{
$address='0.0.0.0';
$serverPort=8080;
if(($serverSock=socket_create(AF_INET,SOCK_STREAM,SOL_TCP))!==false)
{
if(socket_bind($serverSock,$address,$serverPort)!==false)
{
if(socket_listen($serverSock,64)!==false)
{
//print_r($serverSock); die;
$clients=array();
do {
$read=array_merge(array($serverSock),$clients);
if(socket_select($read,$write=NULL,$except=NULL,5)!==false)
{
foreach($read as $sock)
{
switch($serverSock==$sock?'SERVER':'CLIENT')
{
case 'SERVER':
if(($clientSock=socket_accept($sock))!==false)
{
echo "connexion\n";
$clients[]=$clientSock;
} else echo "socket_accept() a échoué : raison : " . socket_strerror(socket_last_error($serverSock)) . "\n";
break;
case 'CLIENT':
$len=socket_recv($sock,$data,2048,0);
if($len!==false && $len>0)
{
echo "un truc client ".strlen($data)."\n";
echo "$data";
} else
{
echo "Deconnexion\n";
unset($clients[array_search($sock,$clients)]);
socket_close($sock);
}
break;
}
}
//$buf = socket_read($msgsock, 2048, PHP_NORMAL_READ);
//socket_write($msgsock, $talkback, strlen($talkback));
}
} while(true);
} else echo "socket_listen() a échoué : raison : " . socket_strerror(socket_last_error($serverSock)) . "\n";
} else echo "socket_bind() a échoué : raison : " . socket_strerror(socket_last_error($serverSock)) . "\n";
socket_close($serverSock);
} else echo "socket_create() a échoué : raison : " . socket_strerror(socket_last_error()) . "\n";
}
}
if(!isset($argv)) qWeb();
else
{
$dir=getcwd();
chdir(pathinfo(__FILE__)['dirname']);
if(count($argv)>1)
{
$cmd=$argv[1];
if($cmd=='check')
checkQuarky();
} else
{
printf("Usage:\n".
"- php -Slocalhost:8080 %s -> launch quarky as web server on port 8080.\n".
"- php %s check -> lauch a full check of quarky structure. use it has much has possible.\n"
,$argv[0],$argv[0]);
}
chdir($dir);
}
?>
<?php
if(count($argv)>1)
{
$dir=getcwd();
chdir(pathinfo(__FILE__)['dirname']);
require_once('../../sys/quark/quark.php');
require_once('../../config/config.php');
$quark=new Quark();
chdir($dir);
$quark->executeScript($argv[1],$argv);
}
?>
\ No newline at end of file
<?php
$path=pathinfo(__FILE__)['dirname'].DIRECTORY_SEPARATOR;
if(file_exists($path.'config.dev.php'))
require_once($path.'config.dev.php');
$protocol=(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']!=='off' || (array_key_exists('SERVER_PORT',$_SERVER) && $_SERVER['SERVER_PORT']==443))?'https':'http';
if(!defined('DOMAIN')) define('DOMAIN',array_key_exists('HTTP_HOST',$_SERVER)?$_SERVER['HTTP_HOST']:'labonneformation.pole-emploi.fr');
if(!defined('URL_BASE')) define('URL_BASE',$protocol.'://'.DOMAIN);
if(!defined('URL_LBF')) define('URL_LBF',URL_BASE);
if(!defined('COMBINE_SCRIPT')) define('COMBINE_SCRIPT',true);
if(!defined('SHOW_INTERCARIF')) define('SHOW_INTERCARIF',false);
if(!defined('SMTP_SERVER')) define('SMTP_SERVER','lbfsmtp');
if(!defined('MAILTO_404')) define('MAILTO_404','');
if(!defined('TOKEN_LBB')) define('TOKEN_LBB','');
if(!defined('LBB_HMACKEY')) define('LBB_HMAC_KEY','');
if(!defined('ENV_DEV')) define('ENV_DEV',true);
if(!defined('ENV_NAME')) define('ENV_NAME','oss');
if(!defined('DOWNLOAD_PATH')) define('DOWNLOAD_PATH','');
if(!defined('URL_WSINTERCARIF')) define('URL_WSINTERCARIF','');
if(!defined('URL_TREFLE')) define('URL_TREFLE','http://trefle.pole-emploi.fr');
if(!defined('TREFLE_API_VERSION')) define('TREFLE_API_VERSION','0.7');
if(!defined('URL_API_TREFLE')) define('URL_API_TREFLE',URL_TREFLE.(TREFLE_API_VERSION?"/".TREFLE_API_VERSION:""));
if(!defined('CRYPT_PASS')) define('CRYPT_PASS',''));
if(!defined('KEY_STATS')) define('KEY_STATS','');
if(!defined('EMAIL_MODALCONTACT')) define('EMAIL_MODALCONTACT','');
if(!defined('EMAIL_CONTACT')) define('EMAIL_CONTACT','');
if(!defined('TAG_SEO_PROD')) define('TAG_SEO_PROD','');
if(!defined('TAG_SEO_RECETTE')) define('TAG_SEO_RECETTE','');
if(!defined('TAG_ANALYTICS_PROD')) define('TAG_ANALYTICS_PROD','');
if(!defined('TAG_ANALYTICS_RECETTE')) define('TAG_ANALYTICS_RECETTE','');
if(!defined('TAG_OPTIMIZE_PROD')) define('TAG_OPTIMIZE_PROD','');
if(!defined('TAG_OPTIMIZE_RECETTE')) define('TAG_OPTIMIZE_RECETTE','');
if(!defined('TAG_HOTJAR_PROD')) define('TAG_HOTJAR_PROD','');
if(!defined('TAG_HOTJAR_RECETTE')) define('TAG_HOTJAR_RECETTE','');
if(!defined('TAG_CRISP_PROD')) define('TAG_CRISP_PROD','');
if(!defined('TAG_CRISP_RECETTE')) define('TAG_CRISP_RECETTE','');
if(!isset($databaseRead)) $databaseRead=array('host'=>'','user'=>'','password'=>'','db'=>'');
if(!isset($databaseWrite)) $databaseWrite=array('host'=>'','user'=>'','password'=>''),'db'=>'');
if(!isset($database)) $database=$databaseWrite;
?>
CREATE TABLE `action` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`updatedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`ad_id` int(10) unsigned DEFAULT NULL,
`idformintercarif` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE `ad` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID Autoincrement',
`createdat` datetime NOT NULL COMMENT 'Creation date. At insertion.',
`updatedat` datetime DEFAULT NULL COMMENT 'Update date',
`deletedat` datetime DEFAULT NULL COMMENT 'Deletion date',
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL COMMENT 'ACTIVE, INACTIVE, DELETED',
`flags` int(11) DEFAULT NULL COMMENT 'Somes flags',
`catalogue_id` int(10) unsigned NOT NULL DEFAULT '1',
`orga_id` int(11) NOT NULL,
`beganat` datetime DEFAULT NULL,
`endedat` datetime DEFAULT NULL,
`duration` bigint(20) NOT NULL DEFAULT '0',
`idorgaintercarif` varchar(64) NOT NULL,
`idformintercarif` varchar(32) NOT NULL,
`formacode` varchar(64) NOT NULL,
`romecode` varchar(64) NOT NULL,
`title` varchar(256) CHARACTER SET utf8 NOT NULL COMMENT 'Title of the ad',
`objective` text CHARACTER SET utf8 NOT NULL,
`content` mediumtext CHARACTER SET utf8mb4,
`lat` double NOT NULL,
`lng` double NOT NULL,
`locationpath` varchar(32) CHARACTER SET utf8mb4 NOT NULL,
`locationsearch` varchar(256) DEFAULT NULL,
`zipcode` varchar(16) CHARACTER SET utf8 NOT NULL,
`firsttitle` varchar(256) DEFAULT NULL,
`codefinanceur` text NOT NULL,
`niveausortie` int(11) NOT NULL,
`extradata` varchar(256) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unicite` (`idformintercarif`,`catalogue_id`) USING BTREE,
KEY `idorgaintercarif` (`idorgaintercarif`,`status`) USING BTREE,
KEY `titleslug` (`firsttitle`),
KEY `flags` (`status`,`endedat`,`flags`) USING BTREE,
KEY `annuaire` (`orga_id`,`status`,`endedat`) USING BTREE,
KEY `idformintercarif` (`idformintercarif`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=480956 DEFAULT CHARSET=latin1
CREATE TABLE `adcpf` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`modifiedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`adsession_id` bigint(20) NOT NULL,
`ad_id` int(10) unsigned NOT NULL DEFAULT '0',
`idformintercarif` varchar(32) NOT NULL,
`source` text,
`beganat` datetime NOT NULL,
`endedat` datetime NOT NULL,
`codecpf` varchar(16) DEFAULT NULL,
`type` enum('TOUTPUBLIC','DE','SALARIE') NOT NULL,
`branche` text NOT NULL,
`interbranche` int(11) DEFAULT NULL,
`locationpath` varchar(32) NOT NULL,
PRIMARY KEY (`id`),
KEY `adid_beganat_endedat_type` (`ad_id`,`beganat`,`endedat`,`type`),
KEY `idformintercarif` (`idformintercarif`,`status`),
KEY `new_index` (`ad_id`,`status`,`codecpf`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=344840161 DEFAULT CHARSET=latin1
CREATE TABLE `adrank` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`modifiedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`formacode` varchar(64) NOT NULL,
`followed` int(11) NOT NULL,
`cdi` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `formacode` (`formacode`)
) ENGINE=InnoDB AUTO_INCREMENT=2607 DEFAULT CHARSET=latin1
CREATE TABLE `adrankbassin` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`modifiedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`formacode` varchar(64) NOT NULL,
`codeinsee` varchar(16) NOT NULL,
`citypath` varchar(32) DEFAULT NULL,
`bassinrate` float DEFAULT NULL,
`departementrate` float DEFAULT NULL,
`regionalrate` float DEFAULT NULL,
`nationalrate` float DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `formacode` (`status`,`codeinsee`,`formacode`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=170272 DEFAULT CHARSET=utf8
CREATE TABLE `adrankdepartement` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`modifiedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`formacode` varchar(64) NOT NULL,
`departementpath` varchar(32) NOT NULL,
`departementrate` float DEFAULT NULL,
`regionalrate` float DEFAULT NULL,
`nationalrate` float DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `formacode` (`formacode`,`departementpath`,`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=65329 DEFAULT CHARSET=utf8
CREATE TABLE `adrankregion` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`modifiedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`formacode` varchar(64) NOT NULL,
`regionpath` varchar(32) NOT NULL,
`regionalrate` float DEFAULT NULL,
`nationalrate` float DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `formacode` (`formacode`,`regionpath`,`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16112 DEFAULT CHARSET=utf8
CREATE TABLE `anotea` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`updatedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`orga_id` int(11) DEFAULT NULL,
`idorgaintercarif` varchar(64) NOT NULL,
`ad_id` int(11) DEFAULT NULL,
`idformintercarif` varchar(64) NOT NULL,
`formacode` varchar(16) NOT NULL,
`noteglobale` int(11) DEFAULT NULL,
`avisjson` text NOT NULL,
PRIMARY KEY (`id`),
KEY `idformintercarif` (`idformintercarif`,`status`),
KEY `idorgaintercarif` (`idorgaintercarif`,`status`),
KEY `ad_id` (`ad_id`,`status`),
KEY `orga_id` (`orga_id`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE `catalogue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`updatedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`name` varchar(64) NOT NULL,
`comment` varchar(256) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1
CREATE TABLE `corrector` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`modifiedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL DEFAULT 'ACTIVE',
`word` varchar(128) NOT NULL,
`length` int(11) NOT NULL,
`metaphone` varchar(128) DEFAULT NULL,
`soundex` varchar(128) DEFAULT NULL,
`count` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `word` (`word`,`length`,`status`,`count`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13578 DEFAULT CHARSET=latin1
CREATE TABLE `dpae` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`createdat` datetime DEFAULT NULL,
`updatedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`idde` varchar(64) CHARACTER SET utf8mb4 NOT NULL,
`nir` varchar(64) CHARACTER SET utf8 NOT NULL,
`siret` varchar(64) CHARACTER SET utf8 NOT NULL,
`contract` enum('CDI','CDD','INTERIM') DEFAULT NULL,
`beganat` datetime NOT NULL,
`endedat` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idde` (`idde`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE `formade` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`modifiedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`idde` varchar(16) CHARACTER SET utf8mb4 NOT NULL,
`idformintercarif` varchar(32) CHARACTER SET utf8 NOT NULL,
`label` varchar(256) CHARACTER SET utf8mb4 NOT NULL,
`beganat` datetime NOT NULL,
`endedat` datetime NOT NULL,
`financement` varchar(16) CHARACTER SET utf8 NOT NULL,
`inscriptedat` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `idde2` (`idde`,`endedat`),
KEY `idtraining` (`idformintercarif`,`status`) USING BTREE,
KEY `beganat_endedat` (`beganat`,`endedat`,`status`),
KEY `new_index` (`endedat`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE `immersion` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`updatedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`locationpath` varchar(32) DEFAULT NULL,
`locationlabel` varchar(128) DEFAULT NULL,
`rome` varchar(64) DEFAULT NULL,
`romelabel` varchar(128) DEFAULT NULL,
`datedebut` date DEFAULT NULL,
`duree` varchar(64) DEFAULT NULL,
`nom` text,
`prenom` text,
`statut` varchar(64) DEFAULT NULL,
`identifiant` varchar(64) DEFAULT NULL,
`email` tinytext,
`entreprises` longtext,
`comment` varchar(256) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9350 DEFAULT CHARSET=utf8
CREATE TABLE `orga` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`modifiedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`idorgaintercarif` varchar(64) NOT NULL,
`name` varchar(128) CHARACTER SET utf8mb4 NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`),
KEY `status_name` (`status`,`name`(64)),
KEY `idorgaintercarif` (`idorgaintercarif`(16))
) ENGINE=InnoDB AUTO_INCREMENT=24928 DEFAULT CHARSET=latin1
CREATE TABLE `orgarank` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`createdat` datetime NOT NULL,
`modifiedat` datetime DEFAULT NULL,
`deletedat` datetime DEFAULT NULL,
`status` enum('ACTIVE','INACTIVE','DELETED') NOT NULL,
`orga_id` int(11) DEFAULT NULL,
`idorgaintercarif` varchar(64) NOT NULL,
`formacode` varchar(64) NOT NULL,
`followed` int(11) NOT NULL,
`cdi` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `formacode` (`formacode`)
) ENGINE=InnoDB AUTO_INCREMENT=3342 DEFAULT CHARSET=latin1
CREATE TABLE `reference` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` int(10) unsigned NOT NULL COMMENT '1=lieu',
`status` int(11) NOT NULL DEFAULT '1' COMMENT '1=actif, 2=inactif, 0=supprimé',
`priority` int(11) NOT NULL DEFAULT '0',
`extradata` varchar(512) NOT NULL,
`level` int(11) NOT NULL,
`path` varchar(32) NOT NULL,
`label` varchar(128) NOT NULL,
`labelsearch` varchar(128) DEFAULT NULL,
`labeldisplay` varchar(128) DEFAULT NULL,
`labelariane` varchar(128) DEFAULT NULL,
`labelslug` varchar(128) NOT NULL,
PRIMARY KEY (`id`),
KEY `Index_3` (`label`,`type`,`level`),
KEY `slug` (`type`,`status`,`level`,`labelslug`),
KEY `Index_4` (`status`,`type`,`path`,`label`) USING BTREE,
KEY `extradata` (`type`,`status`,`extradata`(32)) USING BTREE,
KEY `type_path_level_priority` (`type`,`path`,`level`,`priority`)
) ENGINE=InnoDB AUTO_INCREMENT=289747 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='InnoDB free: 9216 kB; InnoDB free: 1984512 kB'
CREATE TABLE `session` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,