diff --git a/openbis/source/sql/postgresql/079/function-079.sql b/openbis/source/sql/postgresql/079/function-079.sql
index ebc9f14af4638fdf5f799bbb44c519680d367b76..12b5b21b81ee286b420c0846f07b34cf6328d857 100644
--- a/openbis/source/sql/postgresql/079/function-079.sql
+++ b/openbis/source/sql/postgresql/079/function-079.sql
@@ -302,10 +302,14 @@ DECLARE
 	owner_code	CODE;
 	owner_del_id	TECH_ID;
 BEGIN
+	IF (NEW.del_id IS NOT NULL) THEN
+		RETURN NEW;
+	END IF;
+
   -- check sample
   IF (NEW.samp_id IS NOT NULL) THEN
   	SELECT del_id, code INTO owner_del_id, owner_code
-  	  FROM samples_all 
+  	  FROM samples 
   	  WHERE id = NEW.samp_id;
   	IF (owner_del_id IS NOT NULL) THEN 
 			RAISE EXCEPTION 'Data Set (Code: %) cannot be connected to a Sample (Code: %) %.', 
@@ -314,7 +318,7 @@ BEGIN
 	END IF;
 	-- check experiment
 	SELECT del_id, code INTO owner_del_id, owner_code
-    FROM experiments_all 
+    FROM experiments 
     WHERE id = NEW.expe_id;
   IF (owner_del_id IS NOT NULL) THEN 
 		RAISE EXCEPTION 'Data Set (Code: %) cannot be connected to an Experiment (Code: %) %.', 
@@ -327,7 +331,7 @@ $$ LANGUAGE 'plpgsql';
 CREATE CONSTRAINT TRIGGER check_created_or_modified_data_set_owner_is_alive 
 	AFTER INSERT OR UPDATE ON data_all
 	DEFERRABLE INITIALLY DEFERRED
-	FOR EACH ROW WHEN (NEW.del_id IS NULL)
+	FOR EACH ROW
 	EXECUTE PROCEDURE check_created_or_modified_data_set_owner_is_alive();
 	
 ----------------------------------------------------------------------------------------------------
@@ -342,10 +346,14 @@ DECLARE
 	owner_code	CODE;
 	owner_del_id	TECH_ID;
 BEGIN
