diff --git a/html/admin/sql/patch/upgrade13.sql b/html/admin/sql/patch/upgrade13.sql
index 089a890f3..3b23fa9c4 100644
--- a/html/admin/sql/patch/upgrade13.sql
+++ b/html/admin/sql/patch/upgrade13.sql
@@ -435,10 +435,12 @@ insert into jnt_fic_attr select fd_id,24 from jnt_fic_attr join fiche_def using
create table action_gestion (
ag_id serial primary key,
ag_type int4,
- f_id int4 not null,
+ f_id_dest int4 not null,
+ f_id_exp int4 not null,
ag_title varchar(70),
ag_timestamp timestamp default now(),
ag_cal char(1) default 'C',
+ g_ref_ag_id int4,
ag_comment text
);
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index ed8f64eb2..3721913da 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -1,2 +1,14 @@
+begin;
alter table action_gestion add column ag_ref_ag_id int4;
+alter table action_gestion add column f_id_dest int4;
+alter table action_gestion add column f_id_exp int4;
+update action_gestion set f_id_dest=f_id;
+update action_gestion set f_id_exp=0;
+
+alter table action_gestion drop column f_id;
+
+alter table action_gestion alter f_id_dest set not null;
+alter table action_gestion alter f_id_exp set not null;
+
+commit;
\ No newline at end of file