diff --git a/openbis/source/sql/postgresql/migration/migration-124-125.sql b/openbis/source/sql/postgresql/migration/migration-124-125.sql
index 9b10029f4c0a164abf5cff4f339e21fe136fb96d..51a8a7abfce9d6bdc8ebea477e94aefd9f987c61 100644
--- a/openbis/source/sql/postgresql/migration/migration-124-125.sql
+++ b/openbis/source/sql/postgresql/migration/migration-124-125.sql
@@ -98,6 +98,11 @@ CREATE OR REPLACE RULE data_update AS
               version = NEW.version
        WHERE id = NEW.id;
               
+CREATE OR REPLACE RULE data_all AS
+    ON DELETE TO data DO INSTEAD
+       DELETE FROM data_all
+              WHERE id = OLD.id;
+              
 DROP VIEW data_deleted;
 CREATE VIEW data_deleted AS
      SELECT id, code, dsty_id, dast_id, expe_id, data_producer_code, production_timestamp, samp_id, registration_timestamp, pers_id_registerer, pers_id_modifier, is_placeholder, is_valid, modification_timestamp, is_derived, ctnr_order, ctnr_id, del_id, version 
@@ -112,6 +117,11 @@ CREATE OR REPLACE RULE data_deleted_update AS
               version = NEW.version
           WHERE id = NEW.id;
      
+CREATE OR REPLACE RULE data_deleted_delete AS
+    ON DELETE TO data_deleted DO INSTEAD
+       DELETE FROM data_all
+              WHERE id = OLD.id;               
+              
 DROP VIEW data_set_relationships;
 CREATE VIEW data_set_relationships AS
    SELECT data_id_parent, data_id_child, del_id, pers_id_author, registration_timestamp, modification_timestamp, version
@@ -149,6 +159,11 @@ CREATE OR REPLACE RULE data_set_relationships_update AS
 			      version = NEW.version
           WHERE data_id_parent = NEW.data_id_parent and data_id_child = NEW.data_id_child;
           
+CREATE OR REPLACE RULE data_set_relationships_delete AS
+    ON DELETE TO data_set_relationships DO INSTEAD
+       DELETE FROM data_set_relationships_all
+              WHERE data_id_parent = OLD.data_id_parent and data_id_child = OLD.data_id_child;
+
 ---------------------
 -- experiment view --
 ---------------------
@@ -205,6 +220,11 @@ CREATE OR REPLACE RULE experiment_update AS
               version = NEW.version
           WHERE id = NEW.id;
      
+CREATE OR REPLACE RULE experiment_delete AS
+    ON DELETE TO experiments DO INSTEAD
+       DELETE FROM experiments_all
+              WHERE id = OLD.id;
+ 
 DROP VIEW experiments_deleted;
 CREATE VIEW experiments_deleted AS
      SELECT id, perm_id, code, exty_id, pers_id_registerer, pers_id_modifier, registration_timestamp, modification_timestamp, proj_id, del_id, is_public, version 
@@ -219,6 +239,11 @@ CREATE OR REPLACE RULE experiments_deleted_update AS
               version = NEW.version
           WHERE id = NEW.id;
      
+CREATE OR REPLACE RULE experiments_deleted_delete AS
+    ON DELETE TO experiments_deleted DO INSTEAD
+       DELETE FROM experiments_all
+              WHERE id = OLD.id;
+                           
 -----------------
 -- sample view --
 -----------------
@@ -281,6 +306,11 @@ CREATE OR REPLACE RULE sample_update AS
               version = NEW.version
           WHERE id = NEW.id;
      
+CREATE OR REPLACE RULE sample_delete AS
+    ON DELETE TO samples DO INSTEAD
+       DELETE FROM samples_all
+              WHERE id = OLD.id;
+              
 DROP VIEW samples_deleted;
 CREATE VIEW samples_deleted AS
      SELECT id, perm_id, code, expe_id, saty_id, registration_timestamp, modification_timestamp, pers_id_registerer, pers_id_modifier, del_id, dbin_id, space_id, samp_id_part_of, version 
@@ -295,6 +325,11 @@ CREATE OR REPLACE RULE sample_deleted_update AS
               version = NEW.version
           WHERE id = NEW.id;
      
+CREATE OR REPLACE RULE sample_deleted_delete AS
+    ON DELETE TO samples_deleted DO INSTEAD
+       DELETE FROM samples_all
+              WHERE id = OLD.id;
+              
 DROP VIEW sample_relationships;
 CREATE VIEW sample_relationships AS
    SELECT id, sample_id_parent, relationship_id, sample_id_child, del_id, pers_id_author, registration_timestamp, modification_timestamp, version
@@ -336,6 +371,12 @@ CREATE OR REPLACE RULE sample_relationships_update AS
 			      modification_timestamp = NEW.modification_timestamp,
 			      version = NEW.version
           WHERE id = NEW.id;
+
+CREATE OR REPLACE RULE sample_relationships_delete AS
+    ON DELETE TO sample_relationships DO INSTEAD
+       DELETE FROM sample_relationships_all
+              WHERE id = OLD.id;
+
      
 
               