+	IF (NEW.del_id IS NOT NULL) THEN
+		RETURN NEW;
+	END IF;
+
   -- check experiment (can't be deleted)
   IF (NEW.expe_id IS NOT NULL) THEN
   	SELECT del_id, code INTO owner_del_id, owner_code
-  	  FROM experiments_all 
+  	  FROM experiments 
   	  WHERE id = NEW.expe_id;
   	IF (owner_del_id IS NOT NULL) THEN 
 			RAISE EXCEPTION 'Sample (Code: %) cannot be connected to an Experiment (Code: %) %.', 
@@ -359,31 +367,35 @@ $$ LANGUAGE 'plpgsql';
 CREATE CONSTRAINT TRIGGER check_created_or_modified_sample_owner_is_alive 
   AFTER INSERT OR UPDATE ON samples_all
 	DEFERRABLE INITIALLY DEFERRED
-	FOR EACH ROW WHEN (NEW.del_id IS NULL)
+	FOR EACH ROW
 	EXECUTE PROCEDURE check_created_or_modified_sample_owner_is_alive();
 	
 CREATE OR REPLACE FUNCTION check_deletion_consistency_on_sample_deletion() RETURNS trigger AS $$
 DECLARE
   counter  INTEGER;
 BEGIN
+	IF (OLD.del_id IS NOT NULL OR NEW.del_id IS NULL) THEN
+		RETURN NEW;
+	END IF;
+
   -- all directly connected data sets need to be deleted
   -- check datasets
 	SELECT count(*) INTO counter 
-	  FROM data_all
-	  WHERE data_all.samp_id = NEW.id AND data_all.del_id IS NULL;
+	  FROM data
+	  WHERE data.samp_id = NEW.id AND data.del_id IS NULL;
 	IF (counter > 0) THEN
 	  RAISE EXCEPTION 'Sample (Code: %) deletion failed because at least one of its data sets was not deleted.', NEW.code;
 	END IF;
   -- all components need to be deleted
 	SELECT count(*) INTO counter 
-	  FROM samples_all 
-	  WHERE samples_all.samp_id_part_of = NEW.id AND samples_all.del_id IS NULL;
+	  FROM samples 
+	  WHERE samples.samp_id_part_of = NEW.id AND samples.del_id IS NULL;
 	IF (counter > 0) THEN
 	  RAISE EXCEPTION 'Sample (Code: %) deletion failed because at least one of its component samples was not deleted.', NEW.code;
 	END IF;
 	-- all children need to be deleted
 	SELECT count(*) INTO counter 
-		FROM sample_relationships sr, samples_all sc
+		FROM sample_relationships sr, samples sc
 		WHERE sample_id_parent = NEW.id AND sc.id = sr.sample_id_child AND sc.del_id IS NULL;
 	IF (counter > 0) THEN
 		RAISE EXCEPTION 'Sample (Code: %) deletion failed because at least one of its child samples was not deleted.', NEW.code;
@@ -396,7 +408,6 @@ CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_sample_deletion
   AFTER UPDATE ON samples_all
 	DEFERRABLE INITIALLY DEFERRED
 	FOR EACH ROW 
-	WHEN (OLD.del_id IS NULL AND NEW.del_id IS NOT NULL)
 	EXECUTE PROCEDURE check_deletion_consistency_on_sample_deletion();	
 	
 ----------------------------------------------------------------------------------------------------
@@ -407,31 +418,34 @@ CREATE OR REPLACE FUNCTION check_deletion_consistency_on_experiment_deletion() R
 DECLARE
   counter  INTEGER;
 BEGIN
+	IF (OLD.del_id IS NOT NULL OR NEW.del_id IS NULL) THEN
+		RETURN NEW;
+	END IF;
+	
   -- check datasets
 	SELECT count(*) INTO counter 
-	  FROM data_all
-	  WHERE data_all.expe_id = NEW.id AND data_all.del_id IS NULL;
+	  FROM data
+	  WHERE data.expe_id = NEW.id AND data.del_id IS NULL;
 	IF (counter > 0) THEN
 	  RAISE EXCEPTION 'Experiment (Code: %) deletion failed because at least one of its data sets was not deleted.', NEW.code;
 	END IF;
 	-- check samples
 	SELECT count(*) INTO counter 
-	  FROM samples_all 
-	  WHERE samples_all.expe_id = NEW.id AND samples_all.del_id IS NULL;
+	  FROM samples 
+	  WHERE samples.expe_id = NEW.id AND samples.del_id IS NULL;
 	IF (counter > 0) THEN
 	  RAISE EXCEPTION 'Experiment (Code: %) deletion failed because at least one of its samples was not deleted.', NEW.code;
 	END IF;
 	RETURN NEW;
 END;
 $$ LANGUAGE 'plpgsql';
-  
+
 CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_experiment_deletion 
   AFTER UPDATE ON experiments_all
 	DEFERRABLE INITIALLY DEFERRED
 	FOR EACH ROW 
-	WHEN (OLD.del_id IS NULL AND NEW.del_id IS NOT NULL)
 	EXECUTE PROCEDURE check_deletion_consistency_on_experiment_deletion();
-	
+
 ----------------------------------------------------------------------------------------------------
 -- Rules for views
 ----------------------------------------------------------------------------------------------------
diff --git a/openbis/source/sql/postgresql/migration/migration-075-076.sql b/openbis/source/sql/postgresql/migration/migration-075-076.sql
index 8444c87eec230c9e8c0c09b68bd49f9d97834b06..00a51095abd40fba3059a85b662215b745c34ec6 100644
--- a/openbis/source/sql/postgresql/migration/migration-075-076.sql
+++ b/openbis/source/sql/postgresql/migration/migration-075-076.sql
@@ -29,6 +29,10 @@ DECLARE
 	owner_code	CODE;
 	owner_del_id	TECH_ID;
 BEGIN
+	IF (NEW.del_id IS NOT NULL) THEN
+		RETURN NEW;
+	END IF;
+
   -- check sample
   IF (NEW.samp_id IS NOT NULL) THEN
   	SELECT del_id, code INTO owner_del_id, owner_code
@@ -54,7 +58,7 @@ $$ LANGUAGE 'plpgsql';
 CREATE CONSTRAINT TRIGGER check_created_or_modified_data_set_owner_is_alive 
 	AFTER INSERT OR UPDATE ON data
 	DEFERRABLE INITIALLY DEFERRED
-	FOR EACH ROW WHEN (NEW.del_id IS NULL)
+	FOR EACH ROW
 	EXECUTE PROCEDURE check_created_or_modified_data_set_owner_is_alive();
 	
 ----------------------------------------------------------------------------------------------------
@@ -69,6 +73,10 @@ DECLARE
 	owner_code	CODE;
 	owner_del_id	TECH_ID;
 BEGIN
+	IF (NEW.del_id IS NOT NULL) THEN
+		RETURN NEW;
+	END IF;
+
   -- check experiment (can't be deleted)
   IF (NEW.expe_id IS NOT NULL) THEN
   	SELECT del_id, code INTO owner_del_id, owner_code
@@ -86,13 +94,17 @@ $$ LANGUAGE 'plpgsql';
 CREATE CONSTRAINT TRIGGER check_created_or_modified_sample_owner_is_alive 
   AFTER INSERT OR UPDATE ON samples
 	DEFERRABLE INITIALLY DEFERRED
-	FOR EACH ROW WHEN (NEW.del_id IS NULL)
+	FOR EACH ROW
 	EXECUTE PROCEDURE check_created_or_modified_sample_owner_is_alive();
 	
 CREATE OR REPLACE FUNCTION check_deletion_consistency_on_sample_deletion() RETURNS trigger AS $$
 DECLARE
   counter  INTEGER;
 BEGIN
+	IF (OLD.del_id IS NOT NULL OR NEW.del_id IS NULL) THEN
+		RETURN NEW;
+	END IF;
+
   -- all directly connected data sets need to be deleted
   -- check datasets
 	SELECT count(*) INTO counter 
@@ -123,7 +135,6 @@ CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_sample_deletion
   AFTER UPDATE ON samples
 	DEFERRABLE INITIALLY DEFERRED
 	FOR EACH ROW 
-	WHEN (OLD.del_id IS NULL AND NEW.del_id IS NOT NULL)
 	EXECUTE PROCEDURE check_deletion_consistency_on_sample_deletion();	
 	
 ----------------------------------------------------------------------------------------------------
@@ -134,6 +145,10 @@ CREATE OR REPLACE FUNCTION check_deletion_consistency_on_experiment_deletion() R
 DECLARE
   counter  INTEGER;
 BEGIN
+	IF (OLD.del_id IS NOT NULL OR NEW.del_id IS NULL) THEN
+		RETURN NEW;
+	END IF;
+	
   -- check datasets
 	SELECT count(*) INTO counter 
 	  FROM data
@@ -151,10 +166,9 @@ BEGIN
 	RETURN NEW;
 END;
 $$ LANGUAGE 'plpgsql';
-  
+
 CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_experiment_deletion 
   AFTER UPDATE ON experiments
 	DEFERRABLE INITIALLY DEFERRED
 	FOR EACH ROW 
-	WHEN (OLD.del_id IS NULL AND NEW.del_id IS NOT NULL)
 	EXECUTE PROCEDURE check_deletion_consistency_on_experiment_deletion();
\ No newline at end of file
diff --git a/openbis/source/sql/postgresql/migration/migration-078-079.sql b/openbis/source/sql/postgresql/migration/migration-078-079.sql
index 67278c2bda6fb0ba533d8fe8bea35587b1c9adaf..46530b5ecf56f0560d839b2eb4be8fc077527818 100644
--- a/openbis/source/sql/postgresql/migration/migration-078-079.sql
+++ b/openbis/source/sql/postgresql/migration/migration-078-079.sql
@@ -5,4 +5,182 @@
 --
 ALTER TABLE events RENAME identifier TO identifiers;
 ALTER TABLE events ALTER COLUMN identifiers TYPE TEXT_VALUE;
-ALTER TABLE events ALTER COLUMN description TYPE TEXT_VALUE;
\ No newline at end of file
+ALTER TABLE events ALTER COLUMN description TYPE TEXT_VALUE;
+
+DROP TRIGGER IF EXISTS check_deletion_consistency_on_experiment_deletion ON experiments_all;
+DROP TRIGGER IF EXISTS check_deletion_consistency_on_sample_deletion ON samples_all;
+DROP TRIGGER IF EXISTS check_created_or_modified_sample_owner_is_alive ON samples_all;
+DROP TRIGGER IF EXISTS check_created_or_modified_data_set_owner_is_alive ON data_all;
+
+----------------------------------------------------------------------------------------------------
+-- Purpose: Create DEFERRED triggers for checking consistency of deletion state.
+----------------------------------------------------------------------------------------------------
+-- utility function describing a deletion
+
+CREATE OR REPLACE FUNCTION deletion_description(del_id TECH_ID) RETURNS VARCHAR AS $$
+DECLARE
+  del_person VARCHAR;
+  del_date VARCHAR;
+  del_reason VARCHAR;
+BEGIN
+  SELECT p.last_name || ' ' || p.first_name || ' (' || p.email || ')', 
+         to_char(d.registration_timestamp, 'YYYY-MM-DD HH:MM:SS'), d.reason 
+    INTO del_person, del_date, del_reason FROM deletions d, persons p 
+    WHERE d.pers_id_registerer = p.id AND d.id = del_id;
+  RETURN 'deleted by ' || del_person || ' on ' || del_date || ' with reason: "' || del_reason || '"';
+END;
+$$ LANGUAGE 'plpgsql';
+
+----------------------------------------------------------------------------------------------------
+-- 1. data set
+--- on insert/update - experiment, sample can't be deleted unless the data set is delete
+---                  - parents/children relationship stays unchanged 
+
+CREATE OR REPLACE FUNCTION check_created_or_modified_data_set_owner_is_alive() RETURNS trigger AS $$
+DECLARE
+	owner_code	CODE;
+	owner_del_id	TECH_ID;
+BEGIN
+	IF (NEW.del_id IS NOT NULL) THEN
+		RETURN NEW;
+	END IF;
+
+  -- check sample
+  IF (NEW.samp_id IS NOT NULL) THEN
+  	SELECT del_id, code INTO owner_del_id, owner_code
+  	  FROM samples 
+  	  WHERE id = NEW.samp_id;
+  	IF (owner_del_id IS NOT NULL) THEN 
+			RAISE EXCEPTION 'Data Set (Code: %) cannot be connected to a Sample (Code: %) %.', 
+			                NEW.code, owner_code, deletion_description(owner_del_id);
+		END IF;
+	END IF;
+	-- check experiment
+	SELECT del_id, code INTO owner_del_id, owner_code
+    FROM experiments 
+    WHERE id = NEW.expe_id;
+  IF (owner_del_id IS NOT NULL) THEN 
+		RAISE EXCEPTION 'Data Set (Code: %) cannot be connected to an Experiment (Code: %) %.', 
+		                NEW.code, owner_code, deletion_description(owner_del_id);
+	END IF;	
+	RETURN NEW;
+END;
+$$ LANGUAGE 'plpgsql';
+  
+CREATE CONSTRAINT TRIGGER check_created_or_modified_data_set_owner_is_alive 
+	AFTER INSERT OR UPDATE ON data_all
+	DEFERRABLE INITIALLY DEFERRED
+	FOR EACH ROW
+	EXECUTE PROCEDURE check_created_or_modified_data_set_owner_is_alive();
+	
+----------------------------------------------------------------------------------------------------
+-- 2. sample
+--- on insert/update -> experiment can't be deleted unless the sample is deleted
+--- deletion 
+----> all directly connected data sets need to be deleted
+----> all components and children need to be deleted
+
+CREATE OR REPLACE FUNCTION check_created_or_modified_sample_owner_is_alive() RETURNS trigger AS $$
+DECLARE
+	owner_code	CODE;
+	owner_del_id	TECH_ID;
+BEGIN
+	IF (NEW.del_id IS NOT NULL) THEN
+		RETURN NEW;
+	END IF;
+
+  -- check experiment (can't be deleted)
+  IF (NEW.expe_id IS NOT NULL) THEN
+  	SELECT del_id, code INTO owner_del_id, owner_code
+  	  FROM experiments 
+  	  WHERE id = NEW.expe_id;
+  	IF (owner_del_id IS NOT NULL) THEN 
+			RAISE EXCEPTION 'Sample (Code: %) cannot be connected to an Experiment (Code: %) %.', 
+   		                NEW.code, owner_code, deletion_description(owner_del_id);
+		END IF;
+	END IF;
+	RETURN NEW;
+END;
+$$ LANGUAGE 'plpgsql';
+  
+CREATE CONSTRAINT TRIGGER check_created_or_modified_sample_owner_is_alive 
+  AFTER INSERT OR UPDATE ON samples_all
+	DEFERRABLE INITIALLY DEFERRED
+	FOR EACH ROW
+	EXECUTE PROCEDURE check_created_or_modified_sample_owner_is_alive();
+	
+CREATE OR REPLACE FUNCTION check_deletion_consistency_on_sample_deletion() RETURNS trigger AS $$
+DECLARE
+  counter  INTEGER;
+BEGIN
+	IF (OLD.del_id IS NOT NULL OR NEW.del_id IS NULL) THEN
+		RETURN NEW;
+	END IF;
+
+  -- all directly connected data sets need to be deleted
+  -- check datasets
+	SELECT count(*) INTO counter 
+	  FROM data
+	  WHERE data.samp_id = NEW.id AND data.del_id IS NULL;
+	IF (counter > 0) THEN
+	  RAISE EXCEPTION 'Sample (Code: %) deletion failed because at least one of its data sets was not deleted.', NEW.code;
+	END IF;
+  -- all components need to be deleted
+	SELECT count(*) INTO counter 
+	  FROM samples 
+	  WHERE samples.samp_id_part_of = NEW.id AND samples.del_id IS NULL;
+	IF (counter > 0) THEN
+	  RAISE EXCEPTION 'Sample (Code: %) deletion failed because at least one of its component samples was not deleted.', NEW.code;
+	END IF;
+	-- all children need to be deleted
+	SELECT count(*) INTO counter 
+		FROM sample_relationships sr, samples sc
+		WHERE sample_id_parent = NEW.id AND sc.id = sr.sample_id_child AND sc.del_id IS NULL;
+	IF (counter > 0) THEN
+		RAISE EXCEPTION 'Sample (Code: %) deletion failed because at least one of its child samples was not deleted.', NEW.code;
+	END IF;
+	RETURN NEW;
+END;
+$$ LANGUAGE 'plpgsql';
+  
+CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_sample_deletion 
+  AFTER UPDATE ON samples_all
+	DEFERRABLE INITIALLY DEFERRED
+	FOR EACH ROW 
+	EXECUTE PROCEDURE check_deletion_consistency_on_sample_deletion();	
+	
+----------------------------------------------------------------------------------------------------
+-- 3. experiment
+--- deletion -> all directly connected samples and data sets need to be deleted
+
+CREATE OR REPLACE FUNCTION check_deletion_consistency_on_experiment_deletion() RETURNS trigger AS $$
+DECLARE
+  counter  INTEGER;
+BEGIN
+	IF (OLD.del_id IS NOT NULL OR NEW.del_id IS NULL) THEN
+		RETURN NEW;
+	END IF;
+	
+  -- check datasets
+	SELECT count(*) INTO counter 
+	  FROM data
+	  WHERE data.expe_id = NEW.id AND data.del_id IS NULL;
+	IF (counter > 0) THEN
+	  RAISE EXCEPTION 'Experiment (Code: %) deletion failed because at least one of its data sets was not deleted.', NEW.code;
+	END IF;
+	-- check samples
+	SELECT count(*) INTO counter 
+	  FROM samples 
+	  WHERE samples.expe_id = NEW.id AND samples.del_id IS NULL;
+	IF (counter > 0) THEN
+	  RAISE EXCEPTION 'Experiment (Code: %) deletion failed because at least one of its samples was not deleted.', NEW.code;
+	END IF;
+	RETURN NEW;
+END;
+$$ LANGUAGE 'plpgsql';
+
+CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_experiment_deletion 
+  AFTER UPDATE ON experiments_all
+	DEFERRABLE INITIALLY DEFERRED
+	FOR EACH ROW 
+	EXECUTE PROCEDURE check_deletion_consistency_on_experiment_deletion();
\ No newline at end of file
diff --git a/openbis/sourceTest/sql/postgresql/079/017=database_version_logs.tsv b/openbis/sourceTest/sql/postgresql/079/017=database_version_logs.tsv
index 32f0fd85bcbf88c099c21e77e5b623b94f1d3e6a..4dee0cad52dc98fc88a31852a1877ea4062a525d 100644
--- a/openbis/sourceTest/sql/postgresql/079/017=database_version_logs.tsv
+++ b/openbis/sourceTest/sql/postgresql/079/017=database_version_logs.tsv
@@ -52,4 +52,4 @@
 076	source/sql/postgresql/migration/migration-075-076.sql	SUCCESS	2011-07-12 08:28:48.062	\\x2d2d204d6967726174696f6e2066726f6d2030373520746f203037360a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20507572706f73653a2043726561746520444546455252454420747269676765727320666f7220636865636b696e6720636f6e73697374656e6379206f662064656c6574696f6e2073746174652e0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20312e2064617461207365740a2d2d2d206f6e20696e736572742f757064617465202d206578706572696d656e742c2073616d706c652063616e27742062652064656c6574656420756e6c657373207468652064617461207365742069732064656c6574650a2d2d2d2020202020202020202020202020202020202d20706172656e74732f6368696c6472656e2072656c6174696f6e7368697020737461797320756e6368616e676564200a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a096f776e65725f636f646509434f44453b0a096f776e65725f64656c5f696409544543485f49443b0a424547494e0a20202d2d20636865636b2073616d706c650a2020494620284e45572e73616d705f6964204953204e4f54204e554c4c29205448454e0a20200953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a202009202046524f4d2073616d706c6573200a20200920205748455245206964203d204e45572e73616d705f69643b0a202009494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a090909524149534520455843455054494f4e2027496e736572742f557064617465206f662044617461205365742028436f64653a202529206661696c656420626563617573652069742063616e6e6f7420626520636f6e6e656374656420746f20612064656c657465642053616d706c652028436f64653a2025292e272c204e45572e636f64652c206f776e65725f636f64653b0a0909454e442049463b0a09454e442049463b0a092d2d20636865636b206578706572696d656e740a0953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a2020202046524f4d206578706572696d656e7473200a202020205748455245206964203d204e45572e657870655f69643b0a2020494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a0909524149534520455843455054494f4e2027496e736572742f557064617465206f662044617461205365742028436f64653a202529206661696c656420626563617573652069742063616e6e6f7420626520636f6e6e656374656420746f20612064656c65746564204578706572696d656e742028436f64653a2025292e272c204e45572e636f64652c206f776e65725f636f64653b0a09454e442049463b090a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c697665200a09414654455220494e53455254204f5220555044415445204f4e20646174610a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f57205748454e20284e45572e64656c5f6964204953204e554c4c290a09455845435554452050524f43454455524520636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c69766528293b0a090a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20322e2073616d706c650a2d2d2d206f6e20696e736572742f757064617465202d3e206578706572696d656e742063616e27742062652064656c6574656420756e6c657373207468652073616d706c652069732064656c657465640a2d2d2d2064656c6574696f6e200a2d2d2d2d3e20616c6c206469726563746c7920636f6e6e656374656420646174612073657473206e65656420746f2062652064656c657465640a2d2d2d2d3e20616c6c20636f6d706f6e656e747320616e64206368696c6472656e206e65656420746f2062652064656c657465640a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a096f776e65725f636f646509434f44453b0a096f776e65725f64656c5f696409544543485f49443b0a424547494e0a20202d2d20636865636b206578706572696d656e74202863616e27742062652064656c65746564290a2020494620284e45572e657870655f6964204953204e4f54204e554c4c29205448454e0a20200953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a202009202046524f4d206578706572696d656e7473200a20200920205748455245206964203d204e45572e657870655f69643b0a202009494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a090909524149534520455843455054494f4e2027496e736572742f557064617465206f662053616d706c652028436f64653a202529206661696c656420626563617573652069742063616e6e6f7420626520636f6e6e656374656420746f20612064656c65746564204578706572696d656e742028436f64653a2025292e272c204e45572e636f64652c206f776e65725f636f64653b0a0909454e442049463b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c697665200a2020414654455220494e53455254204f5220555044415445204f4e2073616d706c65730a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f57205748454e20284e45572e64656c5f6964204953204e554c4c290a09455845435554452050524f43454455524520636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c69766528293b0a090a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e28292052455455524e5320747269676765722041532024240a4445434c4152450a2020636f756e7465722020494e54454745523b0a424547494e0a20202d2d20616c6c206469726563746c7920636f6e6e656374656420646174612073657473206e65656420746f2062652064656c657465640a20202d2d20636865636b2064617461736574730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d20646174610a092020574845524520646174612e73616d705f6964203d204e45572e696420414e4420646174612e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f662069747320646174612073657473206973206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a20202d2d20616c6c20636f6d706f6e656e7473206e65656420746f2062652064656c657465640a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d2073616d706c6573200a09202057484552452073616d706c65732e73616d705f69645f706172745f6f66203d204e45572e696420414e442073616d706c65732e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f662069747320636f6d706f6e656e742073616d706c6573206973206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a092d2d20616c6c206368696c6472656e206e65656420746f2062652064656c657465640a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a090946524f4d2073616d706c655f72656c6174696f6e73686970732073722c2073616d706c65732073630a090957484552452073616d706c655f69645f706172656e74203d204e45572e696420414e442073632e6964203d2073722e73616d706c655f69645f6368696c6420414e442073632e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a0909524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f6620697473206368696c642073616d706c6573206973206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e200a2020414654455220555044415445204f4e2073616d706c65730a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f57200a095748454e20284f4c442e64656c5f6964204953204e554c4c20414e44204e45572e64656c5f6964204953204e4f54204e554c4c290a09455845435554452050524f43454455524520636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e28293b090a090a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20332e206578706572696d656e740a2d2d2d2064656c6574696f6e202d3e20616c6c206469726563746c7920636f6e6e65637465642073616d706c657320616e6420646174612073657473206e65656420746f2062652064656c657465640a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e28292052455455524e5320747269676765722041532024240a4445434c4152450a2020636f756e7465722020494e54454745523b0a424547494e0a20202d2d20636865636b2064617461736574730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d20646174610a092020574845524520646174612e657870655f6964203d204e45572e696420414e4420646174612e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e20274578706572696d656e742028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f662069747320646174612073657473206973206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a092d2d20636865636b2073616d706c65730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d2073616d706c6573200a09202057484552452073616d706c65732e657870655f6964203d204e45572e696420414e442073616d706c65732e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e20274578706572696d656e742028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732073616d706c6573206973206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e200a2020414654455220555044415445204f4e206578706572696d656e74730a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f57200a095748454e20284f4c442e64656c5f6964204953204e554c4c20414e44204e45572e64656c5f6964204953204e4f54204e554c4c290a09455845435554452050524f43454455524520636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e28293b0a	\N
 077	source/sql/postgresql/migration/migration-076-077.sql	SUCCESS	2011-07-19 11:46:43.977	\\x2d2d204b65657020746869732066696c6520656d707479202d206d6967726174696f6e20697320706572666f726d656420696e207375622070726f6a6563742073637265656e696e670a	\N
 078	source/sql/postgresql/migration/migration-077-078.sql	SUCCESS	2011-07-29 10:29:30.825	\\x2d2d204d6967726174696f6e2066726f6d2030373720746f203037380a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20507572706f73653a20496e74726f6475636520766965777320666f722073616d706c65732f6578706572696d656e74732f64617461207468617420686f6c64206f6e6c79206e6f6e2d64656c6574656420656e7469746965732e200a2d2d2020202020202020202057652077616e7420746865206e657720766965777320746f2068617665206e616d6573206f6620746865206f6c64207461626c657320736f20746865206f6c64207461626c6573206e65656420746f206265200a2d2d2020202020202020202072656e616d65642e20416c6c20747269676765722066756e6374696f6e732073686f756c6420776f726b206f6e20746865206f6c64207461626c65732c206e6f74207468652076696577732e0a2d2d204e4f5445533a200a2d2d202d207669657773206e65656420746f2068617665206578706c696369746c7920737065636966696564206c697374206f6620636f6c756d6e732062656361757365206f66205067446966665669657773206c696d69746174696f6e730a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d2073616d706c6573202d2d0a2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a414c544552205441424c452073616d706c65732052454e414d4520544f2073616d706c65735f616c6c3b0a0a43524541544520564945572073616d706c65732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c2064656c5f69642c206462696e5f69642c2073706163655f69642c2073616d705f69645f706172745f6f66200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a4752414e542053454c454354204f4e2073616d706c657320544f2047524f5550206f70656e6269735f726561646f6e6c793b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f696e736572742041530a202020204f4e20494e5345525420544f2073616d706c657320444f20494e5354454144200a20202020202020494e5345525420494e544f2073616d706c65735f616c6c20280a20202020202020202069642c200a202020202020202020636f64652c200a2020202020202020206462696e5f69642c0a20202020202020202064656c5f69642c0a202020202020202020657870655f69642c0a2020202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020207065726d5f69642c0a202020202020202020706572735f69645f726567697374657265722c200a202020202020202020726567697374726174696f6e5f74696d657374616d702c200a20202020202020202073616d705f69645f706172745f6f662c0a202020202020202020736174795f69642c200a20202020202020202073706163655f69640a20202020202020292056414c55455320280a2020202020202020204e45572e69642c200a2020202020202020204e45572e636f64652c200a2020202020202020204e45572e6462696e5f69642c0a2020202020202020204e45572e64656c5f69642c0a2020202020202020204e45572e657870655f69642c0a2020202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020204e45572e7065726d5f69642c0a2020202020202020204e45572e706572735f69645f726567697374657265722c200a2020202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c200a2020202020202020204e45572e73616d705f69645f706172745f6f662c0a2020202020202020204e45572e736174795f69642c200a2020202020202020204e45572e73706163655f69640a20202020202020293b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f7570646174652041530a202020204f4e2055504441544520544f2073616d706c657320444f20494e5354454144200a202020202020205550444154452073616d706c65735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a20202020202020202020202020206462696e5f6964203d204e45572e6462696e5f69642c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f69645f706172745f6f66203d204e45572e73616d705f69645f706172745f6f662c0a2020202020202020202020202020736174795f6964203d204e45572e736174795f69642c0a202020202020202020202020202073706163655f6964203d204e45572e73706163655f69640a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c657320444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a0a43524541544520564945572073616d706c65735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657870655f69642c20736174795f69642c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c2064656c5f69642c206462696e5f69642c2073706163655f69642c2073616d705f69645f706172745f6f66200a2020202020202046524f4d2073616d706c65735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a4752414e542053454c454354204f4e2073616d706c65735f64656c6574656420544f2047524f5550206f70656e6269735f726561646f6e6c793b0a0a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f2073616d706c65735f64656c6574656420444f20494e5354454144200a202020202020205550444154452073616d706c65735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d700a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c452073616d706c655f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f2073616d706c65735f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d2073616d706c65735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d206578706572696d656e7473202d2d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a0a414c544552205441424c45206578706572696d656e74732052454e414d4520544f206578706572696d656e74735f616c6c3b0a0a4352454154452056494557206578706572696d656e74732041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c206d6174655f69645f73747564795f6f626a6563742c20706572735f69645f726567697374657265722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c2069735f7075626c6963200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a4752414e542053454c454354204f4e206578706572696d656e747320544f2047524f5550206f70656e6269735f726561646f6e6c793b0a0a435245415445204f52205245504c4143452052554c45206578706572696d656e745f696e736572742041530a20204f4e20494e5345525420544f206578706572696d656e747320444f20494e5354454144200a2020202020494e5345525420494e544f206578706572696d656e74735f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202064656c5f69642c0a20202020202020657874795f69642c200a2020202020202069735f7075626c69632c0a202020202020206d6174655f69645f73747564795f6f626a6563742c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a202020202020207065726d5f69642c0a20202020202020706572735f69645f726567697374657265722c200a2020202020202070726f6a5f69642c0a20202020202020726567697374726174696f6e5f74696d657374616d700a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e64656c5f69642c0a202020202020204e45572e657874795f69642c200a202020202020204e45572e69735f7075626c69632c0a202020202020204e45572e6d6174655f69645f73747564795f6f626a6563742c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e7065726d5f69642c0a202020202020204e45572e706572735f69645f726567697374657265722c200a202020202020204e45572e70726f6a5f69642c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d700a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e747320444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a2020202020202020202020202020657874795f6964203d204e45572e657874795f69642c0a202020202020202020202020202069735f7075626c6963203d204e45572e69735f7075626c69632c0a20202020202020202020202020206d6174655f69645f73747564795f6f626a656374203d204e45572e6d6174655f69645f73747564795f6f626a6563742c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020202020202020207065726d5f6964203d204e45572e7065726d5f69642c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a202020202020202020202020202070726f6a5f6964203d204e45572e70726f6a5f69642c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d700a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e745f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e747320444f20494e53544541440a2020202020202044454c4554452046524f4d206578706572696d656e74735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a4352454154452056494557206578706572696d656e74735f64656c657465642041530a202020202053454c4543542069642c207065726d5f69642c20636f64652c20657874795f69642c206d6174655f69645f73747564795f6f626a6563742c20706572735f69645f726567697374657265722c20726567697374726174696f6e5f74696d657374616d702c206d6f64696669636174696f6e5f74696d657374616d702c2070726f6a5f69642c2064656c5f69642c2069735f7075626c6963200a2020202020202046524f4d206578706572696d656e74735f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a4752414e542053454c454354204f4e206578706572696d656e74735f64656c6574656420544f2047524f5550206f70656e6269735f726561646f6e6c793b20202020202020202020202020200a20202020202020202020202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e74735f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f206578706572696d656e74735f64656c6574656420444f20494e5354454144200a20202020202020555044415445206578706572696d656e74735f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d700a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c45206578706572696d656e74735f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f206578706572696d656e74735f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d206578706572696d656e74735f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a2d2d2d2d2d2d2d2d2d2d0a2d2d2064617461202d2d0a2d2d2d2d2d2d2d2d2d2d0a0a414c544552205441424c4520646174612052454e414d4520544f20646174615f616c6c3b0a0a435245415445205649455720646174612041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c2069735f706c616365686f6c6465722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2063746e725f6f726465722c2063746e725f69642c2064656c5f6964200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e554c4c3b0a4752414e542053454c454354204f4e206461746120544f2047524f5550206f70656e6269735f726561646f6e6c793b2020202020200a2020202020200a435245415445204f52205245504c4143452052554c4520646174615f696e736572742041530a20204f4e20494e5345525420544f206461746120444f20494e5354454144200a2020202020494e5345525420494e544f20646174615f616c6c20280a2020202020202069642c200a20202020202020636f64652c200a2020202020202063746e725f69642c0a2020202020202063746e725f6f726465722c0a2020202020202064656c5f69642c0a20202020202020657870655f69642c0a20202020202020646173745f69642c0a20202020202020646174615f70726f64756365725f636f64652c0a20202020202020647374795f69642c0a2020202020202069735f646572697665642c0a2020202020202069735f706c616365686f6c6465722c0a2020202020202069735f76616c69642c0a202020202020206d6f64696669636174696f6e5f74696d657374616d702c0a20202020202020706572735f69645f726567697374657265722c0a2020202020202070726f64756374696f6e5f74696d657374616d702c0a20202020202020726567697374726174696f6e5f74696d657374616d702c0a2020202020202073616d705f69640a2020202020292056414c55455320280a202020202020204e45572e69642c200a202020202020204e45572e636f64652c200a202020202020204e45572e63746e725f69642c0a202020202020204e45572e63746e725f6f726465722c0a202020202020204e45572e64656c5f69642c200a202020202020204e45572e657870655f69642c0a202020202020204e45572e646173745f69642c0a202020202020204e45572e646174615f70726f64756365725f636f64652c0a202020202020204e45572e647374795f69642c0a202020202020204e45572e69735f646572697665642c200a202020202020204e45572e69735f706c616365686f6c6465722c0a202020202020204e45572e69735f76616c69642c0a202020202020204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a202020202020204e45572e706572735f69645f726567697374657265722c0a202020202020204e45572e70726f64756374696f6e5f74696d657374616d702c0a202020202020204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020204e45572e73616d705f69640a2020202020293b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f7570646174652041530a202020204f4e2055504441544520544f206461746120444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a2020202020202020202053455420636f6465203d204e45572e636f64652c0a202020202020202020202020202063746e725f6964203d204e45572e63746e725f69642c0a202020202020202020202020202063746e725f6f72646572203d204e45572e63746e725f6f726465722c0a202020202020202020202020202064656c5f6964203d204e45572e64656c5f69642c0a2020202020202020202020202020657870655f6964203d204e45572e657870655f69642c0a2020202020202020202020202020646173745f6964203d204e45572e646173745f69642c0a2020202020202020202020202020646174615f70726f64756365725f636f6465203d204e45572e646174615f70726f64756365725f636f64652c0a2020202020202020202020202020647374795f6964203d204e45572e647374795f69642c0a202020202020202020202020202069735f64657269766564203d204e45572e69735f646572697665642c0a202020202020202020202020202069735f706c616365686f6c646572203d204e45572e69735f706c616365686f6c6465722c0a202020202020202020202020202069735f76616c6964203d204e45572e69735f76616c69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d702c0a2020202020202020202020202020706572735f69645f72656769737465726572203d204e45572e706572735f69645f726567697374657265722c0a202020202020202020202020202070726f64756374696f6e5f74696d657374616d70203d204e45572e70726f64756374696f6e5f74696d657374616d702c0a2020202020202020202020202020726567697374726174696f6e5f74696d657374616d70203d204e45572e726567697374726174696f6e5f74696d657374616d702c0a202020202020202020202020202073616d705f6964203d204e45572e73616d705f69640a202020202020205748455245206964203d204e45572e69643b0a20202020202020202020202020200a435245415445204f52205245504c4143452052554c4520646174615f616c6c2041530a202020204f4e2044454c45544520544f206461746120444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b0a20202020202020202020202020200a435245415445205649455720646174615f64656c657465642041530a202020202053454c4543542069642c20636f64652c20647374795f69642c20646173745f69642c20657870655f69642c20646174615f70726f64756365725f636f64652c2070726f64756374696f6e5f74696d657374616d702c2073616d705f69642c20726567697374726174696f6e5f74696d657374616d702c20706572735f69645f726567697374657265722c2069735f706c616365686f6c6465722c2069735f76616c69642c206d6f64696669636174696f6e5f74696d657374616d702c2069735f646572697665642c2063746e725f6f726465722c2063746e725f69642c2064656c5f6964200a2020202020202046524f4d20646174615f616c6c200a20202020202057484552452064656c5f6964204953204e4f54204e554c4c3b0a4752414e542053454c454354204f4e20646174615f64656c6574656420544f2047524f5550206f70656e6269735f726561646f6e6c793b20202020200a0a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f7570646174652041530a202020204f4e2055504441544520544f20646174615f64656c6574656420444f20494e5354454144200a2020202020202055504441544520646174615f616c6c0a202020202020202020205345542064656c5f6964203d204e45572e64656c5f69642c0a20202020202020202020202020206d6f64696669636174696f6e5f74696d657374616d70203d204e45572e6d6f64696669636174696f6e5f74696d657374616d700a202020202020202020205748455245206964203d204e45572e69643b0a20202020200a435245415445204f52205245504c4143452052554c4520646174615f64656c657465645f64656c6574652041530a202020204f4e2044454c45544520544f20646174615f64656c6574656420444f20494e53544541440a2020202020202044454c4554452046524f4d20646174615f616c6c0a20202020202020202020202020205748455245206964203d204f4c442e69643b2020202020202020202020202020200a20202020202020202020202020200a2d2d20757064617465207461626c65206e616d657320696e206f6c6420747269676765722066756e6374696f6e73200a0a435245415445204f52205245504c4143452046554e4354494f4e2045585445524e414c5f444154415f53544f524147455f464f524d41545f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020765f636f766f5f636f64652020434f44453b0a202020646174615f636f646520434f44453b0a424547494e0a0a20202073656c65637420636f646520696e746f20765f636f766f5f636f64652066726f6d20636f6e74726f6c6c65645f766f636162756c61726965730a20202020202077686572652069735f696e7465726e616c5f6e616d657370616365203d207472756520616e64200a2020202020202020206964203d202873656c65637420636f766f5f69642066726f6d20636f6e74726f6c6c65645f766f636162756c6172795f7465726d73207768657265206964203d204e45572e637674655f69645f73746f725f666d74293b0a2020202d2d20436865636b2069662074686520646174612073746f7261676520666f726d61742069732061207465726d206f662074686520636f6e74726f6c6c656420766f636162756c617279202253544f524147455f464f524d4154220a202020696620765f636f766f5f636f646520213d202753544f524147455f464f524d415427207468656e0a20202020202073656c65637420636f646520696e746f20646174615f636f64652066726f6d20646174615f616c6c207768657265206964203d204e45572e646174615f69643b200a202020202020524149534520455843455054494f4e2027496e736572742f557064617465206f6620446174612028436f64653a202529206661696c65642c206173206974732053746f7261676520466f726d617420697320252c2062757420697320726571756972656420746f2062652053544f524147455f464f524d41542e272c20646174615f636f64652c20765f636f766f5f636f64653b0a202020656e642069663b0a0a20202052455455524e204e45573b0a0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a0a435245415445204f52205245504c4143452046554e4354494f4e2053414d504c455f434f44455f554e495155454e4553535f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020636f756e7465722020494e54454745523b0a424547494e0a20204c4f434b205441424c452073616d706c65735f616c6c20494e204558434c5553495645204d4f44453b0a20200a092020494620284e45572e73616d705f69645f706172745f6f66206973204e554c4c29205448454e0a09092020494620284e45572e6462696e5f6964206973206e6f74204e554c4c29205448454e0a090909202053454c45435420636f756e74282a2920696e746f20636f756e7465722046524f4d2073616d706c65735f616c6c200a0909202020202020776865726520696420213d204e45572e696420616e6420636f6465203d204e45572e636f646520616e642073616d705f69645f706172745f6f66206973204e554c4c20616e64206462696e5f6964203d204e45572e6462696e5f69643b0a202020202020202049462028636f756e746572203e203029205448454e0a090909092020524149534520455843455054494f4e2027496e736572742f557064617465206f662053616d706c652028436f64653a202529206661696c6564206265636175736520646174616261736520696e7374616e63652073616d706c652077697468207468652073616d6520636f646520616c7265616479206578697374732e272c204e45572e636f64653b0a2020202020202020454e442049463b0a09092020454c53494620284e45572e73706163655f6964206973206e6f74204e554c4c29205448454e0a090909202053454c45435420636f756e74282a2920696e746f20636f756e7465722046524f4d2073616d706c65735f616c6c200a090909092020776865726520696420213d204e45572e696420616e6420636f6465203d204e45572e636f646520616e642073616d705f69645f706172745f6f66206973204e554c4c20616e642073706163655f6964203d204e45572e73706163655f69643b0a090909202049462028636f756e746572203e203029205448454e0a090909092020524149534520455843455054494f4e2027496e736572742f557064617465206f662053616d706c652028436f64653a202529206661696c656420626563617573652073706163652073616d706c652077697468207468652073616d6520636f646520616c7265616479206578697374732e272c204e45572e636f64653b0a0909092020454e442049463b0a202020202020454e442049463b0a20202020454c53450a09092020494620284e45572e6462696e5f6964206973206e6f74204e554c4c29205448454e0a090909202053454c45435420636f756e74282a2920696e746f20636f756e7465722046524f4d2073616d706c65735f616c6c200a090909092020776865726520696420213d204e45572e696420616e6420636f6465203d204e45572e636f646520616e642073616d705f69645f706172745f6f66203d204e45572e73616d705f69645f706172745f6f6620616e64206462696e5f6964203d204e45572e6462696e5f69643b0a090909202049462028636f756e746572203e203029205448454e0a090909092020524149534520455843455054494f4e2027496e736572742f557064617465206f662053616d706c652028436f64653a202529206661696c6564206265636175736520646174616261736520696e7374616e63652073616d706c652077697468207468652073616d6520636f646520616e64206265696e67207468652070617274206f66207468652073616d6520636f6e7461696e657220616c7265616479206578697374732e272c204e45572e636f64653b0a0909092020454e442049463b0a09092020454c53494620284e45572e73706163655f6964206973206e6f74204e554c4c29205448454e0a090909202053454c45435420636f756e74282a2920696e746f20636f756e7465722046524f4d2073616d706c65735f616c6c200a090909092020776865726520696420213d204e45572e696420616e6420636f6465203d204e45572e636f646520616e642073616d705f69645f706172745f6f66203d204e45572e73616d705f69645f706172745f6f6620616e642073706163655f6964203d204e45572e73706163655f69643b0a090909202049462028636f756e746572203e203029205448454e0a090909092020524149534520455843455054494f4e2027496e736572742f557064617465206f662053616d706c652028436f64653a202529206661696c656420626563617573652073706163652073616d706c652077697468207468652073616d6520636f646520616e64206265696e67207468652070617274206f66207468652073616d6520636f6e7461696e657220616c7265616479206578697374732e272c204e45572e636f64653b0a0909092020454e442049463b0a09092020454e442049463b0a2020202020454e442049463b2020200a20200a202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a0a435245415445204f52205245504c4143452046554e4354494f4e2053414d504c455f535542434f44455f554e495155454e4553535f434845434b28292052455455524e5320747269676765722041532024240a4445434c4152450a202020636f756e7465722020494e54454745523b0a202020756e697175655f737562636f64652020424f4f4c45414e5f434841523b0a424547494e0a20204c4f434b205441424c452073616d706c65735f616c6c20494e204558434c5553495645204d4f44453b0a20200a202053454c4543542069735f737562636f64655f756e6971756520696e746f20756e697175655f737562636f64652046524f4d2073616d706c655f7479706573205748455245206964203d204e45572e736174795f69643b0a20200a202049462028756e697175655f737562636f646529205448454e0a20202020494620284e45572e6462696e5f6964206973206e6f74204e554c4c29205448454e0a09090953454c45435420636f756e74282a2920696e746f20636f756e7465722046524f4d2073616d706c65735f616c6c200a09090909776865726520696420213d204e45572e696420616e6420636f6465203d204e45572e636f646520616e6420736174795f6964203d204e45572e736174795f696420616e64206462696e5f6964203d204e45572e6462696e5f69643b0a09090949462028636f756e746572203e203029205448454e0a09090909524149534520455843455054494f4e2027496e736572742f557064617465206f662053616d706c652028436f64653a202529206661696c6564206265636175736520646174616261736520696e7374616e63652073616d706c65206f66207468652073616d6520747970652077697468207468652073616d6520737562636f646520616c7265616479206578697374732e272c204e45572e636f64653b0a090909454e442049463b0a0909454c53494620284e45572e73706163655f6964206973206e6f74204e554c4c29205448454e0a09090953454c45435420636f756e74282a2920696e746f20636f756e7465722046524f4d2073616d706c65735f616c6c200a09090909776865726520696420213d204e45572e696420616e6420636f6465203d204e45572e636f646520616e6420736174795f6964203d204e45572e736174795f696420616e642073706163655f6964203d204e45572e73706163655f69643b0a09090949462028636f756e746572203e203029205448454e0a09090909524149534520455843455054494f4e2027496e736572742f557064617465206f662053616d706c652028436f64653a202529206661696c656420626563617573652073706163652073616d706c65206f66207468652073616d6520747970652077697468207468652073616d6520737562636f646520616c7265616479206578697374732e272c204e45572e636f64653b0a090909454e442049463b0a0909454e442049463b0a2020454e442049463b0a20200a202052455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a096f776e65725f636f646509434f44453b0a096f776e65725f64656c5f696409544543485f49443b0a424547494e0a20202d2d20636865636b2073616d706c650a2020494620284e45572e73616d705f6964204953204e4f54204e554c4c29205448454e0a20200953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a202009202046524f4d2073616d706c65735f616c6c200a20200920205748455245206964203d204e45572e73616d705f69643b0a202009494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a090909524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20612053616d706c652028436f64653a20252920252e272c200a090909202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a0909454e442049463b0a09454e442049463b0a092d2d20636865636b206578706572696d656e740a0953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a2020202046524f4d206578706572696d656e74735f616c6c200a202020205748455245206964203d204e45572e657870655f69643b0a2020494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a0909524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20616e204578706572696d656e742028436f64653a20252920252e272c200a0909202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a09454e442049463b090a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a096f776e65725f636f646509434f44453b0a096f776e65725f64656c5f696409544543485f49443b0a424547494e0a20202d2d20636865636b206578706572696d656e74202863616e27742062652064656c65746564290a2020494620284e45572e657870655f6964204953204e4f54204e554c4c29205448454e0a20200953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a202009202046524f4d206578706572696d656e74735f616c6c200a20200920205748455245206964203d204e45572e657870655f69643b0a202009494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a090909524149534520455843455054494f4e202753616d706c652028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20616e204578706572696d656e742028436f64653a20252920252e272c200a2020200909202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a0909454e442049463b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e28292052455455524e5320747269676765722041532024240a4445434c4152450a2020636f756e7465722020494e54454745523b0a424547494e0a20202d2d20616c6c206469726563746c7920636f6e6e656374656420646174612073657473206e65656420746f2062652064656c657465640a20202d2d20636865636b2064617461736574730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d20646174615f616c6c0a092020574845524520646174615f616c6c2e73616d705f6964203d204e45572e696420414e4420646174615f616c6c2e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732064617461207365747320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a20202d2d20616c6c20636f6d706f6e656e7473206e65656420746f2062652064656c657465640a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d2073616d706c65735f616c6c200a09202057484552452073616d706c65735f616c6c2e73616d705f69645f706172745f6f66203d204e45572e696420414e442073616d706c65735f616c6c2e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f662069747320636f6d706f6e656e742073616d706c657320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a092d2d20616c6c206368696c6472656e206e65656420746f2062652064656c657465640a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a090946524f4d2073616d706c655f72656c6174696f6e73686970732073722c2073616d706c65735f616c6c2073630a090957484552452073616d706c655f69645f706172656e74203d204e45572e696420414e442073632e6964203d2073722e73616d706c655f69645f6368696c6420414e442073632e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a0909524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f6620697473206368696c642073616d706c657320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e28292052455455524e5320747269676765722041532024240a4445434c4152450a2020636f756e7465722020494e54454745523b0a424547494e0a20202d2d20636865636b2064617461736574730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d20646174615f616c6c0a092020574845524520646174615f616c6c2e657870655f6964203d204e45572e696420414e4420646174615f616c6c2e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e20274578706572696d656e742028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732064617461207365747320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a092d2d20636865636b2073616d706c65730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d2073616d706c65735f616c6c200a09202057484552452073616d706c65735f616c6c2e657870655f6964203d204e45572e696420414e442073616d706c65735f616c6c2e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e20274578706572696d656e742028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732073616d706c657320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a	\N
-079	source/sql/postgresql/migration/migration-078-079.sql	SUCCESS	2011-08-08 10:53:10.967	\\x2d2d204d6967726174696f6e2066726f6d2030373820746f203037390a0a2d2d0a2d2d2020416c6c6f7720746f2073746f72696e67206d756c7469706c6520656e746974792064656c6574696f6e7320696e207468652073616d65206576656e7420726f770a2d2d0a414c544552205441424c45206576656e74732052454e414d45206964656e74696669657220544f206964656e746966696572733b0a414c544552205441424c45206576656e747320414c54455220434f4c554d4e206964656e74696669657273205459504520544558545f56414c55453b0a414c544552205441424c45206576656e747320414c54455220434f4c554d4e206465736372697074696f6e205459504520544558545f56414c55453b0a	\N
+079	source/sql/postgresql/migration/migration-078-079.sql	SUCCESS	2011-08-17 13:49:35.665	\\x2d2d204d6967726174696f6e2066726f6d2030373820746f203037390a0a2d2d0a2d2d2020416c6c6f7720746f2073746f72696e67206d756c7469706c6520656e746974792064656c6574696f6e7320696e207468652073616d65206576656e7420726f770a2d2d0a414c544552205441424c45206576656e74732052454e414d45206964656e74696669657220544f206964656e746966696572733b0a414c544552205441424c45206576656e747320414c54455220434f4c554d4e206964656e74696669657273205459504520544558545f56414c55453b0a414c544552205441424c45206576656e747320414c54455220434f4c554d4e206465736372697074696f6e205459504520544558545f56414c55453b0a0a44524f5020545249474745522049462045584953545320636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e204f4e206578706572696d656e74735f616c6c3b0a44524f5020545249474745522049462045584953545320636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e204f4e2073616d706c65735f616c6c3b0a44524f5020545249474745522049462045584953545320636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c697665204f4e2073616d706c65735f616c6c3b0a44524f5020545249474745522049462045584953545320636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c697665204f4e20646174615f616c6c3b0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20507572706f73653a2043726561746520444546455252454420747269676765727320666f7220636865636b696e6720636f6e73697374656e6379206f662064656c6574696f6e2073746174652e0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d207574696c6974792066756e6374696f6e2064657363726962696e6720612064656c6574696f6e0a0a435245415445204f52205245504c4143452046554e4354494f4e2064656c6574696f6e5f6465736372697074696f6e2864656c5f696420544543485f4944292052455455524e5320564152434841522041532024240a4445434c4152450a202064656c5f706572736f6e20564152434841523b0a202064656c5f6461746520564152434841523b0a202064656c5f726561736f6e20564152434841523b0a424547494e0a202053454c45435420702e6c6173745f6e616d65207c7c20272027207c7c20702e66697273745f6e616d65207c7c2027202827207c7c20702e656d61696c207c7c202729272c200a202020202020202020746f5f6368617228642e726567697374726174696f6e5f74696d657374616d702c2027595959592d4d4d2d44442048483a4d4d3a535327292c20642e726561736f6e200a20202020494e544f2064656c5f706572736f6e2c2064656c5f646174652c2064656c5f726561736f6e2046524f4d2064656c6574696f6e7320642c20706572736f6e732070200a20202020574845524520642e706572735f69645f72656769737465726572203d20702e696420414e4420642e6964203d2064656c5f69643b0a202052455455524e202764656c657465642062792027207c7c2064656c5f706572736f6e207c7c2027206f6e2027207c7c2064656c5f64617465207c7c2027207769746820726561736f6e3a202227207c7c2064656c5f726561736f6e207c7c202722273b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20312e2064617461207365740a2d2d2d206f6e20696e736572742f757064617465202d206578706572696d656e742c2073616d706c652063616e27742062652064656c6574656420756e6c657373207468652064617461207365742069732064656c6574650a2d2d2d2020202020202020202020202020202020202d20706172656e74732f6368696c6472656e2072656c6174696f6e7368697020737461797320756e6368616e676564200a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a096f776e65725f636f646509434f44453b0a096f776e65725f64656c5f696409544543485f49443b0a424547494e0a09494620284e45572e64656c5f6964204953204e4f54204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a0a20202d2d20636865636b2073616d706c650a2020494620284e45572e73616d705f6964204953204e4f54204e554c4c29205448454e0a20200953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a202009202046524f4d2073616d706c6573200a20200920205748455245206964203d204e45572e73616d705f69643b0a202009494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a090909524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20612053616d706c652028436f64653a20252920252e272c200a090909202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a0909454e442049463b0a09454e442049463b0a092d2d20636865636b206578706572696d656e740a0953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a2020202046524f4d206578706572696d656e7473200a202020205748455245206964203d204e45572e657870655f69643b0a2020494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a0909524149534520455843455054494f4e202744617461205365742028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20616e204578706572696d656e742028436f64653a20252920252e272c200a0909202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a09454e442049463b090a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c697665200a09414654455220494e53455254204f5220555044415445204f4e20646174615f616c6c0a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f570a09455845435554452050524f43454455524520636865636b5f637265617465645f6f725f6d6f6469666965645f646174615f7365745f6f776e65725f69735f616c69766528293b0a090a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20322e2073616d706c650a2d2d2d206f6e20696e736572742f757064617465202d3e206578706572696d656e742063616e27742062652064656c6574656420756e6c657373207468652073616d706c652069732064656c657465640a2d2d2d2064656c6574696f6e200a2d2d2d2d3e20616c6c206469726563746c7920636f6e6e656374656420646174612073657473206e65656420746f2062652064656c657465640a2d2d2d2d3e20616c6c20636f6d706f6e656e747320616e64206368696c6472656e206e65656420746f2062652064656c657465640a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c69766528292052455455524e5320747269676765722041532024240a4445434c4152450a096f776e65725f636f646509434f44453b0a096f776e65725f64656c5f696409544543485f49443b0a424547494e0a09494620284e45572e64656c5f6964204953204e4f54204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a0a20202d2d20636865636b206578706572696d656e74202863616e27742062652064656c65746564290a2020494620284e45572e657870655f6964204953204e4f54204e554c4c29205448454e0a20200953454c4543542064656c5f69642c20636f646520494e544f206f776e65725f64656c5f69642c206f776e65725f636f64650a202009202046524f4d206578706572696d656e7473200a20200920205748455245206964203d204e45572e657870655f69643b0a202009494620286f776e65725f64656c5f6964204953204e4f54204e554c4c29205448454e200a090909524149534520455843455054494f4e202753616d706c652028436f64653a2025292063616e6e6f7420626520636f6e6e656374656420746f20616e204578706572696d656e742028436f64653a20252920252e272c200a2020200909202020202020202020202020202020204e45572e636f64652c206f776e65725f636f64652c2064656c6574696f6e5f6465736372697074696f6e286f776e65725f64656c5f6964293b0a0909454e442049463b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c697665200a2020414654455220494e53455254204f5220555044415445204f4e2073616d706c65735f616c6c0a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f570a09455845435554452050524f43454455524520636865636b5f637265617465645f6f725f6d6f6469666965645f73616d706c655f6f776e65725f69735f616c69766528293b0a090a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e28292052455455524e5320747269676765722041532024240a4445434c4152450a2020636f756e7465722020494e54454745523b0a424547494e0a09494620284f4c442e64656c5f6964204953204e4f54204e554c4c204f52204e45572e64656c5f6964204953204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a0a20202d2d20616c6c206469726563746c7920636f6e6e656374656420646174612073657473206e65656420746f2062652064656c657465640a20202d2d20636865636b2064617461736574730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d20646174610a092020574845524520646174612e73616d705f6964203d204e45572e696420414e4420646174612e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732064617461207365747320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a20202d2d20616c6c20636f6d706f6e656e7473206e65656420746f2062652064656c657465640a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d2073616d706c6573200a09202057484552452073616d706c65732e73616d705f69645f706172745f6f66203d204e45572e696420414e442073616d706c65732e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f662069747320636f6d706f6e656e742073616d706c657320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a092d2d20616c6c206368696c6472656e206e65656420746f2062652064656c657465640a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a090946524f4d2073616d706c655f72656c6174696f6e73686970732073722c2073616d706c65732073630a090957484552452073616d706c655f69645f706172656e74203d204e45572e696420414e442073632e6964203d2073722e73616d706c655f69645f6368696c6420414e442073632e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a0909524149534520455843455054494f4e202753616d706c652028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f6620697473206368696c642073616d706c657320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a20200a43524541544520434f4e53545241494e54205452494747455220636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e200a2020414654455220555044415445204f4e2073616d706c65735f616c6c0a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f57200a09455845435554452050524f43454455524520636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f73616d706c655f64656c6574696f6e28293b090a090a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d0a2d2d20332e206578706572696d656e740a2d2d2d2064656c6574696f6e202d3e20616c6c206469726563746c7920636f6e6e65637465642073616d706c657320616e6420646174612073657473206e65656420746f2062652064656c657465640a0a435245415445204f52205245504c4143452046554e4354494f4e20636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e28292052455455524e5320747269676765722041532024240a4445434c4152450a2020636f756e7465722020494e54454745523b0a424547494e0a09494620284f4c442e64656c5f6964204953204e4f54204e554c4c204f52204e45572e64656c5f6964204953204e554c4c29205448454e0a090952455455524e204e45573b0a09454e442049463b0a090a20202d2d20636865636b2064617461736574730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d20646174610a092020574845524520646174612e657870655f6964203d204e45572e696420414e4420646174612e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e20274578706572696d656e742028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732064617461207365747320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a092d2d20636865636b2073616d706c65730a0953454c45435420636f756e74282a2920494e544f20636f756e746572200a09202046524f4d2073616d706c6573200a09202057484552452073616d706c65732e657870655f6964203d204e45572e696420414e442073616d706c65732e64656c5f6964204953204e554c4c3b0a0949462028636f756e746572203e203029205448454e0a092020524149534520455843455054494f4e20274578706572696d656e742028436f64653a2025292064656c6574696f6e206661696c65642062656361757365206174206c65617374206f6e65206f66206974732073616d706c657320776173206e6f742064656c657465642e272c204e45572e636f64653b0a09454e442049463b0a0952455455524e204e45573b0a454e443b0a2424204c414e47554147452027706c706773716c273b0a0a43524541544520434f4e53545241494e54205452494747455220636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e200a2020414654455220555044415445204f4e206578706572696d656e74735f616c6c0a0944454645525241424c4520494e495449414c4c592044454645525245440a09464f52204541434820524f57200a09455845435554452050524f43454455524520636865636b5f64656c6574696f6e5f636f6e73697374656e63795f6f6e5f6578706572696d656e745f64656c6574696f6e28293b0a	\N
diff --git a/openbis/sourceTest/sql/postgresql/079/finish-079.sql b/openbis/sourceTest/sql/postgresql/079/finish-079.sql
index b17fac2e361a505507e885864fac43c377f304d3..7997b49873e4c93342bd1a007bba3a84225b850e 100644
--- a/openbis/sourceTest/sql/postgresql/079/finish-079.sql
+++ b/openbis/sourceTest/sql/postgresql/079/finish-079.sql
@@ -284,10 +284,10 @@ CREATE RULE sample_deleted_delete AS ON DELETE TO samples_deleted DO INSTEAD DEL
 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 WHERE ((samples_all.id)::bigint = (new.id)::bigint);
 CREATE RULE sample_insert AS ON INSERT TO samples DO INSTEAD INSERT INTO samples_all (id, code, dbin_id, del_id, expe_id, modification_timestamp, perm_id, pers_id_registerer, registration_timestamp, samp_id_part_of, saty_id, space_id) VALUES (new.id, new.code, new.dbin_id, new.del_id, new.expe_id, new.modification_timestamp, new.perm_id, new.pers_id_registerer, new.registration_timestamp, new.samp_id_part_of, new.saty_id, new.space_id);
 CREATE RULE sample_update AS ON UPDATE TO samples DO INSTEAD UPDATE samples_all SET code = new.code, dbin_id = new.dbin_id, del_id = new.del_id, expe_id = new.expe_id, modification_timestamp = new.modification_timestamp, perm_id = new.perm_id, pers_id_registerer = new.pers_id_registerer, registration_timestamp = new.registration_timestamp, samp_id_part_of = new.samp_id_part_of, saty_id = new.saty_id, space_id = new.space_id WHERE ((samples_all.id)::bigint = (new.id)::bigint);
-CREATE CONSTRAINT TRIGGER check_created_or_modified_data_set_owner_is_alive AFTER INSERT OR UPDATE ON data_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW WHEN ((new.del_id IS NULL)) EXECUTE PROCEDURE check_created_or_modified_data_set_owner_is_alive();
-CREATE CONSTRAINT TRIGGER check_created_or_modified_sample_owner_is_alive AFTER INSERT OR UPDATE ON samples_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW WHEN ((new.del_id IS NULL)) EXECUTE PROCEDURE check_created_or_modified_sample_owner_is_alive();
-CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_experiment_deletion AFTER UPDATE ON experiments_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW WHEN (((old.del_id IS NULL) AND (new.del_id IS NOT NULL))) EXECUTE PROCEDURE check_deletion_consistency_on_experiment_deletion();
-CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_sample_deletion AFTER UPDATE ON samples_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW WHEN (((old.del_id IS NULL) AND (new.del_id IS NOT NULL))) EXECUTE PROCEDURE check_deletion_consistency_on_sample_deletion();
+CREATE CONSTRAINT TRIGGER check_created_or_modified_data_set_owner_is_alive AFTER INSERT OR UPDATE ON data_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_created_or_modified_data_set_owner_is_alive();
+CREATE CONSTRAINT TRIGGER check_created_or_modified_sample_owner_is_alive AFTER INSERT OR UPDATE ON samples_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_created_or_modified_sample_owner_is_alive();
+CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_experiment_deletion AFTER UPDATE ON experiments_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_deletion_consistency_on_experiment_deletion();
+CREATE CONSTRAINT TRIGGER check_deletion_consistency_on_sample_deletion AFTER UPDATE ON samples_all DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE PROCEDURE check_deletion_consistency_on_sample_deletion();
 CREATE TRIGGER controlled_vocabulary_check BEFORE INSERT OR UPDATE ON property_types FOR EACH ROW EXECUTE PROCEDURE controlled_vocabulary_check();
 CREATE TRIGGER data_set_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON data_set_properties FOR EACH ROW EXECUTE PROCEDURE data_set_property_with_material_data_type_check();
 CREATE TRIGGER experiment_property_with_material_data_type_check BEFORE INSERT OR UPDATE ON experiment_properties FOR EACH ROW EXECUTE PROCEDURE experiment_property_with_material_data_type_check();
diff --git a/openbis/sourceTest/sql/postgresql/079/schema-079.sql b/openbis/sourceTest/sql/postgresql/079/schema-079.sql
index c0f0a225eaff8ca427e513027375b0da84d4f32b..74c8873281eee5c4faa68f68b46697490bb5ffe3 100644
--- a/openbis/sourceTest/sql/postgresql/079/schema-079.sql
+++ b/openbis/sourceTest/sql/postgresql/079/schema-079.sql
@@ -47,10 +47,13 @@ DECLARE
 	owner_code	CODE;
 	owner_del_id	TECH_ID;
 BEGIN
+	IF (NEW.del_id IS NOT NULL) THEN
+		RETURN NEW;
+	END IF;
   -- check sample
   IF (NEW.samp_id IS NOT NULL) THEN
   	SELECT del_id, code INTO owner_del_id, owner_code
-  	  FROM samples_all 
+  	  FROM samples 
   	  WHERE id = NEW.samp_id;
   	IF (owner_del_id IS NOT NULL) THEN 
 			RAISE EXCEPTION 'Data Set (Code: %) cannot be connected to a Sample (Code: %) %.', 
@@ -59,7 +62,7 @@ BEGIN
 	END IF;
 	-- check experiment
 	SELECT del_id, code INTO owner_del_id, owner_code
-    FROM experiments_all 
+    FROM experiments 
     WHERE id = NEW.expe_id;
   IF (owner_del_id IS NOT NULL) THEN 
 		RAISE EXCEPTION 'Data Set (Code: %) cannot be connected to an Experiment (Code: %) %.', 
@@ -75,10 +78,13 @@ DECLARE
 	owner_code	CODE;
 	owner_del_id	TECH_ID;
 BEGIN
+	IF (NEW.del_id IS NOT NULL) THEN
+		RETURN NEW;
+	END IF;
   -- check experiment (can't be deleted)
   IF (NEW.expe_id IS NOT NULL) THEN
   	SELECT del_id, code INTO owner_del_id, owner_code
-  	  FROM experiments_all 
+  	  FROM experiments 
   	  WHERE id = NEW.expe_id;
   	IF (owner_del_id IS NOT NULL) THEN 
 			RAISE EXCEPTION 'Sample (Code: %) cannot be connected to an Experiment (Code: %) %.', 
@@ -94,17 +100,21 @@ CREATE FUNCTION check_deletion_consistency_on_experiment_deletion() RETURNS trig
 DECLARE
   counter  INTEGER;
 BEGIN
+	IF (OLD.del_id IS NOT NULL OR NEW.del_id IS NULL) THEN
+		RETURN NEW;
+	END IF;
+	
   -- check datasets
 	SELECT count(*) INTO counter 
-	  FROM data_all
-	  WHERE data_all.expe_id = NEW.id AND data_all.del_id IS NULL;
+	  FROM data
+	  WHERE data.expe_id = NEW.id AND data.del_id IS NULL;
 	IF (counter > 0) THEN
 	  RAISE EXCEPTION 'Experiment (Code: %) deletion failed because at least one of its data sets was not deleted.', NEW.code;
 	END IF;
 	-- check samples
 	SELECT count(*) INTO counter 
-	  FROM samples_all 
-	  WHERE samples_all.expe_id = NEW.id AND samples_all.del_id IS NULL;
+	  FROM samples 
+	  WHERE samples.expe_id = NEW.id AND samples.del_id IS NULL;
 	IF (counter > 0) THEN
 	  RAISE EXCEPTION 'Experiment (Code: %) deletion failed because at least one of its samples was not deleted.', NEW.code;
 	END IF;
@@ -117,24 +127,27 @@ CREATE FUNCTION check_deletion_consistency_on_sample_deletion() RETURNS trigger
 DECLARE
   counter  INTEGER;
 BEGIN
+	IF (OLD.del_id IS NOT NULL OR NEW.del_id IS NULL) THEN
+		RETURN NEW;
+	END IF;
   -- all directly connected data sets need to be deleted
   -- check datasets
 	SELECT count(*) INTO counter 
-	  FROM data_all
-	  WHERE data_all.samp_id = NEW.id AND data_all.del_id IS NULL;
+	  FROM data
+	  WHERE data.samp_id = NEW.id AND data.del_id IS NULL;
 	IF (counter > 0) THEN
 	  RAISE EXCEPTION 'Sample (Code: %) deletion failed because at least one of its data sets was not deleted.', NEW.code;
 	END IF;
   -- all components need to be deleted
 	SELECT count(*) INTO counter 
-	  FROM samples_all 
-	  WHERE samples_all.samp_id_part_of = NEW.id AND samples_all.del_id IS NULL;
+	  FROM samples 
+	  WHERE samples.samp_id_part_of = NEW.id AND samples.del_id IS NULL;
 	IF (counter > 0) THEN
 	  RAISE EXCEPTION 'Sample (Code: %) deletion failed because at least one of its component samples was not deleted.', NEW.code;
 	END IF;
 	-- all children need to be deleted
 	SELECT count(*) INTO counter 
-		FROM sample_relationships sr, samples_all sc
+		FROM sample_relationships sr, samples sc
 		WHERE sample_id_parent = NEW.id AND sc.id = sr.sample_id_child AND sc.del_id IS NULL;
 	IF (counter > 0) THEN
 		RAISE EXCEPTION 'Sample (Code: %) deletion failed because at least one of its child samples was not deleted.', NEW.code;