diff --git a/persist/src/db/10.0.3/fix_db_20161007.sql b/persist/src/db/10.0.3/fix_db_20161007.sql
new file mode 100644
index 0000000000000000000000000000000000000000..b04aae40858075e42eaff2504d2763f6a4187659
--- /dev/null
+++ b/persist/src/db/10.0.3/fix_db_20161007.sql
@@ -0,0 +1,5 @@
+update element_table set idcomplexdb=parent_iddb where idcomplexdb is null and parent_iddb is not null and parent_iddb in (select iddb from element_table where element_type_db= 'Complex');
+
+update element_table set compartment_iddb = parent_iddb where compartment_iddb is null and parent_iddb is not null and parent_iddb in (select iddb from element_table where element_type_db<> 'Complex');
+
+alter table element_table  drop COLUMN parent_iddb ;
\ No newline at end of file