diff --git a/openbis/sourceTest/sql/postgresql/125/020=database_version_logs.tsv b/openbis/sourceTest/sql/postgresql/125/020=database_version_logs.tsv
index c507f7c2fa6f15af676da358f848307a57847626..c9606074117a76c630087d2736eb7fa0f6c00327 100644
--- a/openbis/sourceTest/sql/postgresql/125/020=database_version_logs.tsv
+++ b/openbis/sourceTest/sql/postgresql/125/020=database_version_logs.tsv
@@ -98,4 +98,4 @@
 122	source/sql/postgresql/migration/migration-121-122.sql	SUCCESS	2012-09-26 00:27:37.904	\\x2d2d204d6967726174696f6e2066726f6d2031323120746f203132320a0a435245415445205441424c45204d45544150524f4a4543545320280a09494420202020202020202020202020544543485f4944204e4f54204e554c4c2c0a094e414d452020202020202020202020434f4445204e4f54204e554c4c2c0a094445534352495054494f4e202020204445534352495054494f4e5f323030302c0a094f574e455220202020202020202020544543485f4944204e4f54204e554c4c2c0a09505249564154452020202020202020424f4f4c45414e5f43484152204e4f54204e554c4c2044454641554c5420545255452c0a094352454154494f4e5f44415445202054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d500a293b0a0a4352454154452053455155454e4345204d45544150524f4a4543545f49445f5345513b0a0a414c544552205441424c45204d45544150524f4a454354532041444420434f4e53545241494e54204d45544150524f4a454354535f504b205052494d415259204b4559284944293b0a0a414c544552205441424c45204d45544150524f4a454354532041444420434f4e53545241494e54204d45544150524f4a454354535f4f574e45525f464b20464f524549474e204b455920284f574e455229205245464552454e43455320504552534f4e5328494429204f4e2044454c45544520434153434144453b0a0a414c544552205441424c45204d45544150524f4a454354532041444420434f4e53545241494e54204d45544150524f4a454354535f4e414d455f4f574e45525f554b20554e4951554520284e414d452c204f574e4552293b0a0a43524541544520494e444558204d45544150524f4a454354535f4f574e45525f464b5f49204f4e204d45544150524f4a4543545320284f574e4552293b0a43524541544520494e444558204d45544150524f4a454354535f4e414d455f49204f4e204d45544150524f4a4543545320284e414d45293b0a43524541544520494e444558204d45544150524f4a454354535f4e414d455f4f574e45525f49204f4e204d45544150524f4a4543545320284e414d452c204f574e4552293b0a0a435245415445205441424c45204d45544150524f4a4543545f41535349474e4d454e545320280a0949442020202020202020202020202020544543485f4944204e4f54204e554c4c2c0a094d4550525f4944202020202020202020544543485f4944204e4f54204e554c4c2c0a09455850455f4944202020202020202020544543485f49442c0a0953414d505f4944202020202020202020544543485f49442c0a09444154415f4944202020202020202020544543485f49442c0a094d4154455f4944202020202020202020544543485f49442c0a094352454154494f4e5f44415445202054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d500a293b0a0a4352454154452053455155454e4345204d45544150524f4a4543545f41535349474e4d454e545f49445f5345513b0a0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f504b205052494d415259204b4559284944293b0a0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f4d4550525f49445f464b20464f524549474e204b455920284d4550525f494429205245464552454e434553204d45544150524f4a4543545328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f455850455f49445f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f53414d505f49445f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f444154415f49445f464b20464f524549474e204b45592028444154415f494429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f4d4154455f49445f464b20464f524549474e204b455920284d4154455f494429205245464552454e434553204d4154455249414c5328494429204f4e2044454c45544520434153434144453b0a0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f434845434b5f4e4e20434845434b20280a0928455850455f4944204953204e4f54204e554c4c20414e442053414d505f4944204953204e554c4c20414e4420444154415f4944204953204e554c4c20414e44204d4154455f4944204953204e554c4c29204f520a0928455850455f4944204953204e554c4c20414e442053414d505f4944204953204e4f54204e554c4c20414e4420444154415f4944204953204e554c4c20414e44204d4154455f4944204953204e554c4c29204f520a0928455850455f4944204953204e554c4c20414e442053414d505f4944204953204e554c4c20414e4420444154415f4944204953204e4f54204e554c4c20414e44204d4154455f4944204953204e554c4c29204f520a0928455850455f4944204953204e554c4c20414e442053414d505f4944204953204e554c4c20414e4420444154415f4944204953204e554c4c20414e44204d4154455f4944204953204e4f54204e554c4c29293b0a0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f4d4550525f49445f455850455f49445f554b20554e4951554520284d4550525f49442c20455850455f4944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f4d4550525f49445f53414d505f49445f554b20554e4951554520284d4550525f49442c2053414d505f4944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f4d4550525f49445f444154415f49445f554b20554e4951554520284d4550525f49442c20444154415f4944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54532041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f4d4550525f49445f4d4154455f49445f554b20554e4951554520284d4550525f49442c204d4154455f4944293b0a0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f4d4550525f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e545320284d4550525f4944293b0a0a4752414e542053454c454354204f4e205441424c45204d45544150524f4a4543545320544f2047524f5550204f50454e4249535f524541444f4e4c593b0a4752414e542053454c454354204f4e2053455155454e4345204d45544150524f4a4543545f49445f53455120544f2047524f5550204f50454e4249535f524541444f4e4c593b200a4752414e542053454c454354204f4e205441424c45204d45544150524f4a4543545f41535349474e4d454e545320544f2047524f5550204f50454e4249535f524541444f4e4c593b0a4752414e542053454c454354204f4e2053455155454e4345204d45544150524f4a4543545f41535349474e4d454e545f49445f53455120544f2047524f5550204f50454e4249535f524541444f4e4c593b200a	\N
 123	source/sql/postgresql/migration/migration-122-123.sql	SUCCESS	2012-10-08 10:18:37.232	\\x2d2d204d6967726174696f6e2066726f6d2031323220746f203132330a0a414c544552205441424c45206576656e74732044524f5020434f4e53545241494e542065766e745f65745f656e756d5f636b3b0a414c544552205441424c45206576656e74732041444420434f4e53545241494e542065766e745f65745f656e756d5f636b20434845434b200a0928656e746974795f7479706520494e2028274154544143484d454e54272c202744415441534554272c20274558504552494d454e54272c20275350414345272c20274d4154455249414c272c202750524f4a454354272c202750524f50455254595f54595045272c202753414d504c45272c2027564f434142554c415259272c2027415554484f52495a4154494f4e5f47524f5550272c20274d45544150524f4a4543542729293b200a	\N
 124	source/sql/postgresql/migration/migration-123-124.sql	SUCCESS	2012-10-15 15:15:57.332	\\x2d2d204d6967726174696f6e2066726f6d2031323320746f203132340a0a44524f50205441424c45204d45544150524f4a4543545f41535349474e4d454e54533b0a44524f502053455155454e4345204d45544150524f4a4543545f41535349474e4d454e545f49445f5345513b0a0a435245415445205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c20280a0949442020202020202020202020202020544543485f4944204e4f54204e554c4c2c0a094d4550525f4944202020202020202020544543485f4944204e4f54204e554c4c2c0a09455850455f4944202020202020202020544543485f49442c0a0953414d505f4944202020202020202020544543485f49442c0a09444154415f4944202020202020202020544543485f49442c0a094d4154455f4944202020202020202020544543485f49442c0a0944454c5f49440909090909544543485f49442c0a094352454154494f4e5f44415445202054494d455f5354414d505f44464c204e4f54204e554c4c2044454641554c542043555252454e545f54494d455354414d500a293b0a0a4352454154452053455155454e4345204d45544150524f4a4543545f41535349474e4d454e545f49445f5345513b0a0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f504b205052494d415259204b4559284944293b0a0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f464b20464f524549474e204b455920284d4550525f494429205245464552454e434553204d45544150524f4a4543545328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f455850455f49445f464b20464f524549474e204b45592028455850455f494429205245464552454e434553204558504552494d454e54535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f53414d505f49445f464b20464f524549474e204b4559202853414d505f494429205245464552454e4345532053414d504c45535f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f444154415f49445f464b20464f524549474e204b45592028444154415f494429205245464552454e43455320444154415f414c4c28494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4154455f49445f464b20464f524549474e204b455920284d4154455f494429205245464552454e434553204d4154455249414c5328494429204f4e2044454c45544520434153434144453b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f44454c5f49445f464b20464f524549474e204b4559202844454c5f494429205245464552454e4345532044454c4554494f4e53284944293b0a0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f434845434b5f4e4e20434845434b20280a0928455850455f4944204953204e4f54204e554c4c20414e442053414d505f4944204953204e554c4c20414e4420444154415f4944204953204e554c4c20414e44204d4154455f4944204953204e554c4c29204f520a0928455850455f4944204953204e554c4c20414e442053414d505f4944204953204e4f54204e554c4c20414e4420444154415f4944204953204e554c4c20414e44204d4154455f4944204953204e554c4c29204f520a0928455850455f4944204953204e554c4c20414e442053414d505f4944204953204e554c4c20414e4420444154415f4944204953204e4f54204e554c4c20414e44204d4154455f4944204953204e554c4c29204f520a0928455850455f4944204953204e554c4c20414e442053414d505f4944204953204e554c4c20414e4420444154415f4944204953204e554c4c20414e44204d4154455f4944204953204e4f54204e554c4c29293b0a0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f455850455f49445f554b20554e4951554520284d4550525f49442c20455850455f4944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f53414d505f49445f554b20554e4951554520284d4550525f49442c2053414d505f4944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f444154415f49445f554b20554e4951554520284d4550525f49442c20444154415f4944293b0a414c544552205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2041444420434f4e53545241494e54204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f49445f4d4154455f49445f554b20554e4951554520284d4550525f49442c204d4154455f4944293b0a0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4550525f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c20284d4550525f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f455850455f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2028455850455f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f53414d505f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c202853414d505f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f444154415f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c2028444154415f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f4d4154455f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c20284d4154455f4944293b0a43524541544520494e444558204d45544150524f4a4543545f41535349474e4d454e54535f414c4c5f44454c5f464b5f49204f4e204d45544150524f4a4543545f41535349474e4d454e54535f414c4c202844454c5f4944293b0a0a4352454154452056494557204d45544150524f4a4543545f41535349474e4d454e54532041530a20202053454c4543542049442c204d4550525f49442c20455850455f49442c2053414d505f49442c20444154415f49442c204d4154455f49442c2044454c5f49442c204352454154494f4e5f444154450a20202046524f4d204d45544150524f4a4543545f41535349474e4d454e54535f414c4c200a20202057484552452044454c5f4944204953204e554c4c3b0a2020200a435245415445204f52205245504c4143452052554c45204d45544150524f4a4543545f41535349474e4d454e54535f494e534552542041530a202020204f4e20494e5345525420544f204d45544150524f4a4543545f41535349474e4d454e545320444f20494e5354454144200a20202020202020494e5345525420494e544f204d45544150524f4a4543545f41535349474e4d454e54535f414c4c20280a20202020202020202049442c200a2020202020202020204d4550525f49442c0a202020202020202020455850455f49442c0a09090920202053414d505f49442c0a090909202020444154415f49442c0a0909092020204d4154455f49442c0a09090920202044454c5f49442c0a0909092020204352454154494f4e5f444154450a20202020202020292056414c55455320280a2020202020202020204e45572e49442c200a2020202020202020204e45572e4d4550525f49442c0a2020202020202020204e45572e455850455f49442c0a0909092020204e45572e53414d505f49442c0a0909092020204e45572e444154415f49442c0a0909092020204e45572e4d4154455f49442c0a0909092020204e45572e44454c5f49442c0a0909092020204e45572e4352454154494f4e5f444154450a20202020202020293b0a0a435245415445204f52205245504c4143452052554c45204d45544150524f4a4543545f41535349474e4d454e54535f5550444154452041530a202020204f4e2055504441544520544f204d45544150524f4a4543545f41535349474e4d454e545320444f20494e5354454144200a20202020202020555044415445204d45544150524f4a4543545f41535349474e4d454e54535f414c4c0a20202020202020202020534554200a0909092020202020204944203d204e45572e49442c200a20202020202020202009094d4550525f4944203d204e45572e4d4550525f49442c0a2020202020202020200909455850455f4944203d204e45572e455850455f49442c0a090909202020090953414d505f4944203d204e45572e53414d505f49442c0a0909092020200909444154415f4944203d204e45572e444154415f49442c0a09090920202009094d4154455f4944203d204e45572e4d4154455f49442c0a090909202020090944454c5f4944203d204e45572e44454c5f49442c0a09090920202009094352454154494f4e5f44415445203d204e45572e4352454154494f4e5f444154450a202020202020202020205748455245204944203d204e45572e49443b0a202020202020202020200a435245415445204f52205245504c4143452052554c45204d45544150524f4a4543545f41535349474e4d454e54535f44454c4554452041530a202020204f4e2044454c45544520544f204d45544150524f4a4543545f41535349474e4d454e545320444f20494e53544541440a2020202020202044454c4554452046524f4d204d45544150524f4a4543545f41535349474e4d454e54535f414c4c0a20202020202020202020202020205748455245204944203d204f4c442e49443b0a2020200a4752414e542053454c454354204f4e205441424c45204d45544150524f4a4543545f41535349474e4d454e54535f414c4c20544f2047524f5550204f50454e4249535f524541444f4e4c593b0a4752414e542053454c454354204f4e204d45544150524f4a4543545f41535349474e4d454e545320544f2047524f5550204f50454e4249535f524541444f4e4c593b0a4752414e542053454c454354204f4e2053455155454e4345204d45544150524f4a4543545f41535349474e4d454e545f49445f53455120544f2047524f5550204f50454e4249535f524541444f4e4c593b200a0a2020200a	\N
