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)
|
||||
|
||||
|
||||
@ -2,17 +2,17 @@
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@ -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