Fix: The repair script works also for postgresql
This commit is contained in:
parent
badc6d0f45
commit
5fea0abd0d
@ -33,3 +33,8 @@ update llx_facture_fourn set fk_projet = null where fk_projet not in (select row
|
||||
update llx_facture_rec set fk_projet = null where fk_projet not in (select rowid from llx_projet);
|
||||
update llx_fichinter set fk_projet = null where fk_projet not in (select rowid from llx_projet);
|
||||
update llx_projet_task set fk_projet = null where fk_projet not in (select rowid from llx_projet);
|
||||
|
||||
|
||||
-- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid
|
||||
-- VPGSQL8.2 DELETE FROM llx_boxes_def as T1 WHERE rowid NOT IN (SELECT min(rowid) FROM llx_boxes_def GROUP BY file, entity, note)
|
||||
|
||||
|
||||
@ -95,8 +95,8 @@ $conf->db->user = $dolibarr_main_db_user;
|
||||
$conf->db->pass = $dolibarr_main_db_pass;
|
||||
|
||||
// For encryption
|
||||
$conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption;
|
||||
$conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey;
|
||||
$conf->db->dolibarr_main_db_encryption = isset($dolibarr_main_db_encryption)?$dolibarr_main_db_encryption:'';
|
||||
$conf->db->dolibarr_main_db_cryptkey = isset($dolibarr_main_db_cryptkey)?$dolibarr_main_db_cryptkey:'';
|
||||
|
||||
$db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port);
|
||||
|
||||
@ -152,15 +152,11 @@ flush();
|
||||
*/
|
||||
if ($ok)
|
||||
{
|
||||
if ($choix==1) $dir = "mysql/migration/";
|
||||
elseif ($choix==2) $dir = "pgsql/migration/";
|
||||
else $dir = "mssql/migration/";
|
||||
$dir = "mysql/migration/";
|
||||
|
||||
$filelist=array();
|
||||
$i = 0;
|
||||
$ok = 0;
|
||||
$from='^'.$versionfrom;
|
||||
$to=$versionto.'\.sql$';
|
||||
|
||||
// Recupere list fichier
|
||||
$filesindir=array();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user