-125	source/sql/postgresql/migration/migration-124-125.sql	SUCCESS	2012-10-30 10:35:14.818	\\x0a414c544552205441424c4520617574686f72697a6174696f6e5f67726f7570732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520636f6e74726f6c6c65645f766f636162756c61726965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520646174615f616c6c2041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520646174615f7365745f70726f706572746965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520646174615f7365745f72656c6174696f6e73686970735f616c6c2041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520646174615f73746f7265732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c45206578706572696d656e745f70726f706572746965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c45206578706572696d656e74735f616c6c2041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452066696c746572732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520677269645f637573746f6d5f636f6c756d6e732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c45206d6174657269616c5f70726f706572746965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c45206d6174657269616c732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452070726f6a656374732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520717565726965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452073616d706c655f70726f706572746965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452073616d706c655f72656c6174696f6e73686970735f616c6c2041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452073616d706c65735f616c6c0941444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a0a2d2d2d2d2d2d2d2d2d2d2d0a2d2d205669657773202d2d0a2d2d2d2d2d2d2d2d2d2d2d0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20646174612076696577202d2d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a44524f50205649455720646174613b0a435245415445205649455720646174612041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f706c616365686f6c6465722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2063746e725f6f726465722c2063746e725f69642c2064656c5f69642c2076657273696f6e200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a2020202020200a435245415445204f52205245504c4143452052554c4520646174615f696e736572742041530a20204f4e20494e5345525420544f206461746120444f20494e5354454144200a2020202020494e5345525420494e544f20646174615f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202063746e725f69642c0a2020202020202063746e725f6f726465722c0a2020202020202064656c5f69642c0a20202020202020657870655f69642c0a20202020202020646173745f69642c0a20202020202020646174615f70726f64756365725f636f64652c0a20202020202020647374795f69642c0a2020202020202069735f646572697665642c0a2020202020202069735f706c616365686f6c6465722c0a2020202020202069735f76616c69642c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020706572735f69645f726567697374657265722c0a20202020202020706572735f69645f6d6f6469666965722c0a2020202020202070726f64756374696f6e5f74696d657374616d702c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202073616d705f69642c0a2020202020202076657273696f6e0a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e63746e725f69642c0a202020202020204e45572e63746e725f6f726465722c0a202020202020204e45572e64656c5f69642c200a202020202020204e45572e657870655f69642c0a202020202020204e45572e646173745f69642c0a202020202020204e45572e646174615f70726f64756365725f636f64652c0a202020202020204e45572e647374795f69642c0a202020202020204e45572e69735f646572697665642c200a202020202020204e45572e69735f706c616365686f6c6465722c0a202020202020204e45572e69735f76616c69642c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e706572735f69645f726567697374657265722c0a202020202020204e45572e706572735f69645f6d6f6469666965722c0a202020202020204e45572e70726f64756374696f6e5f74696d657374616d702c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e73616d705f69642c0a202020202020204e45572e76657273696f6e0a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f7570646174652041530a202020204f4e2055504441544520544f206461746120444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202063746e725f6964203d204e45572e63746e725f69642c0a202020202020202020202020202063746e725f6f72646572203d204e45572e63746e725f6f726465722c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a2020202020202020202020202020646173745f6964203d204e45572e646173745f69642c0a2020202020202020202020202020646174615f70726f64756365725f636f6465203d204e45572e646174615f70726f64756365725f636f64652c0a2020202020202020202020202020647374795f6964203d204e45572e647374795f69642c0a202020202020202020202020202069735f64657269766564203d204e45572e69735f646572697665642c0a202020202020202020202020202069735f706c616365686f6c646572203d204e45572e69735f706c616365686f6c6465722c0a202020202020202020202020202069735f76616c6964203d204e45572e69735f76616c69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f64756374696f6e5f74696d657374616d70203d204e45572e70726f64756374696f6e5f74696d657374616d702c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f6964203d204e45572e73616d705f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020205748455245206964203d204e45572e69643b0a20202020202020202020202020200a44524f50205649455720646174615f64656c657465643b0a435245415445205649455720646174615f64656c657465642041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f706c616365686f6c6465722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2063746e725f6f726465722c2063746e725f69642c2064656c5f69642c2076657273696f6e200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f20646174615f64656c6574656420444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a44524f50205649455720646174615f7365745f72656c6174696f6e73686970733b0a435245415445205649455720646174615f7365745f72656c6174696f6e73686970732041530a20202053454c45435420646174615f69645f706172656e742c20646174615f69645f6368696c642c2064656c5f69642c20706572735f69645f617574686f722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2076657273696f6e0a20202046524f4d20646174615f7365745f72656c6174696f6e73686970735f616c6c200a20202057484552452064656c5f6964204953204e554c4c3b0a2020200a435245415445204f52205245504c4143452052554c4520646174615f7365745f72656c6174696f6e73686970735f696e736572742041530a202020204f4e20494e5345525420544f20646174615f7365745f72656c6174696f6e736869707320444f20494e5354454144200a20202020202020494e5345525420494e544f20646174615f7365745f72656c6174696f6e73686970735f616c6c20280a202020202020202020646174615f69645f706172656e742c200a202020202020202020646174615f69645f6368696c642c0a202020202020202020706572735f69645f617574686f722c0a090909202020726567697374726174696f6e5f74696d657374616d702c0a0909092020206d6f64696669636174696f6e5f74696d657374616d702c0a09090920202076657273696f6e0a20202020202020292056414c55455320280a2020202020202020204e45572e646174615f69645f706172656e742c200a2020202020202020204e45572e646174615f69645f6368696c642c0a2020202020202020204e45572e706572735f69645f617574686f722c0a0909092020204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a0909092020204e45572e76657273696f6e0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c4520646174615f7365745f72656c6174696f6e73686970735f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f72656c6174696f6e736869707320444f20494e5354454144200a2020202020202055504441544520646174615f7365745f72656c6174696f6e73686970735f616c6c0a20202020202020202020534554200a090909202020202020646174615f69645f706172656e74203d204e45572e646174615f69645f706172656e742c200a090909202020202020646174615f69645f6368696c64203d204e45572e646174615f69645f6368696c642c200a09090920202020202064656c5f6964203d204e45572e64656c5f69642c0a090909202020202020706572735f69645f617574686f72203d204e45572e706572735f69645f617574686f722c0a090909202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a09090920202020202076657273696f6e203d204e45572e76657273696f6e0a20202020202020202020574845524520646174615f69645f706172656e74203d204e45572e646174615f69645f706172656e7420616e6420646174615f69645f6368696c64203d204e45572e646174615f69645f6368696c643b0a202020202020202020200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d206578706572696d656e742076696577202d2d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a44524f502056494557206578706572696d656e74733b0a4352454154452056494557206578706572696d656e74732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c2069735f7075626c69632c2076657273696f6e200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a435245415445204f52205245504c4143452052554c45206578706572696d656e745f696e736572742041530a20204f4e20494e5345525420544f206578706572696d656e747320444f20494e5354454144200a2020202020494e5345525420494e544f206578706572696d656e74735f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202064656c5f69642c0a20202020202020657874795f69642c200a2020202020202069735f7075626c69632c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a202020202020207065726d5f69642c0a20202020202020706572735f69645f726567697374657265722c200a20202020202020706572735f69645f6d6f6469666965722c200a2020202020202070726f6a5f69642c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202076657273696f6e0a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e64656c5f69642c0a202020202020204e45572e657874795f69642c200a202020202020204e45572e69735f7075626c69632c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e7065726d5f69642c0a202020202020204e45572e706572735f69645f726567697374657265722c200a202020202020204e45572e706572735f69645f6d6f6469666965722c200a202020202020204e45572e70726f6a5f69642c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e76657273696f6e0a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e747320444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a2020202020202020202020202020657874795f6964203d204e45572e657874795f69642c0a202020202020202020202020202069735f7075626c6963203d204e45572e69735f7075626c69632c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f6a5f6964203d204e45572e70726f6a5f69642c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a44524f502056494557206578706572696d656e74735f64656c657465643b0a4352454154452056494557206578706572696d656e74735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c2069735f7075626c69632c2076657273696f6e200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a2020202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e74735f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e74735f64656c6574656420444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2073616d706c652076696577202d2d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a44524f5020564945572073616d706c65733b0a43524541544520564945572073616d706c65732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2064656c5f69642c206462696e5f69642c2073706163655f69642c2073616d705f69645f706172745f6f662c2076657273696f6e200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a2020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c657320444f20494e5354454144200a20202020202020494e5345525420494e544f2073616d706c65735f616c6c20280a20202020202020202069642c200a202020202020202020636f64652c200a2020202020202020206462696e5f69642c0a20202020202020202064656c5f69642c0a202020202020202020657870655f69642c0a2020202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020207065726d5f69642c0a202020202020202020706572735f69645f726567697374657265722c200a202020202020202020706572735f69645f6d6f6469666965722c200a202020202020202020726567697374726174696f6e5f74696d657374616d702c200a20202020202020202073616d705f69645f706172745f6f662c0a202020202020202020736174795f69642c200a20202020202020202073706163655f69642c0a20202020202020202076657273696f6e0a20202020202020292056414c55455320280a2020202020202020204e45572e69642c200a2020202020202020204e45572e636f64652c200a2020202020202020204e45572e6462696e5f69642c0a2020202020202020204e45572e64656c5f69642c0a2020202020202020204e45572e657870655f69642c0a2020202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020204e45572e7065726d5f69642c0a2020202020202020204e45572e706572735f69645f726567697374657265722c200a2020202020202020204e45572e706572735f69645f6d6f6469666965722c200a2020202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c200a2020202020202020204e45572e73616d705f69645f706172745f6f662c0a2020202020202020204e45572e736174795f69642c200a2020202020202020204e45572e73706163655f69642c0a2020202020202020204e45572e76657273696f6e0a20202020202020293b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c657320444f20494e5354454144200a202020202020205550444154452073616d706c65735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a20202020202020202020202020206462696e5f6964203d204e45572e6462696e5f69642c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f69645f706172745f6f66203d204e45572e73616d705f69645f706172745f6f662c0a2020202020202020202020202020736174795f6964203d204e45572e736174795f69642c0a202020202020202020202020202073706163655f6964203d204e45572e73706163655f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a44524f5020564945572073616d706c65735f64656c657465643b0a43524541544520564945572073616d706c65735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2064656c5f69642c206462696e5f69642c2073706163655f69642c2073616d705f69645f706172745f6f662c2076657273696f6e200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f64656c6574656420444f20494e5354454144200a202020202020205550444154452073616d706c65735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a44524f5020564945572073616d706c655f72656c6174696f6e73686970733b0a43524541544520564945572073616d706c655f72656c6174696f6e73686970732041530a20202053454c4543542069642c2073616d706c655f69645f706172656e742c2072656c6174696f6e736869705f69642c2073616d706c655f69645f6368696c642c2064656c5f69642c20706572735f69645f617574686f722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2076657273696f6e0a20202046524f4d2073616d706c655f72656c6174696f6e73686970735f616c6c0a20202057484552452064656c5f6964204953204e554c4c3b0a2020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f72656c6174696f6e73686970735f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c655f72656c6174696f6e736869707320444f20494e5354454144200a20202020202020494e5345525420494e544f2073616d706c655f72656c6174696f6e73686970735f616c6c20280a20202020202020202069642c200a20202020202020202073616d706c655f69645f706172656e742c200a20202020202020202072656c6174696f6e736869705f69642c200a20202020202020202073616d706c655f69645f6368696c642c0a202020202020202020706572735f69645f617574686f722c0a090909202020726567697374726174696f6e5f74696d657374616d702c0a2020200920202020206d6f64696669636174696f6e5f74696d657374616d702c0a20202009202020202076657273696f6e0a20202020202020292056414c55455320280a2020202020202020204e45572e69642c200a2020202020202020204e45572e73616d706c655f69645f706172656e742c200a2020202020202020204e45572e72656c6174696f6e736869705f69642c200a2020202020202020204e45572e73616d706c655f69645f6368696c642c0a2020202020202020204e45572e706572735f69645f617574686f722c0a0909092020204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a0909092020204e45572e76657273696f6e0a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f72656c6174696f6e73686970735f7570646174652041530a202020204f4e2055504441544520544f2073616d706c655f72656c6174696f6e736869707320444f20494e5354454144200a202020202020205550444154452073616d706c655f72656c6174696f6e73686970735f616c6c0a20202020202020202020534554200a09090920202020202073616d706c655f69645f706172656e74203d204e45572e73616d706c655f69645f706172656e742c200a09090920202020202072656c6174696f6e736869705f6964203d204e45572e72656c6174696f6e736869705f69642c200a09090920202020202073616d706c655f69645f6368696c64203d204e45572e73616d706c655f69645f6368696c642c0a09090920202020202064656c5f6964203d204e45572e64656c5f69642c0a090909202020202020706572735f69645f617574686f72203d204e45572e706572735f69645f617574686f722c0a090909202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a09090920202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a0a20202020202020202020202020200a	\N
+125	source/sql/postgresql/migration/migration-124-125.sql	SUCCESS	2012-10-30 14:05:04.775	\\x0a414c544552205441424c4520617574686f72697a6174696f6e5f67726f7570732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520636f6e74726f6c6c65645f766f636162756c61726965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520646174615f616c6c2041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520646174615f7365745f70726f706572746965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520646174615f7365745f72656c6174696f6e73686970735f616c6c2041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520646174615f73746f7265732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c45206578706572696d656e745f70726f706572746965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c45206578706572696d656e74735f616c6c2041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452066696c746572732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520677269645f637573746f6d5f636f6c756d6e732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c45206d6174657269616c5f70726f706572746965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c45206d6174657269616c732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452070726f6a656374732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c4520717565726965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452073616d706c655f70726f706572746965732041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452073616d706c655f72656c6174696f6e73686970735f616c6c2041444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a414c544552205441424c452073616d706c65735f616c6c0941444420434f4c554d4e2076657273696f6e20696e74656765722044454641554c5420303b0a0a2d2d2d2d2d2d2d2d2d2d2d0a2d2d205669657773202d2d0a2d2d2d2d2d2d2d2d2d2d2d0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20646174612076696577202d2d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a44524f50205649455720646174613b0a435245415445205649455720646174612041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f706c616365686f6c6465722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2063746e725f6f726465722c2063746e725f69642c2064656c5f69642c2076657273696f6e200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a2020202020200a435245415445204f52205245504c4143452052554c4520646174615f696e736572742041530a20204f4e20494e5345525420544f206461746120444f20494e5354454144200a2020202020494e5345525420494e544f20646174615f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202063746e725f69642c0a2020202020202063746e725f6f726465722c0a2020202020202064656c5f69642c0a20202020202020657870655f69642c0a20202020202020646173745f69642c0a20202020202020646174615f70726f64756365725f636f64652c0a20202020202020647374795f69642c0a2020202020202069735f646572697665642c0a2020202020202069735f706c616365686f6c6465722c0a2020202020202069735f76616c69642c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020706572735f69645f726567697374657265722c0a20202020202020706572735f69645f6d6f6469666965722c0a2020202020202070726f64756374696f6e5f74696d657374616d702c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202073616d705f69642c0a2020202020202076657273696f6e0a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e63746e725f69642c0a202020202020204e45572e63746e725f6f726465722c0a202020202020204e45572e64656c5f69642c200a202020202020204e45572e657870655f69642c0a202020202020204e45572e646173745f69642c0a202020202020204e45572e646174615f70726f64756365725f636f64652c0a202020202020204e45572e647374795f69642c0a202020202020204e45572e69735f646572697665642c200a202020202020204e45572e69735f706c616365686f6c6465722c0a202020202020204e45572e69735f76616c69642c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e706572735f69645f726567697374657265722c0a202020202020204e45572e706572735f69645f6d6f6469666965722c0a202020202020204e45572e70726f64756374696f6e5f74696d657374616d702c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e73616d705f69642c0a202020202020204e45572e76657273696f6e0a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f7570646174652041530a202020204f4e2055504441544520544f206461746120444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202063746e725f6964203d204e45572e63746e725f69642c0a202020202020202020202020202063746e725f6f72646572203d204e45572e63746e725f6f726465722c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a2020202020202020202020202020646173745f6964203d204e45572e646173745f69642c0a2020202020202020202020202020646174615f70726f64756365725f636f6465203d204e45572e646174615f70726f64756365725f636f64652c0a2020202020202020202020202020647374795f6964203d204e45572e647374795f69642c0a202020202020202020202020202069735f64657269766564203d204e45572e69735f646572697665642c0a202020202020202020202020202069735f706c616365686f6c646572203d204e45572e69735f706c616365686f6c6465722c0a202020202020202020202020202069735f76616c6964203d204e45572e69735f76616c69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f64756374696f6e5f74696d657374616d70203d204e45572e70726f64756374696f6e5f74696d657374616d702c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f6964203d204e45572e73616d705f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020205748455245206964203d204e45572e69643b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c4520646174615f616c6c2041530a202020204f4e2044454c45544520544f206461746120444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a44524f50205649455720646174615f64656c657465643b0a435245415445205649455720646174615f64656c657465642041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2069735f706c616365686f6c6465722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2063746e725f6f726465722c2063746e725f69642c2064656c5f69642c2076657273696f6e200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f20646174615f64656c6574656420444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b2020202020202020202020202020200a20202020202020202020202020200a44524f50205649455720646174615f7365745f72656c6174696f6e73686970733b0a435245415445205649455720646174615f7365745f72656c6174696f6e73686970732041530a20202053454c45435420646174615f69645f706172656e742c20646174615f69645f6368696c642c2064656c5f69642c20706572735f69645f617574686f722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2076657273696f6e0a20202046524f4d20646174615f7365745f72656c6174696f6e73686970735f616c6c200a20202057484552452064656c5f6964204953204e554c4c3b0a2020200a435245415445204f52205245504c4143452052554c4520646174615f7365745f72656c6174696f6e73686970735f696e736572742041530a202020204f4e20494e5345525420544f20646174615f7365745f72656c6174696f6e736869707320444f20494e5354454144200a20202020202020494e5345525420494e544f20646174615f7365745f72656c6174696f6e73686970735f616c6c20280a202020202020202020646174615f69645f706172656e742c200a202020202020202020646174615f69645f6368696c642c0a202020202020202020706572735f69645f617574686f722c0a090909202020726567697374726174696f6e5f74696d657374616d702c0a0909092020206d6f64696669636174696f6e5f74696d657374616d702c0a09090920202076657273696f6e0a20202020202020292056414c55455320280a2020202020202020204e45572e646174615f69645f706172656e742c200a2020202020202020204e45572e646174615f69645f6368696c642c0a2020202020202020204e45572e706572735f69645f617574686f722c0a0909092020204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a0909092020204e45572e76657273696f6e0a20202020202020293b0a0a435245415445204f52205245504c4143452052554c4520646174615f7365745f72656c6174696f6e73686970735f7570646174652041530a202020204f4e2055504441544520544f20646174615f7365745f72656c6174696f6e736869707320444f20494e5354454144200a2020202020202055504441544520646174615f7365745f72656c6174696f6e73686970735f616c6c0a20202020202020202020534554200a090909202020202020646174615f69645f706172656e74203d204e45572e646174615f69645f706172656e742c200a090909202020202020646174615f69645f6368696c64203d204e45572e646174615f69645f6368696c642c200a09090920202020202064656c5f6964203d204e45572e64656c5f69642c0a090909202020202020706572735f69645f617574686f72203d204e45572e706572735f69645f617574686f722c0a090909202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a09090920202020202076657273696f6e203d204e45572e76657273696f6e0a20202020202020202020574845524520646174615f69645f706172656e74203d204e45572e646174615f69645f706172656e7420616e6420646174615f69645f6368696c64203d204e45572e646174615f69645f6368696c643b0a202020202020202020200a435245415445204f52205245504c4143452052554c4520646174615f7365745f72656c6174696f6e73686970735f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f7365745f72656c6174696f6e736869707320444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f7365745f72656c6174696f6e73686970735f616c6c0a2020202020202020202020202020574845524520646174615f69645f706172656e74203d204f4c442e646174615f69645f706172656e7420616e6420646174615f69645f6368696c64203d204f4c442e646174615f69645f6368696c643b0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d206578706572696d656e742076696577202d2d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a44524f502056494557206578706572696d656e74733b0a4352454154452056494557206578706572696d656e74732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c2069735f7075626c69632c2076657273696f6e200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a0a435245415445204f52205245504c4143452052554c45206578706572696d656e745f696e736572742041530a20204f4e20494e5345525420544f206578706572696d656e747320444f20494e5354454144200a2020202020494e5345525420494e544f206578706572696d656e74735f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202064656c5f69642c0a20202020202020657874795f69642c200a2020202020202069735f7075626c69632c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a202020202020207065726d5f69642c0a20202020202020706572735f69645f726567697374657265722c200a20202020202020706572735f69645f6d6f6469666965722c200a2020202020202070726f6a5f69642c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202076657273696f6e0a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e64656c5f69642c0a202020202020204e45572e657874795f69642c200a202020202020204e45572e69735f7075626c69632c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e7065726d5f69642c0a202020202020204e45572e706572735f69645f726567697374657265722c200a202020202020204e45572e706572735f69645f6d6f6469666965722c200a202020202020204e45572e70726f6a5f69642c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e76657273696f6e0a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e747320444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a2020202020202020202020202020657874795f6964203d204e45572e657874795f69642c0a202020202020202020202020202069735f7075626c6963203d204e45572e69735f7075626c69632c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a202020202020202020202020202070726f6a5f6964203d204e45572e70726f6a5f69642c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e747320444f20494e53544541440a2020202020202044454c4554452046524f4d206578706572696d656e74735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a200a44524f502056494557206578706572696d656e74735f64656c657465643b0a4352454154452056494557206578706572696d656e74735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c2069735f7075626c69632c2076657273696f6e200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a2020202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e74735f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e74735f64656c6574656420444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e74735f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e74735f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d206578706572696d656e74735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a2020202020202020202020202020202020202020202020202020200a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2073616d706c652076696577202d2d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a44524f5020564945572073616d706c65733b0a43524541544520564945572073616d706c65732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2064656c5f69642c206462696e5f69642c2073706163655f69642c2073616d705f69645f706172745f6f662c2076657273696f6e200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a2020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c657320444f20494e5354454144200a20202020202020494e5345525420494e544f2073616d706c65735f616c6c20280a20202020202020202069642c200a202020202020202020636f64652c200a2020202020202020206462696e5f69642c0a20202020202020202064656c5f69642c0a202020202020202020657870655f69642c0a2020202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020207065726d5f69642c0a202020202020202020706572735f69645f726567697374657265722c200a202020202020202020706572735f69645f6d6f6469666965722c200a202020202020202020726567697374726174696f6e5f74696d657374616d702c200a20202020202020202073616d705f69645f706172745f6f662c0a202020202020202020736174795f69642c200a20202020202020202073706163655f69642c0a20202020202020202076657273696f6e0a20202020202020292056414c55455320280a2020202020202020204e45572e69642c200a2020202020202020204e45572e636f64652c200a2020202020202020204e45572e6462696e5f69642c0a2020202020202020204e45572e64656c5f69642c0a2020202020202020204e45572e657870655f69642c0a2020202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020204e45572e7065726d5f69642c0a2020202020202020204e45572e706572735f69645f726567697374657265722c200a2020202020202020204e45572e706572735f69645f6d6f6469666965722c200a2020202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c200a2020202020202020204e45572e73616d705f69645f706172745f6f662c0a2020202020202020204e45572e736174795f69642c200a2020202020202020204e45572e73706163655f69642c0a2020202020202020204e45572e76657273696f6e0a20202020202020293b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c657320444f20494e5354454144200a202020202020205550444154452073616d706c65735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a20202020202020202020202020206462696e5f6964203d204e45572e6462696e5f69642c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020706572735f69645f6d6f646966696572203d204e45572e706572735f69645f6d6f6469666965722c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f69645f706172745f6f66203d204e45572e73616d705f69645f706172745f6f662c0a2020202020202020202020202020736174795f6964203d204e45572e736174795f69642c0a202020202020202020202020202073706163655f6964203d204e45572e73706163655f69642c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c657320444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a44524f5020564945572073616d706c65735f64656c657465643b0a43524541544520564945572073616d706c65735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c20706572735f69645f6d6f6469666965722c2064656c5f69642c206462696e5f69642c2073706163655f69642c2073616d705f69645f706172745f6f662c2076657273696f6e200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f64656c6574656420444f20494e5354454144200a202020202020205550444154452073616d706c65735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020202020202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c65735f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a44524f5020564945572073616d706c655f72656c6174696f6e73686970733b0a43524541544520564945572073616d706c655f72656c6174696f6e73686970732041530a20202053454c4543542069642c2073616d706c655f69645f706172656e742c2072656c6174696f6e736869705f69642c2073616d706c655f69645f6368696c642c2064656c5f69642c20706572735f69645f617574686f722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2076657273696f6e0a20202046524f4d2073616d706c655f72656c6174696f6e73686970735f616c6c0a20202057484552452064656c5f6964204953204e554c4c3b0a2020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f72656c6174696f6e73686970735f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c655f72656c6174696f6e736869707320444f20494e5354454144200a20202020202020494e5345525420494e544f2073616d706c655f72656c6174696f6e73686970735f616c6c20280a20202020202020202069642c200a20202020202020202073616d706c655f69645f706172656e742c200a20202020202020202072656c6174696f6e736869705f69642c200a20202020202020202073616d706c655f69645f6368696c642c0a202020202020202020706572735f69645f617574686f722c0a090909202020726567697374726174696f6e5f74696d657374616d702c0a2020200920202020206d6f64696669636174696f6e5f74696d657374616d702c0a20202009202020202076657273696f6e0a20202020202020292056414c55455320280a2020202020202020204e45572e69642c200a2020202020202020204e45572e73616d706c655f69645f706172656e742c200a2020202020202020204e45572e72656c6174696f6e736869705f69642c200a2020202020202020204e45572e73616d706c655f69645f6368696c642c0a2020202020202020204e45572e706572735f69645f617574686f722c0a0909092020204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a0909092020204e45572e76657273696f6e0a20202020202020293b0a202020202020200a435245415445204f52205245504c4143452052554c452073616d706c655f72656c6174696f6e73686970735f7570646174652041530a202020204f4e2055504441544520544f2073616d706c655f72656c6174696f6e736869707320444f20494e5354454144200a202020202020205550444154452073616d706c655f72656c6174696f6e73686970735f616c6c0a20202020202020202020534554200a09090920202020202073616d706c655f69645f706172656e74203d204e45572e73616d706c655f69645f706172656e742c200a09090920202020202072656c6174696f6e736869705f6964203d204e45572e72656c6174696f6e736869705f69642c200a09090920202020202073616d706c655f69645f6368696c64203d204e45572e73616d706c655f69645f6368696c642c0a09090920202020202064656c5f6964203d204e45572e64656c5f69642c0a090909202020202020706572735f69645f617574686f72203d204e45572e706572735f69645f617574686f722c0a090909202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a0909092020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a09090920202020202076657273696f6e203d204e45572e76657273696f6e0a202020202020202020205748455245206964203d204e45572e69643b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f72656c6174696f6e73686970735f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c655f72656c6174696f6e736869707320444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c655f72656c6174696f6e73686970735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a0a20202020200a0a20202020202020202020202020200a	\N
diff --git a/openbis/sourceTest/sql/postgresql/125/finish-125.sql b/openbis/sourceTest/sql/postgresql/125/finish-125.sql
index 2eff5bcccaf847de4e3cc2e7163f82d14f964fdf..645bf66f00c96c9c545d5d3ca525b02425240ce2 100644
--- a/openbis/sourceTest/sql/postgresql/125/finish-125.sql
+++ b/openbis/sourceTest/sql/postgresql/125/finish-125.sql
@@ -357,9 +357,11 @@ CREATE INDEX space_pers_registered_by_fk_i ON spaces USING btree (pers_id_regist
 CREATE INDEX stpt_pers_fk_i ON sample_type_property_types USING btree (pers_id_registerer);
 CREATE INDEX stpt_prty_fk_i ON sample_type_property_types USING btree (prty_id);
 CREATE INDEX stpt_saty_fk_i ON sample_type_property_types USING btree (saty_id);
+CREATE RULE data_all AS ON DELETE TO data DO INSTEAD DELETE FROM data_all WHERE ((data_all.id)::bigint = (old.id)::bigint);
 CREATE RULE data_container_delete AS ON DELETE TO data_all WHERE (old.ctnr_id IS NOT NULL) DO UPDATE data_set_relationships_history SET valid_until_timestamp = now() WHERE (((((data_set_relationships_history.main_data_id)::bigint = (old.ctnr_id)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.id)::bigint)) AND (data_set_relationships_history.valid_until_timestamp IS NULL)) AND ((data_set_relationships_history.relation_type)::text = 'CONTAINER'::text));
 CREATE RULE data_container_insert AS ON INSERT TO data_all WHERE (new.ctnr_id IS NOT NULL) DO (INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.ctnr_id, 'CONTAINER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.id, 'CONTAINED'::text, new.ctnr_id, (SELECT data_all.code FROM data_all WHERE ((data_all.id)::bigint = (new.ctnr_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); );
 CREATE RULE data_container_remove_update AS ON UPDATE TO data_all WHERE ((old.ctnr_id IS NOT NULL) AND (new.ctnr_id IS NULL)) DO UPDATE data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE ((((((data_set_relationships_history.main_data_id)::bigint = (old.ctnr_id)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.id)::bigint)) AND (data_set_relationships_history.valid_until_timestamp IS NULL)) AND ((data_set_relationships_history.relation_type)::text = 'CONTAINER'::text)) OR (((((data_set_relationships_history.main_data_id)::bigint = (old.id)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.ctnr_id)::bigint)) AND (data_set_relationships_history.valid_until_timestamp IS NULL)) AND ((data_set_relationships_history.relation_type)::text = 'CONTAINED'::text)));
