From 65ed6db3c4118cd0164d395827472b3b54fae701 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 9 Jan 2012 20:48:49 +0000 Subject: [PATCH] SQL patch add ad_extra --- html/admin/sql/patch/upgrade100.sql | 22 ++++++++++++++++++++++ include/constant.php | 8 +++++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 html/admin/sql/patch/upgrade100.sql diff --git a/html/admin/sql/patch/upgrade100.sql b/html/admin/sql/patch/upgrade100.sql new file mode 100644 index 000000000..60bd7355a --- /dev/null +++ b/html/admin/sql/patch/upgrade100.sql @@ -0,0 +1,22 @@ +begin; +alter table attr_def add ad_extra text ; + +insert into attr_def (ad_id,ad_text,ad_type,ad_size) values (33,'Date Fin','date',8); + +ALTER TABLE fiche_detail DROP CONSTRAINT "$2"; + +ALTER TABLE fiche_detail + ADD CONSTRAINT fiche_detail_attr_def_fk FOREIGN KEY (ad_id) + REFERENCES attr_def (ad_id) MATCH SIMPLE + ON UPDATE cascade ON DELETE cascade; + +ALTER TABLE jnt_fic_attr DROP CONSTRAINT "$2"; + +ALTER TABLE jnt_fic_attr + ADD CONSTRAINT jnt_fic_attr_attr_def_fk FOREIGN KEY (ad_id) + REFERENCES attr_def (ad_id) MATCH SIMPLE + ON UPDATE cascade ON DELETE cascade; + +update version set val=100; + +commit; \ No newline at end of file diff --git a/include/constant.php b/include/constant.php index 58673632e..b12570681 100644 --- a/include/constant.php +++ b/include/constant.php @@ -31,8 +31,8 @@ global $version_phpcompta; global $g_captcha,$g_failed,$g_succeed; $g_captcha=false; -$g_failed=""; -$g_succeed=""; +$g_failed=""; +$g_succeed=""; /*set to none for production */ /* uncomment for production */ // $version_phpcompta=4620; @@ -42,9 +42,11 @@ $g_succeed=""; $version_phpcompta=SVNINFO; define ("DEBUG",false); +/* $version_phpcompta=4601; +define ("DEBUG",true); */ +define ("DBVERSION",101); -define ("DBVERSION",100); define ("DBVERSIONREPO",14); define ('NOTFOUND','--not found--');