Fix bug in the update scripts

This commit is contained in:
sparkyx 2005-03-15 18:46:17 +00:00
parent 38cd7bdee8
commit cb6834c2fb
5 changed files with 7 additions and 5 deletions

View file

@ -277,7 +277,7 @@ for ($e=0;$e < $MaxDossier;$e++) {
$db_row=pg_fetch_array($Resdossier,$e);
echo "Patching ".$db_row['dos_name']."<hr>";
$db=DbConnect($db_row['dos_id'],'dossier');
if ( GetVersion($db) == 4 ) {
if ( GetVersion($db) == 3 ) {
ExecuteScript($db,'sql/patch/upgrade4.sql');
$sql="select jrn_def_id from jrn_def ";

View file

@ -49,7 +49,7 @@ INSERT INTO jnt_use_dos (jnt_id, use_id, dos_id) VALUES (23, 5, 1);
-- Name: version; Type: TABLE DATA; Schema: public; Owner: phpcompta
--
INSERT INTO "version" (val) VALUES (4);
INSERT INTO "version" (val) VALUES (3);
--

View file

@ -521,7 +521,7 @@ INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) VALUES (604
-- Name: version; Type: TABLE DATA; Schema: public; Owner: phpcompta
--
INSERT INTO "version" (val) VALUES (4);
INSERT INTO "version" (val) VALUES (3);
--

View file

@ -521,7 +521,7 @@ INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) VALUES (101
-- Name: version; Type: TABLE DATA; Schema: public; Owner: phpcompta
--
INSERT INTO "version" (val) VALUES (4);
INSERT INTO "version" (val) VALUES (3);
--

View file

@ -1,2 +1,4 @@
delete from jnt_use_dos where dos_id not in (select dos_id from ac_dossier );
delete from jnt_use_dos where dos_id not in (select dos_id from ac_dossier);
update version set val=4;
update version set val=4;