+CREATE RULE data_deleted_delete AS ON DELETE TO data_deleted DO INSTEAD DELETE FROM data_all WHERE ((data_all.id)::bigint = (old.id)::bigint);
 CREATE RULE data_deleted_update AS ON UPDATE TO data_deleted DO INSTEAD UPDATE data_all SET del_id = new.del_id, modification_timestamp = new.modification_timestamp, version = new.version WHERE ((data_all.id)::bigint = (new.id)::bigint);
 CREATE RULE data_insert AS ON INSERT TO data DO INSTEAD INSERT INTO data_all (id, code, ctnr_id, ctnr_order, del_id, expe_id, dast_id, data_producer_code, dsty_id, is_derived, is_placeholder, is_valid, modification_timestamp, pers_id_registerer, pers_id_modifier, production_timestamp, registration_timestamp, samp_id, version) VALUES (new.id, new.code, new.ctnr_id, new.ctnr_order, new.del_id, new.expe_id, new.dast_id, new.data_producer_code, new.dsty_id, new.is_derived, new.is_placeholder, new.is_valid, new.modification_timestamp, new.pers_id_registerer, new.pers_id_modifier, new.production_timestamp, new.registration_timestamp, new.samp_id, new.version);
 CREATE RULE data_parent_child_delete AS ON DELETE TO data_set_relationships_all WHERE (old.del_id IS NULL) DO UPDATE data_set_relationships_history SET valid_until_timestamp = now() WHERE (((((data_set_relationships_history.main_data_id)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_child)::bigint)) AND (data_set_relationships_history.valid_until_timestamp IS NULL)) OR ((((data_set_relationships_history.main_data_id)::bigint = (old.data_id_child)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_parent)::bigint)) AND (data_set_relationships_history.valid_until_timestamp IS NULL)));
@@ -368,6 +370,7 @@ CREATE RULE data_parent_child_revert_update AS ON UPDATE TO data_set_relationshi
 CREATE RULE data_parent_child_update AS ON UPDATE TO data_set_relationships_all WHERE ((new.del_id IS NOT NULL) AND (old.del_id IS NULL)) DO UPDATE data_set_relationships_history SET valid_until_timestamp = now() WHERE (((((data_set_relationships_history.main_data_id)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_child)::bigint)) AND (data_set_relationships_history.valid_until_timestamp IS NULL)) OR ((((data_set_relationships_history.main_data_id)::bigint = (old.data_id_child)::bigint) AND ((data_set_relationships_history.data_id)::bigint = (old.data_id_parent)::bigint)) AND (data_set_relationships_history.valid_until_timestamp IS NULL)));
 CREATE RULE data_set_properties_delete AS ON DELETE TO data_set_properties WHERE ((((old.value IS NOT NULL) AND (decode("substring"((old.value)::text, 1, 1), 'escape'::text) <> '\\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL)) OR (old.mate_prop_id IS NOT NULL)) DO INSERT INTO data_set_properties_history (id, ds_id, dstpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) VALUES (nextval('data_set_property_id_seq'::regclass), old.ds_id, old.dstpt_id, old.value, (SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) FROM (controlled_vocabulary_terms t JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), (SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) FROM (materials m JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now());
 CREATE RULE data_set_properties_update AS ON UPDATE TO data_set_properties WHERE (((((old.value IS NOT NULL) AND (decode("substring"((old.value)::text, 1, 1), 'escape'::text) <> '\\xefbfbd'::bytea)) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint))) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO data_set_properties_history (id, ds_id, dstpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) VALUES (nextval('data_set_property_id_seq'::regclass), old.ds_id, old.dstpt_id, old.value, (SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) FROM (controlled_vocabulary_terms t JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), (SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) FROM (materials m JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now());
+CREATE RULE data_set_relationships_delete AS ON DELETE TO data_set_relationships DO INSTEAD DELETE FROM data_set_relationships_all WHERE (((data_set_relationships_all.data_id_parent)::bigint = (old.data_id_parent)::bigint) AND ((data_set_relationships_all.data_id_child)::bigint = (old.data_id_child)::bigint));
 CREATE RULE data_set_relationships_insert AS ON INSERT TO data_set_relationships DO INSTEAD INSERT INTO data_set_relationships_all (data_id_parent, data_id_child, pers_id_author, registration_timestamp, modification_timestamp, version) VALUES (new.data_id_parent, new.data_id_child, new.pers_id_author, new.registration_timestamp, new.modification_timestamp, new.version);
 CREATE RULE data_set_relationships_update AS ON UPDATE TO data_set_relationships DO INSTEAD UPDATE data_set_relationships_all SET data_id_parent = new.data_id_parent, data_id_child = new.data_id_child, del_id = new.del_id, pers_id_author = new.pers_id_author, registration_timestamp = new.registration_timestamp, modification_timestamp = new.modification_timestamp, version = new.version WHERE (((data_set_relationships_all.data_id_parent)::bigint = (new.data_id_parent)::bigint) AND ((data_set_relationships_all.data_id_child)::bigint = (new.data_id_child)::bigint));
 CREATE RULE data_update AS ON UPDATE TO data DO INSTEAD UPDATE data_all SET code = new.code, ctnr_id = new.ctnr_id, ctnr_order = new.ctnr_order, del_id = new.del_id, expe_id = new.expe_id, dast_id = new.dast_id, data_producer_code = new.data_producer_code, dsty_id = new.dsty_id, is_derived = new.is_derived, is_placeholder = new.is_placeholder, is_valid = new.is_valid, modification_timestamp = new.modification_timestamp, pers_id_registerer = new.pers_id_registerer, pers_id_modifier = new.pers_id_modifier, production_timestamp = new.production_timestamp, registration_timestamp = new.registration_timestamp, samp_id = new.samp_id, version = new.version WHERE ((data_all.id)::bigint = (new.id)::bigint);
@@ -380,6 +383,7 @@ CREATE RULE dataset_sample_delete AS ON DELETE TO data_all WHERE (old.samp_id IS
 CREATE RULE dataset_sample_insert AS ON INSERT TO data_all WHERE (new.samp_id IS NOT NULL) DO (INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.samp_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.samp_id, (SELECT samples_all.perm_id FROM samples_all WHERE ((samples_all.id)::bigint = (new.samp_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); );
 CREATE RULE dataset_sample_remove_update AS ON UPDATE TO data_all WHERE ((old.samp_id IS NOT NULL) AND (new.samp_id IS NULL)) DO (UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE ((((sample_relationships_history.main_samp_id)::bigint = (old.samp_id)::bigint) AND ((sample_relationships_history.data_id)::bigint = (old.id)::bigint)) AND (sample_relationships_history.valid_until_timestamp IS NULL)); UPDATE data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE ((((data_set_relationships_history.main_data_id)::bigint = (old.id)::bigint) AND ((data_set_relationships_history.samp_id)::bigint = (old.samp_id)::bigint)) AND (data_set_relationships_history.valid_until_timestamp IS NULL)); );
 CREATE RULE dataset_sample_update AS ON UPDATE TO data_all WHERE ((((old.samp_id)::bigint <> (new.samp_id)::bigint) OR (old.samp_id IS NULL)) AND (new.samp_id IS NOT NULL)) DO (UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE ((((sample_relationships_history.main_samp_id)::bigint = (old.samp_id)::bigint) AND ((sample_relationships_history.data_id)::bigint = (old.id)::bigint)) AND (sample_relationships_history.valid_until_timestamp IS NULL)); INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, data_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.samp_id, 'OWNER'::text, new.id, new.code, new.pers_id_modifier, new.modification_timestamp); UPDATE data_set_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE ((((data_set_relationships_history.main_data_id)::bigint = (old.id)::bigint) AND ((data_set_relationships_history.samp_id)::bigint = (old.samp_id)::bigint)) AND (data_set_relationships_history.valid_until_timestamp IS NULL)); INSERT INTO data_set_relationships_history (id, main_data_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('data_set_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.samp_id, (SELECT samples_all.perm_id FROM samples_all WHERE ((samples_all.id)::bigint = (new.samp_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); );
+CREATE RULE experiment_delete AS ON DELETE TO experiments DO INSTEAD DELETE FROM experiments_all WHERE ((experiments_all.id)::bigint = (old.id)::bigint);
 CREATE RULE experiment_insert AS ON INSERT TO experiments DO INSTEAD INSERT INTO experiments_all (id, code, del_id, exty_id, is_public, modification_timestamp, perm_id, pers_id_registerer, pers_id_modifier, proj_id, registration_timestamp, version) VALUES (new.id, new.code, new.del_id, new.exty_id, new.is_public, new.modification_timestamp, new.perm_id, new.pers_id_registerer, new.pers_id_modifier, new.proj_id, new.registration_timestamp, new.version);
 CREATE RULE experiment_project_delete AS ON DELETE TO experiments_all WHERE (old.proj_id IS NOT NULL) DO UPDATE project_relationships_history SET valid_until_timestamp = now() WHERE ((((project_relationships_history.main_proj_id)::bigint = (old.proj_id)::bigint) AND ((project_relationships_history.expe_id)::bigint = (old.id)::bigint)) AND (project_relationships_history.valid_until_timestamp IS NULL));
 CREATE RULE experiment_project_insert AS ON INSERT TO experiments_all WHERE (new.proj_id IS NOT NULL) DO (INSERT INTO project_relationships_history (id, main_proj_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('project_relationships_history_id_seq'::regclass), new.proj_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); INSERT INTO experiment_relationships_history (id, main_expe_id, relation_type, proj_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('experiment_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.proj_id, (SELECT projects.code FROM projects WHERE ((projects.id)::bigint = (new.proj_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); );
@@ -388,6 +392,7 @@ CREATE RULE experiment_project_update AS ON UPDATE TO experiments_all WHERE ((((
 CREATE RULE experiment_properties_delete AS ON DELETE TO experiment_properties WHERE ((((old.value IS NOT NULL) AND (decode("substring"((old.value)::text, 1, 1), 'escape'::text) <> '\\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL)) OR (old.mate_prop_id IS NOT NULL)) DO INSERT INTO experiment_properties_history (id, expe_id, etpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) VALUES (nextval('experiment_property_id_seq'::regclass), old.expe_id, old.etpt_id, old.value, (SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) FROM (controlled_vocabulary_terms t JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), (SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) FROM (materials m JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now());
 CREATE RULE experiment_properties_update AS ON UPDATE TO experiment_properties WHERE (((((old.value IS NOT NULL) AND (decode("substring"((old.value)::text, 1, 1), 'escape'::text) <> '\\xefbfbd'::bytea)) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint))) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO experiment_properties_history (id, expe_id, etpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) VALUES (nextval('experiment_property_id_seq'::regclass), old.expe_id, old.etpt_id, old.value, (SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) FROM (controlled_vocabulary_terms t JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), (SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) FROM (materials m JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now());
 CREATE RULE experiment_update AS ON UPDATE TO experiments DO INSTEAD UPDATE experiments_all SET code = new.code, del_id = new.del_id, exty_id = new.exty_id, is_public = new.is_public, modification_timestamp = new.modification_timestamp, perm_id = new.perm_id, pers_id_registerer = new.pers_id_registerer, pers_id_modifier = new.pers_id_modifier, proj_id = new.proj_id, registration_timestamp = new.registration_timestamp, version = new.version WHERE ((experiments_all.id)::bigint = (new.id)::bigint);
+CREATE RULE experiments_deleted_delete AS ON DELETE TO experiments_deleted DO INSTEAD DELETE FROM experiments_all WHERE ((experiments_all.id)::bigint = (old.id)::bigint);
 CREATE RULE experiments_deleted_update AS ON UPDATE TO experiments_deleted DO INSTEAD UPDATE experiments_all SET del_id = new.del_id, modification_timestamp = new.modification_timestamp, version = new.version WHERE ((experiments_all.id)::bigint = (new.id)::bigint);
 CREATE RULE material_properties_delete AS ON DELETE TO material_properties WHERE ((((old.value IS NOT NULL) AND (decode("substring"((old.value)::text, 1, 1), 'escape'::text) <> '\\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL)) OR (old.mate_prop_id IS NOT NULL)) DO INSERT INTO material_properties_history (id, mate_id, mtpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) VALUES (nextval('material_property_id_seq'::regclass), old.mate_id, old.mtpt_id, old.value, (SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) FROM (controlled_vocabulary_terms t JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), (SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) FROM (materials m JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now());
 CREATE RULE material_properties_update AS ON UPDATE TO material_properties WHERE (((((old.value IS NOT NULL) AND (decode("substring"((old.value)::text, 1, 1), 'escape'::text) <> '\\xefbfbd'::bytea)) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint))) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO material_properties_history (id, mate_id, mtpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) VALUES (nextval('material_property_id_seq'::regclass), old.mate_id, old.mtpt_id, old.value, (SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) FROM (controlled_vocabulary_terms t JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), (SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) FROM (materials m JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now());
@@ -401,6 +406,8 @@ CREATE RULE sample_container_delete AS ON DELETE TO samples_all WHERE (old.samp_
 CREATE RULE sample_container_insert AS ON INSERT TO samples_all WHERE (new.samp_id_part_of IS NOT NULL) DO (INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.samp_id_part_of, 'CONTAINER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'CONTAINED'::text, new.samp_id_part_of, (SELECT samples_all.perm_id FROM samples_all WHERE ((samples_all.id)::bigint = (new.samp_id_part_of)::bigint)), new.pers_id_modifier, new.modification_timestamp); );
 CREATE RULE sample_container_remove_update AS ON UPDATE TO samples_all WHERE ((old.samp_id_part_of IS NOT NULL) AND (new.samp_id_part_of IS NULL)) DO UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE ((((((sample_relationships_history.main_samp_id)::bigint = (old.samp_id_part_of)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.id)::bigint)) AND (sample_relationships_history.valid_until_timestamp IS NULL)) AND ((sample_relationships_history.relation_type)::text = 'CONTAINER'::text)) OR (((((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.samp_id_part_of)::bigint)) AND (sample_relationships_history.valid_until_timestamp IS NULL)) AND ((sample_relationships_history.relation_type)::text = 'CONTAINED'::text)));
 CREATE RULE sample_container_update AS ON UPDATE TO samples_all WHERE ((((old.samp_id_part_of)::bigint <> (new.samp_id_part_of)::bigint) OR (old.samp_id_part_of IS NULL)) AND (new.samp_id_part_of IS NOT NULL)) DO (UPDATE sample_relationships_history SET valid_until_timestamp = new.modification_timestamp WHERE ((((((sample_relationships_history.main_samp_id)::bigint = (old.samp_id_part_of)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.id)::bigint)) AND (sample_relationships_history.valid_until_timestamp IS NULL)) AND ((sample_relationships_history.relation_type)::text = 'CONTAINER'::text)) OR (((((sample_relationships_history.main_samp_id)::bigint = (old.id)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.samp_id_part_of)::bigint)) AND (sample_relationships_history.valid_until_timestamp IS NULL)) AND ((sample_relationships_history.relation_type)::text = 'CONTAINED'::text))); INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.samp_id_part_of, 'CONTAINER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'CONTAINED'::text, new.samp_id_part_of, (SELECT samples_all.perm_id FROM samples_all WHERE ((samples_all.id)::bigint = (new.samp_id_part_of)::bigint)), new.pers_id_modifier, new.modification_timestamp); );
+CREATE RULE sample_delete AS ON DELETE TO samples DO INSTEAD DELETE FROM samples_all WHERE ((samples_all.id)::bigint = (old.id)::bigint);
+CREATE RULE sample_deleted_delete AS ON DELETE TO samples_deleted DO INSTEAD DELETE FROM samples_all WHERE ((samples_all.id)::bigint = (old.id)::bigint);
 CREATE RULE sample_deleted_update AS ON UPDATE TO samples_deleted DO INSTEAD UPDATE samples_all SET del_id = new.del_id, modification_timestamp = new.modification_timestamp, version = new.version WHERE ((samples_all.id)::bigint = (new.id)::bigint);
 CREATE RULE sample_experiment_delete AS ON DELETE TO samples_all WHERE (old.expe_id IS NOT NULL) DO UPDATE experiment_relationships_history SET valid_until_timestamp = now() WHERE ((((experiment_relationships_history.main_expe_id)::bigint = (old.expe_id)::bigint) AND ((experiment_relationships_history.samp_id)::bigint = (old.id)::bigint)) AND (experiment_relationships_history.valid_until_timestamp IS NULL));
 CREATE RULE sample_experiment_insert AS ON INSERT TO samples_all WHERE (new.expe_id IS NOT NULL) DO (INSERT INTO experiment_relationships_history (id, main_expe_id, relation_type, samp_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('experiment_relationships_history_id_seq'::regclass), new.expe_id, 'OWNER'::text, new.id, new.perm_id, new.pers_id_modifier, new.modification_timestamp); INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, expe_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.expe_id, (SELECT experiments_all.perm_id FROM experiments_all WHERE ((experiments_all.id)::bigint = (new.expe_id)::bigint)), new.pers_id_modifier, new.modification_timestamp); );
@@ -413,6 +420,7 @@ CREATE RULE sample_parent_child_revert_update AS ON UPDATE TO sample_relationshi
 CREATE RULE sample_parent_child_update AS ON UPDATE TO sample_relationships_all WHERE ((new.del_id IS NOT NULL) AND (old.del_id IS NULL)) DO UPDATE sample_relationships_history SET valid_until_timestamp = now() WHERE (((((sample_relationships_history.main_samp_id)::bigint = (old.sample_id_parent)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.sample_id_child)::bigint)) AND (sample_relationships_history.valid_until_timestamp IS NULL)) OR ((((sample_relationships_history.main_samp_id)::bigint = (old.sample_id_child)::bigint) AND ((sample_relationships_history.samp_id)::bigint = (old.sample_id_parent)::bigint)) AND (sample_relationships_history.valid_until_timestamp IS NULL)));
 CREATE RULE sample_properties_delete AS ON DELETE TO sample_properties WHERE ((((old.value IS NOT NULL) AND (decode("substring"((old.value)::text, 1, 1), 'escape'::text) <> '\\xefbfbd'::bytea)) OR (old.cvte_id IS NOT NULL)) OR (old.mate_prop_id IS NOT NULL)) DO INSERT INTO sample_properties_history (id, samp_id, stpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) VALUES (nextval('sample_property_id_seq'::regclass), old.samp_id, old.stpt_id, old.value, (SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) FROM (controlled_vocabulary_terms t JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), (SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) FROM (materials m JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now());
 CREATE RULE sample_properties_update AS ON UPDATE TO sample_properties WHERE (((((old.value IS NOT NULL) AND (decode("substring"((old.value)::text, 1, 1), 'escape'::text) <> '\\xefbfbd'::bytea)) AND ((old.value)::text <> (new.value)::text)) OR ((old.cvte_id IS NOT NULL) AND ((old.cvte_id)::bigint <> (new.cvte_id)::bigint))) OR ((old.mate_prop_id IS NOT NULL) AND ((old.mate_prop_id)::bigint <> (new.mate_prop_id)::bigint))) DO INSERT INTO sample_properties_history (id, samp_id, stpt_id, value, vocabulary_term, material, pers_id_author, valid_from_timestamp, valid_until_timestamp) VALUES (nextval('sample_property_id_seq'::regclass), old.samp_id, old.stpt_id, old.value, (SELECT ((((t.code)::text || ' ['::text) || (v.code)::text) || ']'::text) FROM (controlled_vocabulary_terms t JOIN controlled_vocabularies v ON (((t.covo_id)::bigint = (v.id)::bigint))) WHERE ((t.id)::bigint = (old.cvte_id)::bigint)), (SELECT ((((m.code)::text || ' ['::text) || (mt.code)::text) || ']'::text) FROM (materials m JOIN material_types mt ON (((m.maty_id)::bigint = (mt.id)::bigint))) WHERE ((m.id)::bigint = (old.mate_prop_id)::bigint)), old.pers_id_author, old.modification_timestamp, now());
+CREATE RULE sample_relationships_delete AS ON DELETE TO sample_relationships DO INSTEAD DELETE FROM sample_relationships_all WHERE ((sample_relationships_all.id)::bigint = (old.id)::bigint);
 CREATE RULE sample_relationships_insert AS ON INSERT TO sample_relationships DO INSTEAD INSERT INTO sample_relationships_all (id, sample_id_parent, relationship_id, sample_id_child, pers_id_author, registration_timestamp, modification_timestamp, version) VALUES (new.id, new.sample_id_parent, new.relationship_id, new.sample_id_child, new.pers_id_author, new.registration_timestamp, new.modification_timestamp, new.version);
 CREATE RULE sample_relationships_update AS ON UPDATE TO sample_relationships DO INSTEAD UPDATE sample_relationships_all SET sample_id_parent = new.sample_id_parent, relationship_id = new.relationship_id, sample_id_child = new.sample_id_child, del_id = new.del_id, pers_id_author = new.pers_id_author, registration_timestamp = new.registration_timestamp, modification_timestamp = new.modification_timestamp, version = new.version WHERE ((sample_relationships_all.id)::bigint = (new.id)::bigint);
 CREATE RULE sample_space_insert AS ON INSERT TO samples_all WHERE ((new.expe_id IS NULL) AND (new.space_id IS NOT NULL)) DO INSERT INTO sample_relationships_history (id, main_samp_id, relation_type, space_id, entity_perm_id, pers_id_author, valid_from_timestamp) VALUES (nextval('sample_relationships_history_id_seq'::regclass), new.id, 'OWNED'::text, new.space_id, (SELECT spaces.code FROM spaces WHERE ((spaces.id)::bigint = (new.space_id)::bigint)), new.pers_id_modifier, new.modification_timestamp);